ESPHome on Twinkly Chrismas Lights

Hi, I bought some twinkly chrismas lights and rushed into flashing it with ESPHome (thought I could find or make a template later) however I’ve been stumped by it only having 2 pins to control the 600 addressable LEDs, I’ve looked into the NeoPixelBus and FastLED components but have no idea how these work or which pins control the LEDs or whether those components are the correct ones for the LEDs. I would really appreciate if someone could help me out with a template here, these cost a fortune and I didn’t copy the flash from the ESP before erasing it :expressionless:

this is the configuration I’ve got so far, which does nothing

# settings
esphome:
  name: fairy-lights
esp32:
  board: esp32dev
  framework:
    type: arduino

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  use_address: 192.168.2.222
  domain: .iot

logger:

api:
  encryption:
    key: !secret api_key

ota:
  password: !secret ota_password

web_server:
  port: 80

# configuration

# Use the button as a sensor.
binary_sensor:
  - platform: gpio
    pin:
      number: GPIO34
      inverted: true
    name: "Button"

light:
  - platform: fastled_spi
    chipset: WS2801
    data_pin: GPIO19
    clock_pin: GPIO18
    num_leds: 600
    rgb_order: BRG
    name: "FastLED SPI Light"

Red connectors = 24v input
2x white connectors split the output to 2 sets of (presumably) 300 leds



Mabe you can try to use WLED as it is fully integrated into HA. Normally an addressable LED has 3 wires.

you can use the web installer.

I’m pretty sure the lights are controlled with i2s, SPI or something similar, clockless fastled only needs 1 data wire FastLED Light — ESPHome.
i will see if WLED gets me anywhere but I would prefer esphome

only managed to get wled to control the status led. the main lights remain stuck off. the packaging on the box suggests that they are addressable leds, however I believe they may be h bridge leds. i flashed it back with esphome and tried:

I tried a number of combinations of pins and couldn’t get the lights to turn on.

any progress ? I’m frustrated with the Twinkly lights and its app, in my opinion the most garbage smart home product. I’m thinking about trashing them and buying the lidl zigbee ones as soon as they become available

gave up on this - lights cost me almost $500 (AUD) so unless someone knows the pins of the controller and how the LEDs are controlled my lights are dead :frowning:

Wow that’s a lot. Next year I am going to try this project and replace my lights. I think they look nice and it should be under $200 AUD

Are you sure with your chipset?

reason I asked is you said this above is it a fastled_clockless

and have you tried to add a effect.

light:
  - platform: fastled_spi
    chipset: WS2801
    data_pin: GPIO19
    clock_pin: GPIO18
    num_leds: 300
    rgb_order: BRG
    name: "FastLED SPI Light"
    effects:
      - addressable_rainbow:
          name: Rainbow

this shows the supported chipset.

Below is some more code that may help

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO34
      inverted: true
    name: "Button SPI Light"
    on_press:
      then:
        - light.toggle: 
            id: fastled_spi_light

light:
  - platform: fastled_spi
    chipset: WS2801
    data_pin: GPIO19
    clock_pin: GPIO18
    num_leds: 300
    rgb_order: BRG
    id: fastled_spi_light
    name: "FastLED SPI Light"
    on_turn_on:
      then:
        - light.turn_on: 
          id: fastled_spi_light
          effect: Rainbow
    effects:
      - random:
      - flicker:
      - addressable_rainbow:
          name: Rainbow

Bit more research and I think Twinkly uses proprietary PLC

I don’t understand why you would want to flash twinkly lights with WLED or similar.
The main point of the Twinkly is that they are mapped on the tree, you can’t really do that with WLED or ESP-Home as far as I know.
It would probably be cheaper to just get an ESP and cheap LEDs and create the same thing from scratch than buy Twinklys and essentially (in my opinion) dumbing them down to standard addressable LEDs.

points to this, which some of you might find useful:

https://xled.readthedocs.io/en/latest/

1 Like

at least with mine, the controller works like garbage its slow the mapping doesn’t work and it flickers ever few seconds, but I don’t want to trash all my lights just because the controller is bad

Your better off just learning how to flash an esp board and buy some ws2811 or similar lights. If you buy stuff thats proprietary or worse, a foreign startup company, you probably arent going to have good results. You can buy pre-flashed led controllers with wled for a few dollars and then go crazy doing what YOU want with YOUR lights instead of operating within whatever limits the proprietary controller will allow you to do with what they consider their product even though you paid for it.

Thanks for your reply,
Yeah I already know how to flash a esp and u already have many in my home
But these are lights I got as a present from my girlfriend and the lights themselves are fine, it’s just the controller thats dogshit
And I also couldn’t find any,. No matter what the price lights that looked the same like these, only big Ugly faryligh or smaller also ugly strip lights

Right… Thats the purpose of flashing an esp… Replace the dog shit controller with an esp based controller running wled or any of thr similar firmware options that arr abailable. This is a simple fix here.