https://github.com/wzpan/python2-miio
Python2 library for interfacing with Xiaomi miio components
https://github.com/wzpan/python2-miio
Last synced: 9 months ago
JSON representation
Python2 library for interfacing with Xiaomi miio components
- Host: GitHub
- URL: https://github.com/wzpan/python2-miio
- Owner: wzpan
- License: other
- Created: 2017-07-14T17:46:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-14T18:14:10.000Z (over 8 years ago)
- Last Synced: 2025-04-12T17:51:18.929Z (9 months ago)
- Language: Python
- Size: 6.84 KB
- Stars: 5
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: License.txt
Awesome Lists containing this project
README
# MusicBoxApi
[](LICENSE.txt)
[]()
Python2 library & console tool for miio.
## Install
``` sh
pip install python2-miio
```
## Usage
* detect miio components:
``` sh
miio2 discover
```
* write your code to send messages to your miio components.
``` py
import miio
host = '192.168.1.103' # host
token = 'xxxxxxx' # token
fan = miio.device(host, token)
fan.send('set_power', ['on']) # start a smart mi fan
```