Control NeoPixel Ring with ESP32

I’m trying to control a NeoPixel Ring (Link) containing 16 x 5050 RGBW LEDs.

I assumed that I would be able to by using an ESP32 programmed with ESPHome.
After connecting the NeoPixel ring to the appropriate ESP32 pinouts (Gnd, 5+ and GPIO22) I tried the following code within ESPHome but it’s not working at all:

light:
- platform: neopixelbus
  type: RGBW
  variant: SK6812
  pin: GPIO22
  num_leds: 16
  name: "NeoPixel Light"

I’ve also tried an alternative variant (WS2812). Again without any noticeable control - not even the on/off action.

I’d really appreciate any help to fully control the NeoPixel ring.

Logs please

As requested here is the ESPHome log:

INFO Reading configuration /config/esphome/neo.yaml...
INFO Starting log output from neo.local using esphome API
INFO Successfully connected to neo.local
[10:52:58][I][app:102]: ESPHome version 2022.10.0 compiled on Oct 21 2022, 19:49:55
[10:52:58][C][wifi:502]: WiFi:
[10:52:58][C][wifi:360]:   Local MAC: 40:91:51:9B:3E:60
[10:52:58][C][wifi:361]:   SSID: 'NoT'[redacted]
[10:52:58][C][wifi:362]:   IP Address: 192.168.20.21
[10:52:58][C][wifi:364]:   BSSID: F6:9F:C2:AA:66:4D[redacted]
[10:52:58][C][wifi:365]:   Hostname: 'neo'
[10:52:58][C][wifi:367]:   Signal strength: -72 dB ▂▄▆█
[10:52:58][C][wifi:371]:   Channel: 6
[10:52:58][C][wifi:372]:   Subnet: 255.255.255.0
[10:52:58][C][wifi:373]:   Gateway: 192.168.20.1
[10:52:58][C][wifi:374]:   DNS1: 1.1.1.1
[10:52:58][C][wifi:375]:   DNS2: 8.8.8.8
[10:52:58][C][logger:275]: Logger:
[10:52:58][C][logger:276]:   Level: DEBUG
[10:52:58][C][logger:277]:   Log Baud Rate: 115200
[10:52:58][C][logger:278]:   Hardware UART: UART0
[10:52:58][C][light:104]: Light 'NeoPixel Light'
[10:52:58][C][light:106]:   Default Transition Length: 1.0s
[10:52:58][C][light:107]:   Gamma Correct: 2.80
[10:52:58][C][captive_portal:088]: Captive Portal:
[10:52:58][C][mdns:100]: mDNS:
[10:52:58][C][mdns:101]:   Hostname: neo
[10:52:58][C][ota:089]: Over-The-Air Updates:
[10:52:59][C][ota:090]:   Address: neo.local:3232
[10:52:59][C][ota:093]:   Using Password.
[10:52:59][W][ota:099]: Last Boot was an unhandled reset, will proceed to safe mode in 8 restarts
[10:52:59][C][api:138]: API Server:
[10:52:59][C][api:139]:   Address: neo.local:6053
[10:52:59][C][api:141]:   Using noise encryption: YES

Try

    type: GRB
    variant: WS2811

Hi,
Thanks for your suggestion.
These settings result in one white LED & one persistently green despite changing the colour palette. Neither LED could be switched off via the ESPHome settings.
The logs are:

INFO Reading configuration /config/esphome/neo.yaml...
INFO Starting log output from neo.local using esphome API
INFO Successfully connected to neo.local
[22:21:51][I][app:102]: ESPHome version 2022.10.0 compiled on Oct 23 2022, 22:12:48
[22:21:51][C][wifi:502]: WiFi:
[22:21:51][C][wifi:360]:   Local MAC: 40:91:51:9B:3E:60
[22:21:51][C][wifi:361]:   SSID: 'NoT'[redacted]
[22:21:51][C][wifi:362]:   IP Address: 192.168.20.21
[22:21:51][C][wifi:364]:   BSSID: 7E:8A:20:81:FD:D7[redacted]
[22:21:51][C][wifi:365]:   Hostname: 'neo'
[22:21:51][C][wifi:367]:   Signal strength: -54 dB ▂▄▆█
[22:21:51][C][wifi:371]:   Channel: 11
[22:21:51][C][wifi:372]:   Subnet: 255.255.255.0
[22:21:51][C][wifi:373]:   Gateway: 192.168.20.1
[22:21:51][C][wifi:374]:   DNS1: 1.1.1.1
[22:21:51][C][wifi:375]:   DNS2: 8.8.8.8
[22:21:51][C][logger:275]: Logger:
[22:21:51][C][logger:276]:   Level: DEBUG
[22:21:51][C][logger:277]:   Log Baud Rate: 115200
[22:21:51][C][logger:278]:   Hardware UART: UART0
[22:21:51][C][light:104]: Light 'NeoPixel Light'
[22:21:51][C][light:106]:   Default Transition Length: 1.0s
[22:21:51][C][light:107]:   Gamma Correct: 2.80
[22:21:51][C][captive_portal:088]: Captive Portal:
[22:21:51][C][mdns:100]: mDNS:
[22:21:51][C][mdns:101]:   Hostname: neo
[22:21:51][C][ota:089]: Over-The-Air Updates:
[22:21:51][C][ota:090]:   Address: neo.local:3232
[22:21:51][C][ota:093]:   Using Password.
[22:21:51][C][api:138]: API Server:
[22:21:51][C][api:139]:   Address: neo.local:6053
[22:21:51][C][api:141]:   Using noise encryption: YES

The docs on the web page say they are rgbw and either WS2812B or SK6812. Looking at the esphome docs, maybe WS2812X is the right one?

Thanks for this suggestion. You are correct that the NeoPixels are RGBW - hence my original type & variant choices.
I have just tried changing the variant to WS2812X - the result being a single white LED permanently on.

I’m beginning to think either an ESP32 isn’t capable of controlling these NeoPixels (Signal timing requirements?) or there is something wrong with the device.

You could always flash WLED to test.

Thanks Nick.
I’ve also tried WLED & all the obvious settings - again with no success so I’m now taking the problem up with the supplier.

1 Like