Connecting Yeelight LED with Openhabian

Hi, I am trying to connect my Yeelight color LED’s with local Openhab at my home. Is there anyway I can get the Token for each LED to connect?

Yeelight work with openhab through local network, I don’t know what does the TOKEN mean?

The device token is needed to make Yeelight work with OpenHab as, contrary to other devices such as Xiaomi Gateway, the token is hidden.
It was still possible a few month ago to get the token by extracting the database of the MiHome app from your Android device. However, it looks like the token is not anymore accessible from here either :confused:

I am also interested to know how to get the token to make my new Yeelight work with OpenHab

1 Like

any news about this topic?


I managed to connect my lights with OpenHAB. Though I have issues (this is why I came here in the first place), this is what I have done:

  1. screw the bulb into place, power on.
  2. open yeelight app and find new device, add it.
  3. (optional) rename it
  4. wait for a couple of minutes.
  5. open this bulb in yeelight app and see a button with a tiangle in bottom-right corner. Press it.
  6. panel should slide up from the bottom border. If it does not have “LAN Control” button, wait for some more time, repeat.
  7. once lan control is enabled, open openHAB and go to inbox
  8. yeelights will be detected there if machine running openhab is on the same network as the bulbs
  9. add them, rename them as things. When you see details, DeviceID (the token you need) is there. There is no need for anything more.
    Then you can set items in any way you like and start experimenting. You will fail, however, since the binding can’t control the bulb precisely - you can set hue and saturation at once, but you have to make another call to adjust brightness (despite what the binding says). Also, calls to turned off (by software, not by power switch) bulb will be reported as successful, yet no change will have been made. This is because afaik yeelight protocol lets you set HSV instead of HSB values and ignores calls to switched off bulbs.

Hi…I am running openhabian2.2 on a raspberrypi3, that is associated through LAN to my organization.

I duplicated the coupling compress record to the addons-envelope, and it shows.

I attempted to add another thing, however it is extremely unlikely to indicate some IP or token.

Possibly that is the reason it actually shows “Disconnected” while the bulb is running (Color LED Bulb).

In the YEELIGHT App, I set the LAN mode (is it equivalent to troubleshoot mode?). However, I can’t make it run.

Has anyone made an instructional exercise?

order pcb

No, LAN mode is so that you can control if by sending commands from your LAN, i.e. from your PC etc… see the developer documentation document.