Add support Yeelight ESPHome

I’ve opened a topic under “Hardware” here at the forum where I am trying to open up the LAN control function that Yeelight suddenly has shut down on demand from Xiaomi. I do not have much coding experience but have been able to pull the FW from my bslamp2. Is it possible to add ESPHome support for this device?

1 Like

If you can upload firmware all you need to do is trace out the GPIOs and use the existing ESPHome light integrations to define a yaml file for it.

Thank you for literally shining some light at this, Tom! I’m fairly new to the whole ESPHome-scene and I’m still trying to wrap my head around yaml… Do I understand you correctly when I think that you suggest reading the GPIO setup from the firmware and translate this over to the light integration/yaml?
When I’m looking at the original FW I think there are several reasons to not continue using it, but there is some BT and HAP-integrations that would seem interesting to keep going. But this is way over my head and calls for someone with insight I don’t have…

Edit; I see that you possibly meant to just trace the gpio’s from the chip to the wires going to the RGBWW(which I guess that we are dealing with considered the six wires)

Not even that. Physically trace the LED connections to the GPIO pins that’s all you need.

You could not reuse any of that firmware to create a Yelight integration for ESPHome anyway as it is covered by copyright.

Not sure what sort of light it is, RGB, RGBW, addressable, …etc but it will be one of these:

1 Like

Thank you very much! I have some reading to do I see. And since the lamp isn’t where I’m at right now I will be itching to fiddle with it all :grin:
I know that there is quite a lot of irritated people with different kinds of lamps/bulb after this move by Yeelight and Xiaomi that broke their HA setup. I welcome you all to figure out ways to find good solutions with ESPHome and share your findings!

Well, in fact it turned out to be BSRGBWW.
Of course BS stands for BedSide here…
The LED circuitry was quite different from anything that I encountered before, but I managed to tame it.

Next to the LEDs, there are also lighted touch buttons and a slider on the from panel. These communicate over I2C with the ESP32.

All this is in a working alpha state right now.
The custom component can be found in my repo:

More details can be found in the thread that was mentioned in the opening post.

1 Like

I wrote some esphome yaml files for a few yeelight devices:

1 Like