Yeelight binding?

I think it’s sufficient to rename .zip to .jar and install the binding.

I will repeat, at me so: /usr/share/openhab2/addons/org.openhab.binding.yeelight-2.1.0-SNAPSHOT.zip
And it works.
PS Although, rather my English is so bad that they do not understand me :slight_smile:

I tried with org.openhab.binding.yeelight-2.1.0-SNAPSHOT.zip and i extracted the jar file . This didnt work. I followed the tutorial from this guy: "https://daysofthunderblog.wordpress.com/2017/01/15/xiaomi-yeelight-addon-for-openhab2/". It just doesnt appear on the bindings tab.

Is there a way to manually add a yeelight bulb by IP Address?
Somehow the binding won’t find my yeelights although they are in the same network and have developer mode activated. I’m using the openhabian on a Raspberry Pi if that matters.

1 Like

Nevermind, I fixed it. The Pi was connected over LAN. As soon as I switched the Pi over to WiFi it could find all Yeelights.

Did somebody managed to implement flow function from the official app ? It`s similar to FADE from chinese rgb lights.

I had the same problem as @ueman . Had to switch the raspberry to wlan to find my yeelight. After that I thought I could switch back to LAN only, but the yeelight is offline now. I then tried to run LAN & WLAN simultanously, but the yeelight still shows offline. I still see it as online in my router interface.

What can I do here? I do not want to run the pi at WLAN only, because I got nextcloud on there too.

Edit: Also tried to add it manually with “location: yeelight://192.168.0.128:55443”. But it still shows offline, if connected to LAN.

Edit 2: I put the raspberry right at the router (no switch between them anymore) to maybe fix the broadcastin-issue mentioned in the read me. But it did not help.

Edit 3: Probably my first Yeelight is faulty. I got a second one now and no problems to add it or any lose of connection. Guess I will contact the seller (hopefully he replaces it).

Edit 4: Same problem with my new YeeLight - it is just offline sometimes. Need to turn Developer Mode on and off and then it works sometimes.

Hi guys,

First of all thank you very much for all your hard work on that binding @kubawolanin @coasterli and others. Without clever people like you this would not be possible and we still would be in the stone age :slight_smile: :slight_smile:

Apart from few small issues which are mainly due to my lack of coding knowledge - one major thing which I have issue with now is that as some stage all the lights go OFFLINE and I just can’t get them back ONLINE. Lights are set in Developer mode, I can ping them, I can access them via telnet etc, just not via binding.

My “quick fix” - which I have no idea why it works after few attempts - is to re-save

yeelights.items

and

yeelights.things

files, after making tiny changes - ie add and remove space somewhere in the file. This re-initialises lights (and other things for some reason) and eventually they show as online again.

System is running on Ubuntu which is Virtual Machine on FreeNAS.

Any ideas and explanation much appreciated and again - thank you for your hard work :slight_smile: :trophy::medal_military:

It would be great to be able to use the fade function or to select a program, like in the app from the vendor.
If you try to achieve a pulsating light with rules, it always looks a bit choppy.

Is there any effort in creating those binding yet?

This 2.1 version is working fine for me in OH 2.1
https://github.com/openhab/openhab2-addons/files/755413/org.openhab.binding.yeelight-2.1.0-SNAPSHOT.zip
Big thanks to the developer.

Many thanks! I’ve installed OpenHab 2.1 with this binding, but I’m completely lost. My Yeelight RGB connected to Wi-Fi. Developers mode enabled. I’m able to control it via official xiaomi tools for developers. But what should I put in openhab? Could you give me a short example, please? With items, sitemaps, etc. Just very short. I have no idea how I can start with it. Thank you very much!

Hello Alex,

Hope this helps: the first is the color edition, the second is the white one,

Sitemap:
Switch item=Yeelight1_Dimmer
Slider item=Yeelight1_Dimmer
Colorpicker item=Yeelight1_Color
Slider item=Yeelight1_Color_Dimmer

Switch item=Yeelight3_Switch
Slider item=Yeelight3_Dimmer

items:
Dimmer Yeelight1_Dimmer “Yeelight 1 Dimmer” {channel=“yeelight:Wonder:0x00000000035c0c46:Brightness”}
Switch Yeelight1_Switch "Yeelight 1 " {channel=“yeelight:Wonder:0x00000000035c0c46:Color”}
Color Yeelight1_Color “Yeelight 1 Color” {channel=“yeelight:Wonder:0x00000000035c0c46:Color”}
Dimmer Yeelight1_Color_Dimmer “Yeelight 1 Color Dimmer” {channel=“yeelight:Wonder:0x00000000035c0c46:Color_Temperature”}

Switch Yeelight3_Switch “Yeelight 3 White” {channel=“yeelight:Dolphin:0x0000000003472779:Brightness”}
Dimmer Yeelight3_Dimmer “Yeelight 3 Dimmer” {channel=“yeelight:Dolphin:0x0000000003472779:Brightness”}

This works for me, although i think it can be better, hope someone tells us!:yum:
Ray

1 Like

Many thanks, X-Ray181. But unfortunately, this sample doesn’t work for me. Could you explain to me where you get these values?

  • 0x0000000003472779
  • 0x00000000035c0c46
  • Dolphin
  • Wonder

Excuse me please for such stupid questions. Thanks!

If everything went well with adding the binding and developer mode, you will see the lamp appear in PaperUI inbox.
When you add it as a thing, you can activate the channels, that will give you the info you need about your lamp

1 Like

Thanks for the explanation. Now I understand how it works. But unfortunately, I can’t see my lamp in an inbox. It is present in a router. I’m able to see it in paperui -> inbox -> network binding. But not in yeelight binding :frowning: could I add it manually?
Dev mode was enabled via official app “yeelight” in android.

You can search in your inbox, do you get the option off the yeelight binding than?

When you go in PaperUI to configuration->bindings, do you see the yeelight binding there?

Yep, yeelight binding present but it can’t find my lamp :frowning:

In logs, I see only

2017-09-17 21:21:32.293 [INFO ] [rvice.dhcp.ReceiveDHCPRequestPackets] - DHCP request for unknown address: 192.168.1.48

This is actually IP of my lamp. Moreover… I can turn it on/off or change brightness using official tool
https://www.yeelight.com/download/developer/YeelightWifiBulbLanCtrl-for-windows.zip

But OpenHab (2.1) can’t find my lamp using “search” ability. What I do wrong?

Have you tried adding it manually via inbox?