python2-miio

Python2 library for interfacing with Xiaomi miio components


Keywords
xiaomi miio
License
GPL-3.0
Install
pip install python2-miio==0.0.3

Documentation

MusicBoxApi

Software License platform

Python2 library & console tool for miio.

Install

pip install python2-miio

Usage

  • detect miio components:
miio2 discover
  • write your code to send messages to your miio components.
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