SOLVED: Neopixel bus light incorrect colours

I can’t get this to work properly on a ESP8266 NodeMCU with an AdaFruit NeoPixel 16 LED ring which uses WS2812 LEDs. There is also a DHT11 temperature/humidity sensor connected which is working perfectly.

When controlling the LEDs from the hassio front end using the colour wheel, the bus is obviously working as it will brighten and dim using the slider, and it will turn the LEDs white when the centre of color wheel is selected, but it’s only turning on 12 LEDs, and they are all the wrong colour when anything other than white is selected. Some of the effects I’ve added work, but again all the colors are wrong.

Tried BIT_BANG and DMA with the same result using pin . Tried a few combinations of RGB order but didn’t seem to have any effect. Also tried the fastLED library (set to NEOPIXEL) but very similar result. Not sure how to debug! The photo shows no effect and blue selected on color wheel.

I forgot to add my ESP YAML file! Here is the section for the neopixels

light:
  - platform: fastled_clockless
    chipset: NEOPIXEL
    pin: GPIO3
    num_leds: 16
    name: "NeoPixel Light"
    effects:
      - addressable_scan:
      - addressable_color_wipe:
      - addressable_rainbow:
      - addressable_fireworks:
          name: Fireworks Effect With Custom Values
          update_interval: 32ms
          spark_probability: 10%
          use_random_color: false
          fade_out_rate: 120

In your code have you defined the number of led’s
You may also have to define the RGB order to get correct colours

Thanks. Solved it. The ring has a white LED which I didn’t realise, went back to the Neopixel bus library and set type to “GRBW” and that fixed the problem! All working now.

Here’s the YAML

light:
  - platform: neopixelbus
    type: GRBW
    pin: GPIO3
    num_leds: 16
    variant: WS2812
    method: ESP8266_DMA # ESP8266_UART0
    name: "NeoPixel Light"    
    effects:
      - addressable_scan:
      - addressable_color_wipe:
      - addressable_rainbow:
      - addressable_fireworks:

I have the same problem. NodeMCU, WS2812 Adafruit 16 pixel ring. I used your same YAML and I’m having the same issues. Selecting a color sets random colors. Dimming it just shuts off some pixels. My YAML:

esphome:
  name: nightlight
  platform: ESP8266
  board: nodemcuv2
  esp8266_restore_from_flash: true

wifi:
  ssid: xxxx
  password: xxxx

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: xxxx
    password: xxxx

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
 
light:
  - platform: neopixelbus
    type: GRBW
    pin: GPIO3
    num_leds: 16
    variant: WS2812
    method: ESP8266_DMA  
    name: "nightlight"    
    effects:
      - addressable_scan:
      - addressable_color_wipe:
      - addressable_rainbow:
      - addressable_fireworks:

Hi,

I had the exact same issue, but the couldn’t find the fix for this issue here.
After a while fiddling around i tried the invert option, and now it works like a charm.

light:
  - platform: neopixelbus
    type: GRBW
    pin: GPIO3
    variant: SK6812 # the 800KBPS  is also fine
    num_leds: 16
    name: "NeoPixel Light"
    invert: true

Hope it helps :wink:

I have tried several of the options described here but I have this problem and I cannot solve it, only cold temperature white works for me, when changing the color the color selected in HA does not correspond to the colors shown by the led’s, any help? ?