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.

2 Likes

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

2 Likes

Hello friend,

Can you do for yeelink.light.ceiling3 device please?

Could you disassemble/open your ceiling lamp and provide some high resolution pictures of the mainboard? Are you able to access the device via python-miio / miiocli to retrieve the device info my

miiocli device --ip <ip> --token <token> info

The value of the key hw_ver is important. If the device a mediatek based device (MTK) it cannot be used with esphome without replacing the microcontroller. If the device is ESP32 based you have luck!












There is few pictures, it’s mediatek , what can I do with ?
I can read the IP and the token from android app

The first picture shows a Mediatek microcontroller. This microcontroller cannot be used with Esphome. Some people have replaced the white daughter board with a wemos d1 mini. It’s a bit tricky and you need some soldering skills and a multimeter to get it done.

I found this on GitHub, ( Add YLXD05YL and YLXD01YL support (Mediatek devices) · Issue #10 · syssi/esphome-yeelight-ceiling-light · GitHub ) I am not sure about this. I seen the last post and it’s working but not complete, but if I make a mistake it’s can be burn down.

Yes! Please be super careful and think about it twice. :slight_smile: