Yeelight binding?

Hi @coasterli, thanks for the binding

Is there a channel for toggling ON/OFF only?
I do see ON/OFF toggle on PaperUI, but not on BasicUI or mobile app.
Is there something I’m missing?

EDIT:
nevermind, Switch works with Brightness channel

.sitemap
Switch item=Thingname_brightness label=“Power”

Hello famaia

After i add the it , the HO2 fine the Yeelight but say she Off line.
where i can the the IP? the HO2 did not find it automatic

What can i do in order to resolve it?

PS that work fine for me with home assistant…

Hi guys!

Today I finally made my yeelight to work with openhab. I spent all evenings this week to find where was the problem. In my case it was Windows 7, on wich runs openhab. It appears that windows has problems with multicast traffic when you have more than one NIC. I disabled all my NICs except the main one and now it works flowlessly. I also had to disable Oracle virtual box NIC to make yeelight work (virtual box NIC prevents multicast traffic). Maybe this information will help someone.

could someone pls help me create an item for this

Did you try the following?

Dimmer  Bedroom_Lamp "Lamp" (Lights, Bedroom) {channel="yeelight:Dolphin:0x0000000000c91c2d:Brightness"}
1 Like

@kubawolanin I didn’t find how to build a separate binding jar file. Could you please advise?

Sure! You just need to run mvn clean install in the binding directory.
After that you’ll see a /target/ folder where you’ll find a JAR file.

Simply change extension to ‘zip’ in order to make it uploadable :slight_smile:

1 Like

For anyone concerned - I’ve attached latest compiled JAR for this binding in the Pull Request :slight_smile:

1 Like

Hello,

could you put the link to the repository for downloading the source code, please?
I’ve started with openhab and would like to set up a debug environment in Eclipse, but can’t find the source code of yeelight addon.

Thanks!

The pull request points to this branch. And all the changes are located in this folder.

Hello,

thanks for your last reply. I was wondering if there is any plan to release any update.

I’ve been testing this binding and sometimes it connects and other don’t. Not sure if I’m the only one with this issue, I was trying to install openhab in a raspberry pi, but I give up as only 10% of the times when openhab started, the lights were connected. So I keep with my server with windows, and this keeps happening more often now.

At the beginning I thought it was because the bulbs might change the IP, so I assigned fixed IPs to the bulbs, but now, I need to start like 10 times openhab until all my bulbs (3) are all connected.

I’ll put you the log when they showed up as disconnected, in case you can help me out:

############## CheckAutoConnect: online: false, autoConnect: true, connection state: DISCONNECTED, device = com.yeelight.sdk.device.WonderDevice@XXXXX, device id: 0x000000000XXXXXX
############## CheckAutoConnect: online: false, autoConnect: true, connection state: DISCONNECTED, device = com.yeelight.sdk.device.WonderDevice@YYYYY, device id: 0x000000000YYYYYY
############## CheckAutoConnect: online: false, autoConnect: true, connection state: DISCONNECTED, device = com.yeelight.sdk.device.WonderDevice@ZZZZZ, device id: 0x000000000ZZZZZZ

Any help is much appreciated, or if someone else has a similar problem, please let me know.

Thanks!

Hello,
I managed to successfully install the yeelight binding and controlling my lamps works well with the paper ui and basic ui. I now want to create a rule that will turn on my yeelight color bulb and sent a spefic color value to that lamp. How will this command look like?

Hello! I also attracts a question. I do so:

yeelight.rules:

rule "ON"
when
	Time cron "0 0 7 * * ?"
then
	yeelight_scena.sendCommand("4")
end

rule "scena"
when
	Item yeelight_scena received command
then
	switch(yeelight_scena.state.toString) {
		case "4":
		{
			l01_brightness.sendCommand(1)
			l01_color.sendCommand("100,100,100")
			l02_brightness.sendCommand(1)
			l02_color.sendCommand("0,100,100")
			l03_brightness.sendCommand(1)
			l03_color.sendCommand("200,100,100")
		}
	}
end

yeelight.items:

Dimmer	yeelight_brightness		"Bright"
String	yeelight_scena			"Scena"
Switch	yeelight_power			"Power"

Dimmer	l01_brightness			"Bright"								{channel="yeelight:Wonder:0x000000000335c499:Brightness"}
Color	l01_color				"Color"					<colorlight>	{channel="yeelight:Wonder:0x000000000335c499:Color"}
Dimmer	l01_color_temperature	"Color temperature"						{channel="yeelight:Wonder:0x000000000335c499:Color_Temperature"}

Dimmer	l02_brightness			"Bright"								{channel="yeelight:Wonder:0x000000000335e030:Brightness"}
Color	l02_color				"Color"					<colorlight>	{channel="yeelight:Wonder:0x000000000335e030:Color"}
Dimmer	l02_color_temperature	"Color temperature"						{channel="yeelight:Wonder:0x000000000335e030:Color_Temperature"}

Dimmer	l03_brightness			"Bright"								{channel="yeelight:Wonder:0x000000000335c161:Brightness"}
Color	l03_color				"Color"					<colorlight>	{channel="yeelight:Wonder:0x000000000335c161:Color"}
Dimmer	l03_color_temperature	"Color temperature"						{channel="yeelight:Wonder:0x000000000335c161:Color_Temperature"}

Powered bad :frowning: Perhaps you need to make a short pause between the teams, have not tried, is the first attempt.

How can I download and install Yeelight binding since the link from Dropbox is not working?

Not working link
wget https://dl.dropboxusercontent.com/u/10102270/org.openhab.binding.yeelight-2.0.0-SNAPSHOT.jar


pi@raspberrypi:~ $ sudo su
root@raspberrypi:/home/pi# cd /usr/share/openhab2/addons
root@raspberrypi:/usr/share/openhab2/addons# wget https://dl.dropboxusercontent.com/u/10102270/org.openhab.binding.yeelight-2.0.0-SNAPSHOT.jar
–2017-04-07 13:29:08-- https://dl.dropboxusercontent.com/u/10102270/org.openhab.binding.yeelight-2.0.0-SNAPSHOT.jar
Resolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)… 162.125.66.6
Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)|162.125.66.6|:443… connected.
HTTP request sent, awaiting response… 404 Not Found
2017-04-07 13:29:08 ERROR 404: Not Found.

Ok problem solved after surfing web. Anyway thank you all for sharing your talent and experience with us.

May I know which site you used to sort it out…thank you

I used this link

wget https://github.com/openhab/openhab2-addons/files/755413/org.openhab.binding.yeelight-2.1.0-SNAPSHOT.zip

I can control Yeelight over HABPanel but still need instructions to make it work over basicui.

2 Likes

Can i use the .zip file in the addons folder or does it need to be compiled?
If yes can somebody share his compiled .jar?

I do not know how it works, but I have /usr/share/openhab2/addons/org.openhab.binding.yeelight-2.1.0-SNAPSHOT.zip

Hello!
How do I know if the light is on or off?
Thank you!