I just bought myself a Yeelight “C2001 Ceiling Light”. Was tempted to do so as their protocol is open, does not require a cloud and seemed to be supported by Openhab.
After spending two hours, I got the lamp partially working, that is:
It does not seem to be discoverable by the binding itself
However I was able to discover and control it (e.g. toggle on/off) using the python library “yeelight”, see below for result of the discovery:
I tried also all other types line “ceiling1” and so on, but no change, they always appear offline.
I’m wondering about the IP, just guessing: As discovery does not work, the light is not found at all from the perspective of the addin? Or is it about the model named “ceila” which simply is not recognized by the addin?
The addin is a little short on the documentation so right now I’m somehow clueless how to get it working.
Wanted to add something: I use network devices from unifi, the openhabian box and all IoT devices are running in a single, own VLAN, the network is “10.30.0.1/16”, as visible from the python output.
Just got one more idea, I think that does not solve it, but points out the problem. Setting the addin to “trace” showed the following log output. So basically it’s discovered but model “ceila” not recognized.
What is the recommendation now? Thanks
The yeelight lamps don’t want to be controlled from a different vlan. You can work around that by adding a SNAT rule for masquerading requests on you unifi controller. Trouble is that there is no native ui to do so. While setting this manually on the console will work it won’t survive reboots. I use the on boot scripts from GitHub - unifi-utilities/unifios-utilities: A collection of enhancements for UnifiOS based devices to make it persistent across restarts.
Sorry, I wasn’t quite clear with my posting: Openhab and yeelight are in the same VLAN. But as posted, discovery works, but the device is unknown. I think I’ll open a request in github for this.
Thanks for the hint Marcel, tried that, but the whole issue around using and retreiving that token just is too cumbersome. Also the lamp does not support the basic discovery, log states “No token discovered for device xxx”.
So for the moment I’m okay using the lamp with a python script and execution of the script from a rule and hope the “ceila” model gets added in one of the next releases I made an enhancement request in github, so let’s wait