Yeelight binding?

I just received my first yeelight and noticed that after I make any adjustment (turn on, turn off, change color, change level, etc) my Karaf console gets flooded with with data…

Any way to turn that off?

openhab> ######### this is control command response, don't need to notify status
 change!
status = DeviceStatus [isPowerOff=false, r=255, g=30, b=56, color=16719416, brig
htness=100, ct=4000, hue=0, sat=100, isFlowing=false, delayOff=-1, mFlowItems=nu
ll, mode=MODE_COLOR, isMusicOn=false, name=]
######### this is control command response, don't need to notify status change!
######### this is control command response, don't need to notify status change!
status = DeviceStatus [isPowerOff=false, r=255, g=45, b=49, color=16723249, brig
htness=100, ct=4000, hue=0, sat=100, isFlowing=false, delayOff=-1, mFlowItems=nu
ll, mode=MODE_COLOR, isMusicOn=false, name=]
######### this is control command response, don't need to notify status change!
######### this is control command response, don't need to notify status change!
######### this is control command response, don't need to notify status change!
######### this is control command response, don't need to notify status change!
status = DeviceStatus [isPowerOff=false, r=255, g=228, b=56, color=16770104, bri
ghtness=100, ct=4000, hue=0, sat=100, isFlowing=false, delayOff=-1, mFlowItems=n
ull, mode=MODE_COLOR, isMusicOn=false, name=]
######### this is control command response, don't need to notify status change!
######### this is control command response, don't need to notify status change!
######### this is control command response, don't need to notify status change!
######### this is control command response, don't need to notify status change!
######### this is control command response, don't need to notify status change!
status = DeviceStatus [isPowerOff=false, r=122, g=255, b=140, color=8060812, bri
ghtness=100, ct=4000, hue=0, sat=100, isFlowing=false, delayOff=-1, mFlowItems=n
ull, mode=MODE_COLOR, isMusicOn=false, name=]
######### this is control command response, don't need to notify status change!
status = DeviceStatus [isPowerOff=false, r=134, g=94, b=255, color=8806143, brig
htness=100, ct=4000, hue=0, sat=100, isFlowing=false, delayOff=-1, mFlowItems=nu
ll, mode=MODE_COLOR, isMusicOn=false, name=]
######### this is control command response, don't need to notify status change!
status = DeviceStatus [isPowerOff=false, r=255, g=51, b=241, color=16724977, bri
ghtness=100, ct=4000, hue=0, sat=100, isFlowing=false, delayOff=-1, mFlowItems=n
ull, mode=MODE_COLOR, isMusicOn=false, name=]
######### this is control command response, don't need to notify status change!
status = DeviceStatus [isPowerOff=true, r=255, g=51, b=241, color=16724977, brig
htness=100, ct=4000, hue=0, sat=100, isFlowing=false, delayOff=-1, mFlowItems=nu
ll, mode=MODE_COLOR, isMusicOn=false, name=]

1 Like

I have the same issue. turned on and off a few times … even switched LAN-Control on and off several times, but the color bulb won’t show in INBOX. Also scanning manually won’t bring any results. Suggestions would be highly appreciated. :slight_smile:
thanks in advance

Is the binding also working with the Yeelight Bedside Lamp? (2nd version with WiFi)

Thank you in advance.

1 Like

tried, did not work

Good day to everyone, I’m new user, so I’ve installed Opnehab 2.2 on raspberry (full installation no Opehabian), with the new strech system for raspberry. I love xioami product, so my gateway works very well but for the yeelight is hard work. I’ve installed the binding 2.1.0 (the zip file metioned above). The binding seems to be ok but when i try to find my Yeelight ceiling nothing is found. May anyone can help me? Do I have to install also Zulu java (raspberry scretch has JAVA8 already installed)? On domoticz the Yeelight is very easy because i can directly configure the ip address but here it seems to be impossible. At the end take in account that with the new firmware the Yeelight ceeling can be used also as Bluethoot gateway for the other xiaomi ligth that are only in bluetooth. Do you thing that the binding should be updated? Thank you very much for everyone who works on.

the lamp works at this time only with the Xiaomi Mi IO Binding and the Token. But there you can use only On/OFF and brightness.

I also hope for a yeelight binding update.

1 Like

I got Yeelight ceiling lamp recognized by OpenHAB (using Xiaomi Mi IO Binding with token). Linked power (channel) to switch type item and added switch to sitemap.

But when I’m using the switch from sitemap, state will be changed to OFF and immediately to ON. Could not switch light on and off:

2018-01-22 18:09:17.197 [ome.event.ItemCommandEvent] - Item 'YeelightLEDCeilingLamp1_Power' received command OFF
2018-01-22 18:09:17.202 [vent.ItemStateChangedEvent] - YeelightLEDCeilingLamp1_Power changed from ON to OFF
2018-01-22 18:09:17.309 [vent.ItemStateChangedEvent] - YeelightLEDCeilingLamp1_Power changed from OFF to ON

Don’t have a clue what causes this … anyone faced this?

This means your lamp does not respond to the on/off command as send.
Right after the sending of the command, the binding requests the state again from the light. As the status is not changed, the state is switched back.

Some of the yeelights expect multiple parameters when switching on/off, current the binding only sends single command this might be the reason for your issue.

You may be able to send a ‘custom command’ to the lamp
set_power [“on|off”, “smooth”, 5000]

it may even need a mode after the 5000 part.e.g. set_power ["on", "smooth", 5000,1]

0: last mode
1: normal mode
2: rgb mode
3: hsv mode
4: color flow
5: moonlight

if that improves, let me knwo the modelId you see and I may be able to update it in the database.

Yeelight Binding is completely broken for me - all lamps are shown offline and I do have several errors. Only thing I did is updating java. But I already tried version 152 and version 144 again and it is still not working. All my lamps (around 30?) are offline… it is the worst thing that could happen :confused:

Here are some errors:

Jan 28 20:56:52 openhabpi karaf[2960]: java.lang.IllegalArgumentException: No enum constant com.yeelight.sdk.enums.DeviceType.bslamp1
Jan 28 20:56:52 openhabpi karaf[2960]:         at java.lang.Enum.valueOf(Enum.java:238)
Jan 28 20:56:52 openhabpi karaf[2960]:         at com.yeelight.sdk.enums.DeviceType.valueOf(DeviceType.java:1)
Jan 28 20:56:52 openhabpi karaf[2960]:         at com.yeelight.sdk.device.DeviceFactory.build(DeviceFactory.java:29)
Jan 28 20:56:52 openhabpi karaf[2960]:         at com.yeelight.sdk.services.DeviceManager$2.run(DeviceManager.java:130)
Jan 28 20:56:52 openhabpi karaf[2960]:         at java.lang.Thread.run(Thread.java:748)


18:58:25.416 [WARN ] [fig.xml.osgi.XmlDocumentBundleTracker] - The XML document '/ESH-INF/binding/binding.xml' in module 'org.openhab.binding.yeelight' could not be parsed: The XmlConfigDescriptionProvider must not be null!
java.lang.IllegalArgumentException: The XmlConfigDescriptionProvider must not be null!
        at org.eclipse.smarthome.core.binding.xml.internal.BindingInfoXmlProvider.<init>(BindingInfoXmlProvider.java:60) [116:org.eclipse.smarthome.core.binding.xml:0.10.0.b1]
        at org.eclipse.smarthome.core.binding.xml.internal.XmlBindingInfoProvider.createDocumentProvider(XmlBindingInfoProvider.java:141) [116:org.eclipse.smarthome.core.binding.xml:0.10.0.b1]
        at org.eclipse.smarthome.config.xml.osgi.XmlDocumentBundleTracker.acquireXmlDocumentProvider(XmlDocumentBundleTracker.java:181) [112:org.eclipse.smarthome.config.xml:0.10.0.b1]
        at org.eclipse.smarthome.config.xml.osgi.XmlDocumentBundleTracker.addingObject(XmlDocumentBundleTracker.java:206) [112:org.eclipse.smarthome.config.xml:0.10.0.b1]
        at org.eclipse.smarthome.config.xml.osgi.XmlDocumentBundleTracker.parseDocuments(XmlDocumentBundleTracker.java:350) [112:org.eclipse.smarthome.config.xml:0.10.0.b1]
        at org.eclipse.smarthome.config.xml.osgi.XmlDocumentBundleTracker.processBundle(XmlDocumentBundleTracker.java:336) [112:org.eclipse.smarthome.config.xml:0.10.0.b1]
        at org.eclipse.smarthome.config.xml.osgi.XmlDocumentBundleTracker.access$3(XmlDocumentBundleTracker.java:331) [112:org.eclipse.smarthome.config.xml:0.10.0.b1]
        at org.eclipse.smarthome.config.xml.osgi.XmlDocumentBundleTracker$2.run(XmlDocumentBundleTracker.java:307) [112:org.eclipse.smarthome.config.xml:0.10.0.b1]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?]

I do not know how that happened, but I need to resolve it fast…

Thank you in advance!


Edit: Same problems with “Zulu”…

Yeelight Binding is pretty unreliable on my side.

2 of my lights are not picked up. Incidentally those are the ones furthest away from the Windows 10 machine running OpenHab, and I think communication happens via a Wifi access point connected via Lan to my main router (And access point)

Some of the others seems to go offline at random and I have no idea how to bring those online again. Sometimes restarting brings them all online but checking in after a day some are offline again.

Not sure if I need to run it on a Raspberry Pi of Linux box, rather?

Just have that problem since yesterday too - running a Raspberry Pi (without any problems before; except needed to activate WiFi on the Pi to find the bulbs).

But now it is a desaster - all bulbs offline. Yesterday, when I went to sleep there were 2 bulbs online (were offline before) “Kitchen 2” + “Kitchen 3”. This morning (did nothing in the night) there were again 2 online, but this time “Kitchen 2” + “Bath 2”.

I want them all to be working again… First I only had two bulbs offline: “Sleeping 3” and “Livingroom Floor”. I deleted the “Livingroom Floor” one to add it again, but it did not show up again. After several restarts all bulbs were offline…

Hope anybody can fix this :confused: Even a restart of the binding is flooding the console…

Consider to switch to the Mi IO binding.

Currently I’m having a mixture of both bindings and my yeelights work much more reliable with the mi io binding.

1 Like

Already thought about that. Got all other stuff running over it (including 2 bedise lamps). But my biggest problem are these tokens. I got all my Yeelight-lamps in the Yeelight app and not in the Mi Home app… That would be okay and easy with 5-10 lamps, but I got around 30 or so and that is really bad to reset them all, add them to the Mi Home app and then read out the token for each lamp. :frowning:

Aren’t they automatically synchronized between both apps?
Just checked mine and i have each yeelight in MiHome, as well as in the yeelight app.

As long as you are using the same mi account i think you are fine?

Interesting! I am using the same account for sure, but I do think I use the Mainland China-Server with the Mi Home (read it somewhere to do so) and the Singapore-Server with the Yeelight App… Hmmmm…

Sounds like I need to reset all my Bulbs and add them to the Yeelight App with the other Server? Or other way round do the same with the Mi Home App (2 Gateways with like 40+ devices) to the Singapore-Server… Big “hmmmm”…

Seems like the first one is the smaller hmm :wink:

Just checked, i have both on mainland china. Maybe you could try to switch the Server in the yeelight app. Perhaps the bulb information get transferred?

Dunno…

I think I had both of them on Mainland China too at first, but updates for the Yeelights were only rolled out on Singapore or something. There was a cause why I did that - I am pretty sure about that. Guess I will need to do something, but I do not understand what is wrong now. First try will be a new sd card with a clean install. I want to have 2 sd cards in future to mirror each other and just replace it, when a update crashes anything - dont want that again…


Edit: Just switched the server of the Yeeligh app to Mainland China without doing anything else and then back. After that there were updates available, but only for some lamps. I clicked to update all and he said that they already have the newest version and now comes the interesting part: these lamps, where the update was shown, are back online… I still do not understand it, but I like it. 7 of 26 are back online (thought I have more :smiley: ).

I do have errors with the Yeelight binding, but it seems like the problem is not the binding itself?.. makes it more confusing…


Edit 2: Had the same update-thing for the rest of the bulbs, but they are still not working… Guess it has to do something with the bulbs - at least that is my guess now.


Update: I moved all Yeelights to the Mainland China Server. When I moved them they were working fine. After a restart all bulbs were offline again. After that I moved 2 bulbs to American Server and they are online again… after a restart, you are already gussing it - gone… Can someone make up anything out of this information? Bad SD?

I did not went to buy one, because I thought this can maybe fix it, but at latest on the weekend I will make a fresh install and try it. To me it seems like the binding is loosing the tokens of the Yeelights and cannot get them back? Does anybody know where they are stored or are here no tokens required?..


Update 2: After several restarts of the bulbs (on/off wallswitch) all bulbs were working. After some time (half an hour) many bulbs are gone again with having the name “” in the thing overview… I already ordered a SD and will try a fresh install on the weekend…

I wonder why nobody else has these problems…

I made a fresh installl in the last 4 hours and I still have the offline problem. I still do not know what the problem is and I guess that I will need to switch the Binding…

I’m not actually sure that anybody is really using the bulbs with OpenHab reliably.

One aspect that I wonder about is whether your wifi setup plays a big role. I have two APs – one in my study which is connected to the PC running OpenHab, and then another in another. Both share the same SSID and are connected over LAN. They are different channels though.

Two of my builbs I never pick up using the Yeelight binding and my guess is those are on the different Wifi AP.

The rest I pick up but they go offline basically at will.

I’ve extracted all the tokens for my light, planning on trying the Mi binding next.

I used them with openHAB 2.1 without any problems at all… But I had a problem with the astro binding and therefore I upgraded to 2.2.