Using the official app is straight forward, then I wondered can I play it 'harder'. Then I searched and found some interest use cases:
- Controlling yeelight by Python
- Controlling yeelight by Siri (wow!)
- Controlling yeelight by Home-Assistant
First, you need the official app to enable developer mode. Then just use python yeelight package https://yeelight.readthedocs.io/en/latest/ and you are good to go!
import yeelight
yeelight_ip='xxx.xxx.xx.xxx' # your yeelight bulb IP light = yeelight.Bulb(yeelight_ip, effect='smooth') light.turn_off() light.turn_on()
# Set it to white light.set_rgb(255,255,255)
# Set the brightness light.set_brightness(100)
Not very difficult right? If you have a raspberry Pi you can set some cronjobs in order to turn the light on in the morning as a silent alarm clock, or place the bulb in your kid's bedroom, then change the brightness from 100% to 1% (then off, of course) in one hour.
If you think it's too dummy to control such a bulb, I agree. That's why there will be some more elegant solutions. Next time I'll show how I setup a virtual HomeKit and ask Siri to control the bulb.
Ref:
- setup yeelight using official apps video
- Enable developer mode: http://www.yeelight.com/en_US/developer
- Python Yeelight Library: https://yeelight.readthedocs.io/en/latest/