Yeelight binding?

Hey people.

Thanks for this binding… I love Yeelight for the quality/price. I have myself ceiling Yeelight too. And I had it running with Mi IO binding before. But it is hard to get the token and make it work. Is there any reason to not having it working with the yeelight binding ? Can I help/test ? I found as well some issues with Mi IO binding to handle brightness if I am remembering good.

Clément

1 Like

Hi there,

I own two Yeelight devices. The 2nd gen. color LED bulb works great with this binding. Thanks a lot for your work. The second device, though, is currently not recognized by this binding and It does not appear in PaperUI when searching for new things.

The unrecognized device is this fancy ceiling light with the starry lamp shade: http://www.yeelight.com/en_US/product/eos I hope it’s OK to mention Gearbest as well as I think their product description is even better than the original Yeelight page: https://gearbest.com/flush-ceiling-lights/pp_1119165.html

What do you need to get this device supported? Can I supply any useful information?

Thanks
Michael

I am in the same situation and looking forward for the solution. I think you can follow better there (link already posted in this thread): (If you have java skills you should help there, I unfortunately don’t know much java)

https://github.com/openhab/openhab2-addons/issues/3665

But here how to make it appears as mentioned in the PR below. (knowing there still issues)

In openhab console look for the current yeelight bundle bundle:list then delete it bundle:uninstall myID and then install this version https://github.com/openhab/openhab2-addons/files/2124473/org.openhab.binding.yeelight-2.4.0-SNAPSHOT.zip with bundle:install https://github.com/openhab/openhab2-addons/files/2124473/org.openhab.binding.yeelight-2.4.0-SNAPSHOT.zip

I see now my ceiling light and hope you will see yours…

1 Like

Thanks. I already noticed this PR and I’m also using that snapshot version of the plugin. Though, I can’t see the ceiling light in my inbox.

The device seems to announce itself with an WLAN id like “yeelink-light-ceiling3-xxx” to my router. Maybe “ceiling3” has to be added to the list of supported yeelight devices. I’ll do some more investigation and post on the Github PR.

1 Like

It is likely the reason yes. Sorry it did not helped.

Same here!!!

brightness channen is missing, any idea?

I’m using 2.4 yeelight snap binding

Solution:

// Light
Dimmer Yeelight_Dimmer_Brightness "Yeelight Dimmer" {channel="yeelight:wonder:0x0000000004564e9e:color"}
Switch Yeelight_Switch            "Yeelight Switch" {channel="yeelight:wonder:0x0000000004564e9e:color"}
Color  Yeelight_Color             "Yeelight Color"  {channel="yeelight:wonder:0x0000000004564e9e:color"}
Dimmer Yeelight_Temp              "Yeelight Temp"   {channel="yeelight:wonder:0x0000000004564e9e:colorTemperature"}
1 Like

I´ve tried to update the yeelight binding, but 2.3 and 2.4 are not working for me.
I previously had 2.1.0 snapshot installed and it works fine with my yeelight bulb 2, but I´m afraid it wont run with OH 2.3.

My yeelight is beeing discoverd, but also no function nor the brightness channel. Whats wrong with this binding, 2.1 was allready working… now nothing.

Same here! Brightness channel is missing, too…

1 Like

seems that anybody is interested in propose a solution for this dimmer channel issue…

rad1xs are you suggesting to use the color channel as brightness dimmer?

I just installed the jar file from here:
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.yeelight/2.4.0-SNAPSHOT/

I got no message in the logs that the binding was installed but it appears if i check in paper ui under bindings.

But it seems auto discovery is not working, lan mode is active.

How can I get the device id ? (i have an android phone)

How do you even get the Wonder bulb to work at all?

If I manually create things/items/sitemap files it doesnt work, if I use paperui it does but I can only get the colour picker to work, temperature does nothing and there is no channel for brightness…

I bought these bulbs and was really looking forward to integrating them with OH and now it seems the binding is totally worthless.

I think it would save everyone a massive amount of time if admins added known issues to the bindings page to save everyone hours of googling and playing around when its apparent there is no solution.

I tried your solution rad1xs but doesn’t work.
Even assigning a dimmer control to the color channel the lamp doesn’t change the brightness.
So today I’m not able to control the yeelight color bulb using openhab2.
Is there any idea to fix the binding? previous version was working perfect

current binding is not providing the brightness channel for color bulb and the brightness of the color channel doesn’t work because the yeelight uses HSV color representation and the binding is using HSB color representation. Those color representations are just not compatible.
To add missing brightness channel is very easy, just add this line:

<channel id="brightness" typeId="brightness" />

to line 12 of the addons/binding/org.openhab.binding.yeelight/ESH-INF/thing/wonder.xml file in openhab2-addons repository and build the binding. Then the brightness channel will appear and it will work correctly.

To fix the color channel some work must be done in the code.

1 Like

or you can download jar with modifications from here: https://drive.google.com/open?id=13Np8lv8qiGTDV3rUBObBHoryhCyGoJRM

2 Likes

great! I’m going to try right now and let you know!

Hi Marek,
The version you posted works just fine!!!
Thank you.
The only issue I see is related to a set of warnings I get, anyhow they are not preventing the light to work:

2018-10-18 20:22:50.141 [ome.event.ItemCommandEvent] - Item 'Luce_Sala_Divano_RGB_dimmer' received command 100

==&gt; /var/log/openhab2/openhab.log &lt;==

2018-10-18 20:22:50.155 [INFO ] [nding.yeelight.lib.device.DeviceBase] - ######### this is control command response, don't need to notify status change!

==&gt; /var/log/openhab2/events.log &lt;==

2018-10-18 20:22:50.155 [vent.ItemStateChangedEvent] - Luce_Sala_Divano_RGB_dimmer changed from 31 to 100

==&gt; /var/log/openhab2/openhab.log &lt;==

2018-10-18 20:22:50.159 [INFO ] [nding.yeelight.lib.device.DeviceBase] - status = DeviceStatus [isPowerOff=false, r=255, g=94, b=214, color=16735958, brightness=100, ct=6404, hue=359, sat=100, isFlowing=false, delayOff=-1, mFlowItems=null, mode=MODE_COLOR, isMusicOn=false, name=]

2018-10-18 20:22:50.163 [INFO ] [nding.yeelight.lib.device.DeviceBase] - status = DeviceStatus [isPowerOff=false, r=255, g=94, b=214, color=16735958, brightness=100, ct=6404, hue=359, sat=100, isFlowing=false, delayOff=-1, mFlowItems=null, mode=MODE_COLOR, isMusicOn=false, name=]

2018-10-18 20:22:50.163 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler YeelightColorHandler of thing yeelight:wonder:0x00000000035b7c5c tried updating channel brightness although the handler was already disposed.

2018-10-18 20:22:50.167 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler YeelightColorHandler of thing yeelight:wonder:0x00000000035b7c5c tried updating channel color although the handler was already disposed.

2018-10-18 20:22:50.170 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler YeelightColorHandler of thing yeelight:wonder:0x00000000035b7c5c tried updating channel colorTemperature although the handler was already disposed.

I had the same warning when replacing the yeelight binding with new version. I don’t remember how i fixed it. Try to restart oh or remove all things and items related to yeelight binding and add them again

The jar file posted above by @salexes https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.yeelight/2.4.0-SNAPSHOT/ is updated and now the latest snapshot, as of Oct 18 at 16:37

1 Like

Hi, could you advise on how you were able to get the brightness control working at all?

What do your items and sitemap file look like for the yeelights?

I’ve spent hours trying to get this working and its driving me insane, without brightness control it kinda defeats the purpose…

this is what I have:
yeelight.things

Thing yeelight:wonder:bedroom2_lamp [ deviceId="XXX" ]

yeelight.items

Dimmer bedroom2_lamp_dimmer "Small bedroom lamp [%d %%]" <light>{channel="yeelight:wonder:bedroom2_lamp:brightness"}
Dimmer bedroom2_lamp_colorTemperature "Small bedroom lamp [%d %%]" <heating>{channel="yeelight:wonder:bedroom2_lamp:colorTemperature"}
Color bedroom2_lamp_color "Small bedroom lamp [%d %%]" <colorlight>{channel="yeelight:wonder:bedroom2_lamp:color"}