Yeelight binding?

Tags: #<Tag:0x00007f014af93cb8>

(JustAProgrammer) #224

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:

(Killercorny) #225

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.

(Claudius Ellsel) #226

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!

(Selter) #227

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.


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

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

(Claudius Ellsel) #228

Currently my openHAB setup is broken, so I cannot test myself. But:

It is completely intended to only have brightness / color channel available. It the same as used for other bindings like the hue binding afaik.

For the mono dolphin bulb: See the example of the LIFX binding:

Switch Kitchen_Toggle { channel="lifx:whitelight:kichen:brightness" }

For the color bulb you should be able to use the brightness slider from the color picker. The linked workaround is supposed to work (maybe it doesn’t). Also see

Switch	Light1_Toggle		{ channel="hue:0210:1:bulb1:color" }

(Selter) #229

Thanks for your reply. Unfortunately the switch item does not work :frowning:

Are there different versions of the Yeelight Binding? I’m using the native one which comes via oH 2.4 binding “market”

(Claudius Ellsel) #230

I also use the version from the market now, although I am running on the snapshot builds of openHAB. Are you experiencing this with dolphin and color or only color?

I just tested creating a switch item linked to the color channel of my bulb in PaperUI and it worked without problems.

However: Are you using the first or second generation color bulb? I am using the second generation.

(Selter) #231

I think it’s the fitst generation:

(Claudius Ellsel) #232

It is. You are only experiencing this with color, dolphin is ok, right? Might be something wrong in the binding then.

(Selter) #233

I tried again with the switch code.

For the mono bulb it works now - reason could be that it the first attempt there were no space between the bracket.

Switch Mono_Toggle  (Gyeelight,Glicht) { channel="yeelight:dolphin:0x000000000xxxxx:brightness" }


Item 'Mono_Toggle' received command ON
Mono_Toggle predicted to become ON
Mono_Toggle changed from OFF to ON
[INFO ] [light.internal.lib.device.DeviceBase] - ######### this is control command response, don't need to notify status change!
[INFO ] [light.internal.lib.device.DeviceBase] - status = DeviceStatus [isPowerOff=false, r=0, g=0, b=0, color=0, brightness=100, ct=4000, hue=0, sat=0, isFlowing=false, delayOff=-1, mFlowItems=null, mode=null, isMusicOn=false, name=]
[vent.ItemStateChangedEvent] - YeelightWhiteLED1_Brightness changed from 0 to 100

But for the color bulb it doesn’t work:

Switch	Color_Toggle	 (Gyeelight,Glicht)	{ channel="yeelight:wonder:0x000000000xxxxx:colorTemperature" }


[ome.event.ItemCommandEvent] - Item 'Color_Toggle' received command ON
[nt.ItemStatePredictedEvent] - Color_Toggle predicted to become ON
[vent.ItemStateChangedEvent] - Color_Toggle changed from OFF to ON

(Claudius Ellsel) #234

Thanks for testing. What I suggest you to do now:

  • Create an issue on GitHub in the openhab2 addons repo with your findings
  • If you want you can try setting the logs to give more details, that might help tracking this down
  • Wait or
  • Try to find the problem in the code yourself and commit it to the addons repo with a PR (if experienced enough)

(Selter) #235

Ok - done

I hope that someone will have a look into this.

(Claudius Ellsel) #236

Thanks. This will hopefully make it easier to track the issue.