Yeelight binding?

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"}

Thanks for the reply.

Interestingly, if I use paperui to add the yeelight thing, and copy your items but changing “bedroom2_lamp” to my channel id, then brightness works but not the other two. When trying to change colour I get this error: `

Received HTTP POST request at 'items/YeelightColour' with an invalid status value '114,80,100'.

If I manually add the thing and copy your items then brightness does nothing but the other two work.

Found the solution: changing the brightness channel to color and making it a Dimmer item

Dimmer YeelightBrightness "brightness [%d %%]" {channel="yeelight:wonder:0x000000000531be5f:color"}

Update: aaaaaand stuck in offline

Any chance to get the second version of the color bulbs working? It is working with the mi io binding , but xiaomi supports the 2nd version on the chinese server and the chinese server does not support google home at all… :confused:

edit: it is working, missed to activate the LAN control. :smiley:

Have you successful set up the Yeelight binding with the Yeelight Color Bulbs?
I’ve the silver grey ones (1st version)?

I ran into problem with the Mi IO binding …
https://community.openhab.org/t/xiaomi-mi-io-binding-and-yeelight-color-bulb/55242

Maybe you can point me in the right direction :wink:

My is working are you using Openhab 2.4 and have the yeelight App “WITH THE LAN CONTROLON” what is in the yeelight App.

I’m on oH 2.3 stable.

According to this thread
I guess I need to wait until 2.4 stable comes out or have to try the 2.4 snapshot, right?

Yes

i installed the openhab 2.4 with yeelight, it discover all my 7 rgbw bulbs, but only one online, after few minutes another one go online, but now all offline, from the yeelight app everything is working great

Have you enable LAN in the application of yeelight.

yes, if you dont enable you cant discover them

Ok lot of ppl forget to do it.

Hi All,

I little bit stuck. I bought a yeelight cell, successfully connect to wifi and I can control it with the app, but when I try to add to openhab, nothing happens.
Server: Mainland China or German( I tried both)
Lan control: Enabled
Same network
OH version: 2.4.0~M5-1
Yeelight fw: 1.5.9_0184

And nothing…

I try a yeelight_toolbox_3.0.1 app. It show and I can control it :confused:

Anybody can help me?

O.

I’m having a hard time getting this work.

odroid xu4 - 18.04.1 LTS (Bionic Beaver) build 4.14.78-150+
# dpkg -l | grep openhab
ii openhab2 2.4.0~M5-1 all openhab2
ii openhab2-addons 2.4.0~M5-1 all openhab2-addons

all yeelights are LAN enabled and work w/ e.g. home assistant w/o problems

I can’t even get openhab to detect a single light, got 1 ceiling, 2 white and 1 color bulbs.

'HTTP/1.1 200 OK\r\nCache-Control: max-age=3600\r\nDate: \r\nExt: \r\nLocation: yeelight://192.168.1.41:55443\r\nServer: POSIX UPnP/1.0 YGLC/1\r\nid: 0x0000000005e20700\r\nmodel: ceiling1\r\nfw_ver: 184\r\nsupport: get_prop set_default set_power toggle set_bright set_scene cron_add cron_get cron_del start_cf stop_cf set_ct_abx set_name set_adjust adjust_bright adjust_ct\r\npower: on\r\nbright: 3\r\ncolor_mode: 2\r\nct: 5953\r\nrgb: 0\r\nhue: 0\r\nsat: 0\r\nname: ceiling1\r\n')
'HTTP/1.1 200 OK\r\nCache-Control: max-age=3600\r\nDate: \r\nExt: \r\nLocation: yeelight://192.168.1.43:55443\r\nServer: POSIX UPnP/1.0 YGLC/1\r\nid: 0x000000000536f100\r\nmodel: ct_bulb\r\nfw_ver: 17\r\nsupport: get_prop set_default set_power toggle set_bright start_cf stop_cf set_scene cron_add cron_get cron_del set_ct_abx set_adjust adjust_bright adjust_ct set_music set_name\r\npower: off\r\nbright: 56\r\ncolor_mode: 2\r\nct: 5102\r\nrgb: 0\r\nhue: 0\r\nsat: 0\r\nname: ct_bulb 2\r\n')
'HTTP/1.1 200 OK\r\nCache-Control: max-age=3600\r\nDate: \r\nExt: \r\nLocation: yeelight://192.168.1.44:55443\r\nServer: POSIX UPnP/1.0 YGLC/1\r\nid: 0x0000000005317e00\r\nmodel: ct_bulb\r\nfw_ver: 17\r\nsupport: get_prop set_default set_power toggle set_bright start_cf stop_cf set_scene cron_add cron_get cron_del set_ct_abx set_adjust adjust_bright adjust_ct set_music set_name\r\npower: off\r\nbright: 100\r\ncolor_mode: 2\r\nct: 2700\r\nrgb: 0\r\nhue: 0\r\nsat: 0\r\nname: ct_bulb 1\r\n')
'HTTP/1.1 200 OK\r\nCache-Control: max-age=3600\r\nDate: \r\nExt: \r\nLocation: yeelight://192.168.1.45:55443\r\nServer: POSIX UPnP/1.0 YGLC/1\r\nid: 0x0000000007c0df00\r\nmodel: color\r\nfw_ver: 30\r\nsupport: get_prop set_default set_power toggle set_bright start_cf stop_cf set_scene cron_add cron_get cron_del set_ct_abx set_rgb set_hsv set_adjust adjust_bright adjust_ct adjust_color set_music set_name\r\npower: off\r\nbright: 56\r\ncolor_mode: 1\r\nct: 6382\r\nrgb: 16770886\r\nhue: 359\r\nsat: 100\r\nname: color 1\r\n')

running openhab w/ debug:

openhab> java.lang.IllegalArgumentException: No enum constant com.yeelight.sdk.enums.DeviceType.ct_bulb at java.lang.Enum.valueOf(Enum.java:238) at com.yeelight.sdk.enums.DeviceType.valueOf(DeviceType.java:1) at com.yeelight.sdk.device.DeviceFactory.build(DeviceFactory.java:29) at com.yeelight.sdk.services.DeviceManager$2.run(DeviceManager.java:130) at java.lang.Thread.run(Thread.java:748)

for what it’s worth, adding them manually doesn’t work either. always “offline”

hope that’s enough info :slight_smile:

ok figured it… this binding and it’s design is crap :slight_smile:

Hi, And what was the answer? :slight_smile:
Same issue in test environment…

Latest Snapshot, Nov12, resolve my issue. Installed from here:
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.yeelight/2.4.0-SNAPSHOT/

how did you install this file?

Copy the jar file to addons folder, than restart

O.