ESPHome LED Light Flashing Seemingly Not Working

I have bought a ‘Lepro’ LED ceiling light from (Amazon in part because there was a review where someone mentioned a guide online that details how to flash this model with ESPHome here.

I haven’t used ESPHome before so this is all new to me. I have followed the guide and soldered the pins accordingly and installed the ESPHome addon. For flashing I have two options: 1) flashing from ESPHome within Home Assistant and 2) flashing via the https://web.esphome.io/ website.

When flashing, I have tried various configs but the latest I tried was a bare bones version just to try to get it on the network:

esphome:
  name: test
  platform: ESP8266
  board: esp01_1m
  
wifi:
  ssid: Millenium_Falcon
  password: [redacted]
  
  ap:
    ssid: "Hotspot"
    password: ""

captive_portal:

web_server:
  port: 80

When I try to flash via the ESPHome addon it seems to work as I get this:

image

Followed by this:

image

Then I disconnect the Serial Adapter and power up the light via the mains but it never connects to the Wi-fi and it never broadcasts its own fallback SSID. I tried this loads of times with varying changes to the config and the situation never changes. When I use the esphome.io website flasher with the same config it goes from Preparing… to Installed instantly so I am not convinced if it is actually doing anything / getting as as far as the ESPHome Addon. If I try the PREPARE FOR FIRST USE option on the website that does bring up the Installing message but, again, nothing seems to happen afterwards (although I am not 100% what this should do).

I also have two serial adapters so have tried them both with no change in the outcome.

I wondered if the pins were wrong but if I switch the RX and TX pins around it fails completely with an error so it seems like the ESPHome Addon thinks it is sending the data to the chip OK.

If anyone has any ideas it would be greatly appreciated as I am stumped now!

Cheers

Are you disconnecting gpio0 and ground adter trying to flash?

I did see mentions of this but I thought this would be replicated by powering off the Serial Adapter. On a few tests I disconnected the the pins from the adapter as well. Although as I type this the thought occurs that I have never disconnected GPIO0 and Ground from each other…I have soldered them together joining another cable and that cable then connections to GRN on the adapter.

Should I completely remove the GPIO0 and GRD connections?

Cheers

Yes, connecting those 2 pins puts your esp into flashing mode. It won’t connect to your WiFi in this mode

What an absolute plonker. Yes you are spot on! I have just disconnected one of the pins, connected to mains, and now it is joining the WiFi!

I am so glad it was an obvious and easy solution.

Thanks dude.

1 Like

We all learn from our mistakes. May they all be as easy to learn from as the above

1 Like

Yep. Grounding gpio0 puts it in boot mode which is quite different from “normal mode”. It will just keep turning on in boot mode untill you disconnect 0 and Gnd.

1 Like

I have this lamp successfully flashed with ESPHome, but I can’t get all of the colours to work like the factory firmware. Does anybody have a working YAML file?

I’m currently using:

output:
  - platform: esp8266_pwm
    id: output_red
    pin: GPIO4

  - platform: esp8266_pwm
    id: output_green
    pin: GPIO12

  - platform: esp8266_pwm
    id: output_blue
    pin: GPIO14

  - platform: esp8266_pwm
    id: output_warm_white
    pin: GPIO13
    
  - platform: esp8266_pwm
    id: output_cold_white
    pin: GPIO5

light:
  - platform: rgbww
    id: light_rgbww
    color_interlock: true
    name: "Bathroom Light"
    red: output_red
    green: output_green
    blue: output_blue
    warm_white: output_warm_white
    cold_white: output_cold_white
    cold_white_color_temperature: 4500 K
    warm_white_color_temperature: 2700 K
    restore_mode: RESTORE_AND_ON

I used the config that the John Beadon guy (credit where credit is due) provided in his blog post:

output:
  - platform: esp8266_pwm
    id: output_r
    pin: GPIO4
  - platform: esp8266_pwm
    id: output_cw
    pin: GPIO5
  - platform: esp8266_pwm
    pin: GPIO12
    id: output_g
  - platform: esp8266_pwm
    pin: GPIO13
    id: output_ww
  - platform: esp8266_pwm
    pin: GPIO14
    id: output_b

light:
  - platform: rgbww
    color_interlock: true
    name: ${friendly_name}
    red: output_r
    green: output_g
    blue: output_b
    warm_white: output_ww
    cold_white: output_cw
    cold_white_color_temperature: 5700 K
    warm_white_color_temperature: 3000 K

I notice that there are some differences with your config. This one seems to be working fine for me. Giving me the same colours as on the stock firmware, etc.

1 Like

Thanks. Tried that and it’s the same - I can’t get any green, for example. Maybe I need to flash it again.

Funny you say you are now having this issue as I had a very similar thing so I may have a solution for you…

When I first tested the light post flashing I could not get red to work but all other colours worked much like yours. I tried changing the config in various way are re-flashing but no dice. The only thing I could think that it was a connection issue with the LED circuit board connector or something. In trying to adjust that I ended up breaking it completely. i.e. no lights came on at at all. I had to do some careful testing with it on the mains, I picked up the circuit board and was just moving it around, pushing the connector against the board and eventually the LEDs just came back on in a certain position (still no red). This concluded for me that the issue was likely dodgy soldering/connection between this connector pins and the circuit board.

Not sure about yours but from when I first dismantled the light and disconnected the LED circuit board I noticed that the connector on the underside of the board was a bit loose/not stuck down completely. To attempt to resolve I first superglued the connector to the board so it wouldn’t move anymore but I still had no LEDs working. Then I used a screwdriver to scratch off some of the coating of the circuit board strips next to each soldered pin and then soldered the pins to the strip (apart from Blue as this is right next to a resistor) so I just soldered from the pin to the resistor. To be honest I didn’t expect this to work and thought I will probably be buying another light but when I powered it on after soldering amazingly I had 4/6 colours working. I then did a bit more soldering and boom! I had all colours working again. I only did this yesterday so it’s funny you are doing the same.

Hope this helps you!

1 Like

That’s really helpful, thank you! I’m definitely starting to question my soldering so I’ll crack it open and give it another (better) look.