ESPHome - Light not recognised as RGB on 1 colour and no effect

Hopefully this is an easy one. I’ve started experimenting with ESPhome, and i can really see now how powerful it is. But, my first project is a simple RGB Led Strip. Basically, i want to move away from Tasmota, so i can get teh colour calibration better, and use the transition option.

I have flashed the Firmware using the Add On. It was dicovered by Home Assistant, but it is only showing as a Light with dimmer, but no colour selection. I’m assuming ive made a simple mistake, but can’t find it.

Any ideas?

esphome:
  name: bathroom_mirror_v1
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: "WifiSSID"
  password: "wifipassword"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Bathroom Mirror V1"
    password: "Or3g6z24tNZE"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  safe_mode: True
  
light:
  - platform: rgb
    name: "Bathroom Mirror Light"
    id: me
    red: output_red
    green: output_green
    blue: output_blue
    restore_mode: RESTORE_DEFAULT_OFF
    effects:
      - lambda:
          name: RedGreenFade
          update_interval: 4s
          lambda: |-
            static int state = 0;
            auto call = id(me).turn_on();
            // Transtion of 1000ms = 1s
            call.set_transition_length(4000);
            if (state == 0) {
              call.set_rgb(1.0, 0.0, 0.0);
            } else if (state == 1) {
              call.set_rgb(0.0, 1.0, 0.0);
            } else if (state == 2) {
              call.set_rgb(0.0, 0.0, 1.0);
            } else {
              call.set_rgb(1.0, 0.0, 0.0);
            }
            call.perform();
            state += 1;
            if (state == 2) // repeat only the red and green from christmas
              state = 0;

output:
  - platform: esp8266_pwm
    id: output_red
    pin: GPIO4
  - platform: esp8266_pwm
    id: output_green
    pin: GPIO12
  - platform: esp8266_pwm
    id: output_blue
    pin: GPIO14

image

What I can see is that you are using the wrong board setup. Your pinout refers to a ESP8266 NodeMCU but the selected board is the ESP01_1M wifi module that only has 2 GPIO outputs.

Changing your code to:

esphome:
  name: bathroom_mirror_v1
  platform: ESP8266
  board: nodemcuv2

Additionally you can also remove the following line from you light setup as it is not required.

id: me

I was thinking it was to do with the board type. It’s a TYWE3S based RBG LED controller from Jaycar. Everything i can find says that the board is esp01_1m. Any recommendations on how i can confirm? Can’t see anything in the data sheets.

image

The chip is a ESP 8285, it is mostly Tuya based. Luckily I have seen this chip before as I have it installed in one of my smart sockets. Below is the board setup I had used.

esphome:
  name: dresser_plug
  platform: ESP8266
  board: esp8285

Legend!! That fixed it.

All i had to do next was adjust the RGB Pinouts for the correct colours. Much better Colour than Stock Tasmota.

Glad I could help!! :+1: