Cannot get yeelight binding working

How you see what version of OpenHAB you have?

Do you access your openhab via ssh? dpkg --list | grep openhab

Just realize its at the bottom on first page of openhab dashboard

Yeah I found it on dashboard - it is 2.3.0 as well

https://community.openhab.org/t/yeelight-binding/13735/104

Start reading around post 100 or so, others are using different binding to control yeelights. If you must have the yeelight binding it may be best to downgrade your version.

Here is a jar file that will load on your openhab version. I just installed it and verified its in my bindings. Remove the other yeelight jar files and do exact same thing as the first time. No need to add anything to your cfg file or change any permissions. Place jar in addons and restart like before. :grinning:

https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.yeelight/2.4.0-SNAPSHOT/

1 Like

for some reason I have a problem now.
I cannot access my paper UI anymore, it says:

Problem accessing /paperui/index.html. Reason:

Not Found

Also Basic UI has gone.
Access via SSH is still OK - any idea what went wrong?

If you just did a restart it may be that it takes a few min for everything to start back up

I think this is not the reason - it took too long already (min 10 min).
If I open http://openhabianpi:8080 it just shows

HOME BUILDER OPENHAB LOG VIEWER OPENHABIAN HELP

The other icons (like BASIC UI, PAPER UI etc.) are missing :thinking:

Changes to your cfg file? Any change made in that file will override what you do in PaperUI on a restart. I would set everything inside cfg file back like it was and restart.
FYI everything in your addons.cfg should be commented out with a #
There is nothing wrong with setting your config thru the addons.cfg but know that using that file and PaperUI to make changes can cause headaches down the road.

No I did not do any changes on config in the last few minutes.
I deleted tmp and cache folder and restarted now all UIs are visible again.
Now I try your jar file…

Now I can see yeelight binding under Configuration > Bindings - great thanks!

But how can I go further now?

I need to create:

  1. the yeelight *.things config file
  2. the yeelight *.items file

Will the yeelight be the first thing to use with openhab?

No I already use the AVM fritzbox with some power sockets I can switch on/off

Great, you have a reference to items, things, rules, etc… this will be good for getting your yeelights working. You will need to find how they are referenced in openhab then create your thing/item.

Until 6 hours ago I’d never heard of yeelights, my openhab setup is working w/ no issue, I’m helping you to educate myself. Most of the people on this site are awesome and willing to help however they can, but needing help and having someone do everything is two different things. Please don’t take this in a negative way, everyone is here to help but its best if you search and read before posting. Most answers, including this one, came from a search that I referenced in post #23. The title is “Yeelight binding?” it’s in the add-ons section and contains 170 post, all about yeelight. If you have issues after reading thru the post, then ask, I’m sure someone here can assist.

Best of Luck

Hi I understand,

and I try by myself to get the yeelight working - but now I stuck with the deviceID of my LED color bulbs.
The deviceId is needed for the items configuration file - I tried the MAC address already but no luck.
Nowhere I can get information what is the deviceID and where I can get it from.

If you have an idea please let me know, anyway I will try to investigate further…

thanks so far!

Hi,

I now added the yeelight bulb using Paper UI and then took the deviceId from there.
Later I again deleted the yeelight thing created by paper UI to go on with my settings files.

With this I tried to get my *.things and *.items file working.
This is my things-file now

Bridge yeelight:bridge:1 @ "Livingroom" []
{
    Thing yeelight:wonder:1 [ deviceId="0x0000000006f0d32e" ]
}

and this is my items-file now:

Color  YeelightLEDColor  "XiaomiFarbe"  { channel="yeelight:wonder:1:color" } 
Dimmer YeelightLEDDimmer "XiaomiDimmer" { channel="yeelight:wonder:1:colorTemperature"} 

I can see this thing under Paper UI Things with correct item linking.
But it says ‘bridge_uninitialized’. This is due to some parameters missing in the things file first line.
But unfortunately I don’t know what parameters I have to add there - can someone help me?

Thanks…

Color  YeelightLEDColor  "XiaomiFarbe"  { channel="yeelight:wonder:1:color" } 
Dimmer YeelightLEDDimmer "XiaomiDimmer" { channel="yeelight:wonder:1:colorTemperature"}

Other examples I looked at seem to be case sensitive, you can try changing wonder to Wonder along with the others that need to be capitalized. If no success try commenting out the Thing and use example below with item and sitemap only.

Dimmer YeelightLEDDimmer “XiaomiDimmer” {channel=“yeelight:Wonder:0x0000000006f0d32e:Brightness”}
Switch YeelightLEDDimmer_Switch "Xiaomi Switch" {channel=“yeelight:Wonder:0x0000000006f0d32e:Color”}
Color YeelightLEDColor “XiaomiFarbe” {channel=“yeelight:Wonder:0x0000000006f0d32e:Color”}
Dimmer YeelightLED_Color_Dimmer “XiaomiFarbe Color Dimmer” {channel=“yeelight:Wonder:0x0000000006f0d32e:Color_Temperature”}

Sight map:

Frame label="Testing Lights"
{
Switch item=YeelightLEDDimmer
Slider item=YeelightLEDDimmer
Colorpicker item=YeelightLEDColor
Slider item=YeelightLED_Color_Dimmer
}

If this does not work you may need to access the yeelight via cell phone apt. You have to go to the setting of each of the bulb to set the LAN ( or developer) mode. For example if you have 2 yeelights, you have to select 1 first, then choose settings , and there you will see the LAN (or developer) mode. To use, open the app, click on the device. At the bottom of the screen, you see three icons. Click on the right one, there you find LAN control (or developer). Here is a link for how to set and use LAN control with Node-Red:
https://randomnerdtutorials.com/node-red-with-xiaomi-yeelight-rgbw-smart-bulb/
Also a link to the Yeelight developer page:
https://www.yeelight.com/en_US/developer

If your still having issues please provide the model and firmware version of your yeelights.

Hi,

thanks for further help :-).
First question I have is: is it enough to just provide a *.items file?
I thought I need a *.things file as well?

My yeelight LED color bulb I already set to ‘LAN control’ but it does not change anything.
What I wonder is that it works if I add the light bulb using paper UI --> Inbox --> + --> Yeelight Binding.
It starts searching/scanning and finds my Yeelight bulb.

Under Configuration -> Things it appears as:

Yeelight Color LED Bulb ONLINE
Yeelight Color LED Bulb

yeelight:wonder:0x0000000006f0d32e

If I go to Paper UI -> Control I can drive the light bulb using the paper UI controls means I can make it brighter, change color etc…
Basically the Yeelight is working together with openHAB 2 but I want to configure it using the .things/.items files instead of the Paper UI interface.

Now the question is what is different in my yeelight.items file compared to the settings I did using the Paper UI?
Or do I really need a *.things file as suggested in the beginning of this reply?
I tried with this:

Bridge yeelight:bridge:1 @ "Arbeitszimmer" []
{
    Thing yeelight:wonder:1 [ deviceId="0x0000000006f0d32e" ]
}

At least it appears under Configuration -> Things but is says:

UNINITIALIZED - BRIDGE_UNINITIALIZED

I looked into the Log, here what it says:

2018-08-05 16:33:28.407 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'yeelight.things', using it anyway:

Provide a thing type ID and a thing ID in this format:

 <thingTypeId> <thingId>

2018-08-05 16:33:28.426 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'yeelight.things'

But I don’t know what that means :frowning:

Regarding things you have Bridge in your file, but PaperUI does not show Bridge, are you using a Bridge? I think the syntax of things file may be incorrect, normally only [ ] are used not { } brackets. Here’s one of my things as an example:

Thing network:pingdevice:SiPhone [ hostname="xxx.xxx.xx.xx", uses_ios_wakeup=1, uses_arp_pings=1, retry=30, timeout=15000, refreshInterval=60000 ]

Try without any { }'s using just: Thing yeelight:wonder:1 [ deviceId=“0x0000000006f0d32e” ] and see if you continue to get the error. If you indeed have a bridge it still needs to be listed as a thing, such as: Thing bridge:yeelight:1 [ hostname=“your IP or Hostname”, some_other_ parameter, you_might, need_separated, with_commas ] Also what kind of bridge are you using, is it connected to the RPI USB?

Since I am fairly new to OpenHAB and such things I don’t really know if I have a bridge.
To make Xioami Sensors working I used a CC2531 stick and flashed it with a different firmware I got from the internet.
Then I put it into my RaspPi and finally I got a CC2531EMKCoordinator:

Is this a bridge?