Cannot get yeelight binding working

Hi,

I have a few yeelights LED color bulbs and wanted to control them by OpenHAB 2.
But I cannot get the yeelight binding into my OpenHAB.
First I looked under the available addons inside OpenHAB Paper UI.
But ‘yeelight’ is not listed there. Then I added ‘yeelight’ to my addons.cfg file hoping it would install it but it doesn’t.
BTW yeelight is already listed in github openhab addons - maybee I have to update my addons-list somehow but I don’t know how to do that.

How can I add yeelight to my bindings?

Thanks a lot!

If its a jar file you can unzip it and place the jar file in: /usr/share/openhab2/addons
Then restart Openhab2 sudo /etc/init.d/openhab2 restart

Hi H102,

thanks for quick reply, but where do I get the jar file from?

https://github.com/openhab/openhab2-addons/issues/3665

I’m reading about it now.

org.openhab.binding.yeelight-2.4.0-SNAPSHOT.zip or use this (updated Oct 15 2018)

https://openhab.ci.cloudbees.com/job/openHAB2-Bundles/lastSuccessfulBuild/org.openhab.binding$org.openhab.binding.yeelight/

“Just rebuilt it. Unfortunately Github did not support upload of the .jar file, so I changed the extension to .zip. You have to rename it again with .jar extension (on Windows you have to enable the displaying of extensions in the Explorer for that).”

I don’t have yeelight’s to test with but some functions seem to work with certain versions of opanhab2.

Hi H102,

the link ‘org.openhab.binding…’ you provided gives just ‘Website not available’.
But I found a file on github now:

https://github.com/openhab/openhab2-addons/blob/master/addons/binding/org.openhab.binding.yeelight/lib/yeelight.jar

is it the correct one?

Not sure, but it won’t hurt to try. Place it in /usr/share/openhab2/addons then restart openhab. You may want to remove or comment out yeelight in your addons.cfg first.

I placed the file where you told me.
Is it correct that there is only my addon inside?

I also remove yeelight from addons.cfg file and restarted OpenHAB 2.
But unfortunately yeelight binding is still not there :frowning:

Are you looking for it in PaperUI binding addon? If so from PaperUI click Configuration then click bindings. This will show all your bindings installed. The way you installed yeelight you wont find it like when searching for other bindings because its already installed.

Yes I looked in Configuration > Bindings.
But I only see my already installed bindings - yeelight is not present :frowning:

I’ll try and add the binding to my openhab. May take a few min. multi-tasking :neutral_face:
After placing the jar file did you sudo /etc/init.d/openhab2 restart

yes I did - I also restarted my raspPi 3B+ - but still no luck

cd /usr/share/openhab2/addons
then type ls -al
You may need to grant the file permissions.

currently it is set to -rw-rw-r–
what permissions are necessary please?

I tried chmod 755 on that jar file and restarted OpenHAB service.
But binding is still not there :frowning:

It didn’t show on my bindings either. Let me see if I can find whats going wrong.

great thanks - I will wait…

1.x bindings don’t show up at all in PaperUI, only 2.x bindings
1.x bindings need to be configured via *.cfg files. I guess you will find the syntax for the cfg file at the download place.

OK thanks, I will try that…

Hi,

I searched the internet but could not find any help on the cfg file.

Did you come any further?

Think so I’m rebooting now.

2018-08-04 13:25:33.541 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-yeelight': Error restarting bundles:

	Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="0.10.0.oh230"; osgi.identity="org.eclipse.smarthome.model.script.runtime"; singleton:="true" [id=139] STARTED [STARTED]

Still working on it :unamused:

Here is what I think is the newest yeelight download but it didn’t work for my openhab 2.3

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