ESPHome nodemcu esp32 with neopixel 2 individual addr. led strips?

Hi,
im trying with 1 nodemcu to control 2 different ledstrip, but im not able to get it working, whenever i have 2 “platform” config under light: its only apply on the “last” platform config?

see below config

light:
  - platform: neopixelbus
    type: GRBW
    variant: SK6812
    pin: GPIO13
    num_leds: 34
  - platform: neopixelbus
    type: GRB
    variant: WS2812
    pin: GPIO12
    num_leds: 100

Error messages? Logs?

1 Like

Try giving them each a unique name:

light:
  - platform: neopixelbus
    name: "Light 1"
    type: GRBW
    variant: SK6812
    pin: GPIO13
    num_leds: 34
  - platform: neopixelbus
    name: "Light 2"
    type: GRB
    variant: WS2812
    pin: GPIO12
    num_leds: 100
1 Like

sorry not replying before now, been troubleshooting is problem, and did find a solution.

i used name: for each light, i just snip it out in this thread :slight_smile:

no errors or logs was raised, the problem i “saw” was that both lights turn on, only when toggle one of the light switch!!

anyways, to solve this problem i needed to use something called method

on the first light:

    method:
      type: esp32_rmt
      channel: 0

and one second light

    method:
      type: esp32_rmt
      channel: 1

my full config look like this:

light:
  - platform: neopixelbus
    method:
      type: esp32_rmt
      channel: 0
    id: ledstrip_lara
    type: GRBW
    variant: SK6812
    pin: GPIO16
    num_leds: 34
    name: "ledstrip Lara's skrivebord"
    effects:
      - pulse:
      - pulse:
          name: "Fast Pulse"
          transition_length: 0.5s
          update_interval: 0.5s
      - pulse:
          name: "Slow Pulse"
          update_interval: 2s
      - random:
      - strobe:
      - flicker:
      - addressable_rainbow:
      - addressable_color_wipe:
      - addressable_scan:
      - addressable_twinkle:
      - addressable_random_twinkle:
      - addressable_fireworks:

  - platform: neopixelbus
    method:
      type: esp32_rmt
      channel: 1
    id: ledstring_lara
    type: GRB
    variant: WS2812
    pin: GPIO17
    num_leds: 100
    name: "ledkæde Lara's skrivebord"
    effects:
      - pulse:
      - pulse:
          name: "Fast Pulse"
          transition_length: 0.5s
          update_interval: 0.5s
      - pulse:
          name: "Slow Pulse"
          update_interval: 2s
      - random:
      - strobe:
      - flicker:
      - addressable_rainbow:
      - addressable_color_wipe:
      - addressable_scan:
      - addressable_twinkle:
      - addressable_random_twinkle:
      - addressable_fireworks:

thanks for replying :wink:

1 Like