syssi / esphome-yeelight-ceiling-light

ESPHome custom firmware for some Yeelight Ceiling Lights
Apache License 2.0
149 stars 22 forks source link

Add explicit support for YLXDD-0033 #71

Closed Fienberber closed 10 months ago

Fienberber commented 1 year ago

I flashed my YLXDD-0033 with espHome using the same pinout as the yeelight.light.ceil20 config. I figured out I'll share it if some people want to flash as well.

Only tested with two YLXDD-0033. but the YLXDD-0030 and YLXDD-0034 use the same pcb. I'm pretty sure it'll work.

On my unit It was required to pull the enable pin to 3.3v I wanted to share it as well.

surfaceflinger commented 10 months ago

might be a bit offtopic but how exactly do yeelight model names work? should i expect A2101C550/YLXDD-0016 to work just like it did for you on YLXDD-0034?

syssi commented 10 months ago

Yes. Most of the time the daughter board is equal. Just the number of LEDs, LED driver and/or the power supply is different but there is no guarantee IMO. Some photos would be helpful for comparison.

surfaceflinger commented 10 months ago

Thanks, I'll be getting it soon - if everything works our for me I'll PR explicit support too

helgek commented 8 months ago

@Fienberber I'm trying to flash YLXDD-0034. I've already successfully flashed five other Yeelights before but unfortunately with this one I'm not able to start the serial connection.

The lamp itself works fine and I could set it up normally with the original firmware, so there's no indication for technical issues.

I'm using Sensepeek PCBite to flash instead of soldering which also avoids any potential soldering damage to the board.

Following your instructions I tried the following connection layout (in addition I tried also swapping TX and RX and I also tried connection 3.3V to the original 3.3V pin) :

image

I hope I understood the instruction "When flashing the YLXDD-00xx series you'll need an external 3.3V power supply and pull the enable (EN) pin to 3.3V." correctly.

Any additional suggestions are highly appreciated, thank you!

helgek commented 8 months ago

After learning a bit more about how the esp32 works I've adjusted my above connection setup a bit:

image

With this configuration I can see that the ESP32 fires up from how the LEDs on the USB UART act, there's some input and output happening through RX and TX ports but unfortunately I can't access the flash memory esptool like I was able with the other Yeelight/Xiaomi lamps I flashed before.

In some posts/discussions I read that one may have to delay the 3.3V on the EN pin (e.g. https://owenduffy.net/blog/?p=21574). I tried to manually pull the EN pin shortly after firing up the UART but this also didn't help.

Will be very happy if someone with better understanding of ESP32 could help me. Thank you!

p1otr commented 8 months ago

I used test points instead of connecting directly to ESP32. To flash it, I had to connect TP3 (GPIO0) with GND (and I think EN with 3V3 but I'm not sure of that) TX is TP5 (GPIO1) and RX is TP4 (GPIO3)

helgek commented 8 months ago

Thank you so much for your quick and helpful response @p1otr ! I eventually managed to flash the ESP32 using the test points on the backside but I only had success after also switching the UART device and maybe also one of the cables I used was a problem for the serial transfer. So maybe I could also have been successful flashing directly on the ESP32 but I wasn't curious enough to find out.

I connected 3.3V to both the 3.3V pin and the Enable pin at the same time. Fortunately no extra electronic parts were needed regarding the connection to the EN pin.

On my YLXDD-0034 board the test points were labeled as follows:

TP1 = EN 3.3V GND (there are two GND test points but only one of them actually is connected to the three GND pins on the ESP32!) TX RX IO0

Thank you again, I had spent two nights with this while I had expected this to be a quick exercise after having already done this now several times with other lamps.

syssi commented 3 months ago

Could one of you (@Fienberber @surfaceflinger @helgek) tell me the YAML configuration you are using for your lamp? The mentioned config (yeelight.light.ceil20) above doesn't exist. Is my guess here #86 correct?

Fienberber commented 3 months ago

I'm referencing this config file from the main branch. Hope it helps