yeelight wifi light bulb api and mqtt bridge
I have been keeping myself from pushing it to github because I want to clean
the code and add documentation but I havent had any time for it after I got a
working mqtt bridge.
I have been running this in production at home with about 10 bulbs for about 3
year so maybe someone else has use of it even if the code isn’t pretty.
The only problem I have notices is that the reconnection code some times doesnt
work right after a bulb is restarted by disconnecting it’s power, other than
that I don’t know about any issues.
When I get back to working on this the Go API and MQTT stuff might start
changing….
There are three base command topics depending on the type of device.
Sending commands to control lights:
ylcolor/command/[devicename]/[commandname]
ylmono/command/[evicename]/[commandname]
ylstrip/command/[devicename]/[commandname]
Receiving state updates:
ylcolor/state/[devicename]/[property]
ylmono/state/[evicename]/[property]
ylstrip/state/[devicename]/[property]
[type]/state/[devicename]/name
device name[type]/state/[devicename]/model
one of mono
/color
/strip
[type]/state/[devicename]/location
device address (example: yeelight://192.168.2.7:55443
)[type]/state/[devicename]/power
on
or off
[type]/state/[devicename]/brightness
1-100