Use Xiaomi Yeelight Dimmer with Openhab

Hello OpenHAB Community,

i would like to connect the Xiaomi Yeelight Dimmer Switch with my Openhab. Is this Possible? Or are there any Alternatives?

https://m.banggood.com/Xiaomi-Yeelight-YLKG08YL-Smart-bluetooth-Wireless-Wall-Pasted-Dimmer-Light-Switch-p-1428204.html?akmClientCountry=DE&currency=USD&createTmp=1&aff_key=61k3_k7d1m&utm_source=pepper&utm_medium=mydealz&sscid=61k3_k7d1m&cur_warehouse=CN&utm_content=rambo

MIIO Docs

miio:basic For several basic devices like yeelights, airpurifiers. Channels and commands are determined by database configuration

Could this be what you are looking for?

This Binding is for Network Devices, but the Dimmer is working over Bluetooth.

Oops ¯\(ツ)
Well then, I have no clue :slight_smile: sorry

I think I finally found a workaround for the paste version of this switch to work with openhab. In a totally unrelated YouTube video a guy connects this switch to his gateway mode security camera, stating that it can also be paired with any gateway devices of the Xiaomi ecosystem. The gateways in turn are already discoverable by openhab through the current binding, so there’s that. I’ll let you know more as soon as I get my hands on a gateway :slight_smile:

@TenshiKiri any luck with using this dimmer with OpenHab?

Well, I doubt gateway can help if the device can work with limited set of Yeelight lamps only. Please correct me.
Investigated state of adopting Xiaomi Yeelight Dimmer for any smart home systems. Came across one attempt to reverse engineer its’ protocol. Enthusiast came to a conclusion that building own firmware is the way with less effort => https://github.com/nccchirag/yeelight-ble-rotary-dimmer/issues/1 . And he’s thinking of replacing Bluetooth controller with ESP32. At this point this seems a dead end for any close future.
Let me describe my case hoping it can help people make any recommendations on alternatives.
I have audio multi-room setup with LMS on NAS, zoned players in every room (ceiling speaker driven by Airplay and squeeze players on dedicated Raspberry + amplifiers). My family used to control players with Android phones and Echo devices, which is OK. With Openhab and physical controllers I’d love to add a little comfort.
Current setup cons:

  • voice doesn’t work when music is loud and/or in shower.
  • control accessibility for guests/old or young people is limited at best.

Thus I consider adding physical control with knob as complimentary, if not primary function. Xiaomi Yeelight Dimmer might have provided the following:

  • more than sufficient functionality to control volume, playback, favorites(streams) navigation with it’s click/dbl click/rotate/click + rotate/long press.
  • portability of Paste version (may change location as needed over time, no wires)
  • design
  • low cost (12$)

Found solution, all I needed is:

And you can bind Yeelight Dimmer too.

It just Ikea remote does remind player control look and provides more options:

  • up/down for volume (already verified with a quick test)
  • on/off for Play/Pause, or On/Off
  • left/right for Play Next/Play Previous
  • right/left buttons press&hold events to navigate Favorites, for example, or switch playlists
    and then there are press&release events, and both events available for up/down buttons too. So more ideas to implement.

One other idea is to make it universal, so I could tell “Alexa, flip kitchen remote”, and I can control lights back again.

I’ll write a post when implementation is complete.

Hey @Bohdan_Kadykalo, some time has passed but i try to ask anyway: does the Yeelight Dimmer in the end work for you ?
Thanks in advance!

It is supported by Deconz just like Ikea remotes which I have bought instead. I do have to re-pair them from time to time though. That’s may be related to the fact some of them may not be used for several days or weeks. And then power demand is a little higher I expected, already changed a batteries. On the other hand, this is my first experience with Zigbee devices, might not be critical at all. On automation side, everything works as designed, I’m collecting all the metrics too. What’s remaining is bind long presses. Openhab is quite involving, unfortunately, will give a try version 3 and then fully complete the setup I planned.

@Bohdan_Kadykalo so you are saying that you found a solution to the initial requirement, that is to have a dimmer type remote device to control music?

but not a solution to have the Yeelight dimmer remote work right?

Otherwise I must have misunderstood something, since I have the Yeelight dimmer, it is bluetooth, and the Deconz binding is working on a Zigbee network.

Yes, that’s right. I described the closest alternative solution at the time of writing. With time everything changes. Please share your experience.

cool thank you for the response.