Python2 library & console tool for miio.
pip install python2-miio- 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