Yeelight binding?

Copy the jar file to addons folder, than restart

O.

I can control my lights now, but cant see if the light is on or off and also cant see brightness channel, and from the color channel the brightness is not working

so this binding have a lot more work to be done

Does any other version of the yeelight binding that works with openhb 2.3 version?

Thanks

Update: OK, right now i’ve installed OH 2.3 and yeelight 2.4.0 from https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.yeelight/2.4.0-SNAPSHOT/

I only test to switch on/off the yeelight bulb color 1st generation.

Same here, I can turn it off and on, with a switch on the color channel.
But if the light is turned off via Yeelight app the switch is not changing at all, but in the log I can see that openHAB received the command.

Switch Light_Yeelight_Bulb_V2_1_Power "Power" channel="yeelight:wonder:0x0000000005383b3f:color"}

status = DeviceStatus [isPowerOff=false, r=42, g=0, b=255, color=2752767, brightness=1, ct=3500, hue=250, sat=100, isFlowing=false, delayOff=-1, mFlowItems=null, mode=MODE_COLOR, isMusicOn=false, name=]
status = DeviceStatus [isPowerOff=true, r=255, g=0, b=0, color=16711680, brightness=100, ct=4000, hue=0, sat=100, isFlowing=false, delayOff=-1, mFlowItems=null, mode=null, isMusicOn=false, name=]

Any ideas how to fix this?
Thanks Udo

this still needs a lot of work

hope that someone is woking on it

I use the Xiaomi miio Binding, works for me.

Xiaomi miio Binding

Where can i find it?

To install the miio binding now, either upgrade to the snapshot release / M8 or execute in the shell

bundle:install https://openhab.jfrog.io/openhab/online-repo-snapshot/2.4/org/openhab/binding/org.openhab.binding.miio/2.4.0-SNAPSHOT/org.openhab.binding.miio-2.4.0-SNAPSHOT.jar
Than bundle:list to find the bundle nr.
Than bundle:start nr where Mr is the number of the bundle… Probably the last/highest number

1 Like

Thanks

Does someone know how I get the default white of the Yeelights back after changing color?

@all Sorry for replying that late. I hope I can answer a few questions.

Can you be more specific? Where do you activate LAN/WLAN? On your device running openHAB (like a Raspberry Pi)? Do you still experience this?


This is wanted. Also other light bindings use the color channel for brightness, so it was removed to have the same experience in the Yeelight binding. The usage should be the same as in the other light bindings.
Also see:


Is this still the case?


Yes, you can help like on a GitHub issue, although I read that your device already got added in the meantime, correct?


Is your device supported now already?


Sorry to hear that. Are you still experiencing that?


Is this still the case?


Same here, are you still experiencing these problems?


For me changing brightness using the color channel worked with a Yeelight v2 Color bulb. Unfortunately it seems some people are experiencing problems with it.

If this is still not fixed, can you point out the things that need to be changed or create a PR for that?


Again, sorry that it took you so much time. Normally it is intended to be able to change the brightness via the color channel.


Is this issue still occuring?


Is this still occuring?


Is this still the case? Probably your device is not supported, but you can help to add support.


Is this still happening?


I really encourage you to give constructive feedback what can be enhanced, or you can even create a PR fixing the points you discovered, so everyone can benefit from it :slight_smile:


Is this still the case?


Hm, thanks for mentioning. Is this still happening?


As of my understanding there is no such thing as a “default” white.

The default stock color, which comes after every electricty cut off.
You can change it or set the color using commands of the Yeelight docs.

I did not express myself clearly. HSB and HSV seems to be the same thing, but If You look into the yeelight api documentation (https://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf) You will see that the set_hsv command does not allow to set “value” component !!! so it should be named set_hs_and_some_other_params … So to set the brightness a separate command is needed.

I think there is a way to get the color temperature of that stock color? I am not sure, but can’t you set a color temperature through openHAB as well?

Hm, assuming that is true there should not be a difference in setting brightness with the color channel from setting brightness through a separate channel. That should only have effects on the openHAB side, not on how the command is processed and then forwarded to the bulb. Also I think that changing brightness did work without sending another command.

In case I am wrong with this, please link some lines in the binding code for reference where you think things go wrong.

for me, changing color channel brightness didn’t work. Sorry, but I don’t have time now for searching where is the problem in the code, but I remember that when I did look in the code before the problem was that the color channel was sending only set_hsv command which is not supporting brightness.

The binding relied on a lib which is now included in the code, because that lib also had some flaws. This lib was used for communication with the Yeelight devices. I did not change the lib which was written by the original binding author from Yeelight who discontinued his work on the binding. Also I think that I just used the same actions for the color brightness slider as were used for the normal slider. But I might be wrong. Unfortunately I also don’t have much time now.

Has anyone ever got the set_music command to work on the Yeelights?
It needs to declare a Server + port for the signal income.
My first attempt was to plug a microphone into my Pi and start the command, but didn’t work sadly.
Would have been to easy.
I’ve read that something called “FFT” is needed to interpret frequencies.
Working on it but help is appreciated :slight_smile:

In the meantime I switched to mihome-binding to control my yeelight2, but I would prefer the yeelight-binding, cause then I could also use the alexa yeelight skill and set colors with it.
If I would have some spare time I give it a try.

Alright. In theory it should be working fine, since I am also using it with my Yeelight 2 color bulb without problems. Let me know your experiences, if you had time for testing!

After upgrading to openHAB 2.4 on a Rapsberry I wanted to give this binding another try.

I managed to add the things for a mono (“dolphin”) and color (“wonder”) bulb.
But there are only the brightness channel for “dolphin” / color and colortemperature for “wonder”.

I’m aware that switching off the mono bulb (dolphin) via yeelight app openhab logs it as:

 YeelightWhiteLED1_Brightness changed from 14 to 0

So, is it right that there is no switch available?

Untortunately I don’t have the brightness channel for “wonder” - how can one switch this bulb on/off and adjust the brightness? This workaround doesn’t work :frowning:

When switching off the “wonder” bulb via yeelight app I got the following output:

2019-01-11 20:53:33.755 [INFO ] [light.internal.lib.device.DeviceBase] - status = DeviceStatus [isPowerOff=true, r=255, g=0, b=0, color=16711680, brightness=100, ct=3908, hue=359, sat=100, isFlowing=false, delayOff=-1, mFlowItems=null, mode=MODE_SUNHINE, isMusicOn=false, name=]

After playing for a while with the yeelight app and openhab sitemap I found out that the color picker item will work as switch.

Image%20102

“Arrow up” turns on the light and “arrow down” turns it off.

So far so good - but how to change the brightness?