← Back to blog

Breaking Free: How I Freed My Yeelight Lightstrip 1S with ESPHome

Why Bother?

Look, I know what you're thinking. The Yeelight Lightstrip 1S already works fine with its app, it even has LAN control. But here's the thing, I bought this strip specifically because it runs on ESP32, and if there's an ESP32 in there, you bet I'm going to flash it with my own firmware.

Call it a compulsion, but I hate depending on someone else's servers and apps when I know there's perfectly good hardware just waiting to be reprogrammed. Plus, ESPHome integration with Home Assistant is just chef's kiss.

Getting Inside This Thing

Opening the controller was way harder than expected. No screws anywhere, just these super tight plastic clips all around. I didn't have the right tools (rookie mistake), so yeah... I broke some plastic on my first controller. Oops.

Inside, I found exactly what I was hoping for, the ESP32 board had all the programming pads exposed: VCC, GND, TX, RX, and GPIO0. Someone at Yeelight clearly knew people like us would be poking around in here.

Wiring It Up

I use a NodeMCU for flashing ESP devices. Connect the NodeMCU's RST pin to GND and boom, it becomes a USB-to-serial programmer. Works great and costs like $3. Pretty useful if you have one lying around. If you already have a NodeMCU running in another project, you can just unplug it, use it as a programmer, then plug it back in, this process doesn't affect the code on the NodeMCU itself.

Super important: The ESP32 needs 3.3V, not 5V. I cannot emphasize this enough. Feed it 5V and you'll have an expensive LED paperweight.

Here's how to wire it:

Obviously, keep the lightstrip unplugged from the wall while doing this.

The ESPHome Config

After setting up a Python venv and installing ESPHome, I wrote up this config:

esphome:
  name: tv-led

esp32:
  board: esp32doit-devkit-v1
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_FREERTOS_UNICORE: y

logger:
  level: DEBUG

api:

ota:
  - platform: esphome

wifi:
  ssid: "YourWiFiName"
  password: "YourWiFiPassword"

output:
  - platform: ledc
    pin: GPIO13
    id: output_red
  - platform: ledc
    pin: GPIO14
    id: output_green
  - platform: ledc
    pin: GPIO5
    id: output_blue

light:
  - platform: rgb
    id: main_led
    name: "RGB LED"
    red: output_red
    green: output_green
    blue: output_blue
    gamma_correct: 0

  - platform: status_led
    id: status_blue_led
    name: "Blue LED Status"
    pin:
      number: GPIO4
      inverted: yes

  - platform: status_led
    id: status_orange_led
    name: "Orange LED Status"
    pin:
      number: GPIO16
      inverted: yes

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO19
      inverted: yes
    name: "Button"
    on_press:
      then:
        - light.toggle: main_led

Ran esphome run my-file.yaml, selected the USB device option, and watched it upload. So far so good.

Of Course Something Went Wrong

After flashing, the status led just sat there with a solid blue light. Not connecting to WiFi, not responding to anything. Pulled up the logs with esphome logs my-file.yaml and saw it was boot-looping with ESP_ERR_INVALID_CRC.

Turns out the eFuse (where the MAC address is stored) was corrupted. Great. Spent way too long googling this until I found other people with the same issue. The fix? Tell ESPHome to just ignore the CRC check:

esp32:
  board: esp32doit-devkit-v1
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_FREERTOS_UNICORE: y
    advanced:
      ignore_efuse_custom_mac: true
      ignore_efuse_mac_crc: true

Finally Working!

Uploaded the fixed config and bam, it connected to WiFi immediately. Home Assistant picked it up right away. Full control over colors, brightness, effects, everything works perfectly.

The physical button still works too, which is nice. And now I can do stupid things like sync it with my music or flash red when my CI/CD pipeline fails. You know, important stuff.

Was It Worth It?

Honestly? For the functionality alone, probably not. The Yeelight firmware is actually pretty decent and already supports local control.

But that's not really why we do this, is it? It's about knowing you have complete control over your own hardware. It's about the satisfaction of taking something closed and making it open. And yeah, it's about spending 5 hours to save 5 seconds of app loading time.

Every ESP-based device is basically asking to be flashed with custom firmware. Once you start, you can't stop looking at every smart device and wondering "but does it have an ESP inside?"

The Yeelight Lightstrip 1S is basically a $25 ESP32 dev board that happens to come with a really nice LED strip attached. When you think about it that way, it's actually a bargain.

Now, if you'll excuse me, I have some unnecessarily complex lighting automations to create. Because I can.

← Back to blog