ESPThings ET-AL01 LED Strips

Hi Guy’s,

I’m new to HA and ESPHome and have some questions and looking for examples.

I have the ESPThings ET-AL01 Analog led strip controller. I don’t yet have a dashboard in HA and just using the overview page until I have a better understanding of things.

In the following example from ESPThings for their controller ET-AL01, what in the code presents itself to HA, ie what creates what I see to controller the leds on the HA overview page, so I can understand this a little better to add other controls?
What I’d like to do is add some extra features and effects, like what you would get with WLED, mainly features like fading from on colour to the next (is this called a rainbow effect). Are there any examples anywhere that I can follow to create my own?

esphome:
  name: kitchen-colour-leds

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "guess"

ota:
  password: "guess"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Kitchen-Colour-Leds"
    password: "guess"

captive_portal:
    
sensor:
  - platform: wifi_signal
    name: "WiFi Signal $devicename"
    update_interval: 60s
output:
  - platform: ledc
    pin: 26
    frequency: 25000Hz
    id: ledc_cw
  - platform: ledc
    pin: 18
    frequency: 25000Hz
    id: ledc_ww
  - platform: ledc
    pin: 19
    frequency: 25000Hz
    id: ledc_r
  - platform: ledc
    pin: 23
    frequency: 25000Hz
    id: ledc_g
  - platform: ledc
    pin: 05
    frequency: 25000Hz
    id: ledc_b
    
light:
  - platform: rgbww
    name: "Kitchen Colour LEDs"
    warm_white: ledc_ww
    cold_white: ledc_cw
    red: ledc_r
    green: ledc_g
    blue: ledc_b
    cold_white_color_temperature: 5000K
    warm_white_color_temperature: 3000K

Sorry just read ET-AL01 Analog led strip controller

I don’t understand,
Did you misread my post or are you telling me to go to ET-AL01 Analog Led Strip Controller?

Misread your post sorry

I sorry I feel bad… I will repost my deleted post. I am not 100% sure with your light but try putting this under your light. Can’t hurt

from this

light:
  - platform: rgbww
    name: "Kitchen Colour LEDs"
    warm_white: ledc_ww
    cold_white: ledc_cw
    red: ledc_r
    green: ledc_g
    blue: ledc_b
    cold_white_color_temperature: 5000K
    warm_white_color_temperature: 3000K

to this

light:
  - platform: rgbww
    name: "Kitchen Colour LEDs"
    warm_white: ledc_ww
    cold_white: ledc_cw
    red: ledc_r
    green: ledc_g
    blue: ledc_b
    cold_white_color_temperature: 5000K
    warm_white_color_temperature: 3000K
    effects:
      - pulse:
          name: Pulse
      - addressable_rainbow:
          name: Rainbow
      - strobe:
          name: Red Strobe
          colors:
            - state: true
              brightness: 30%
              red: 100%
              green: 0%
              blue: 0%
              duration: 1s
            - state: false
              duration: 1s
      - strobe:
          name: Orange Strobe
          colors:
            - state: true
              brightness: 30%
              red: 100%
              green: 50%
              blue: 0%
              duration: 1s
            - state: false
              duration: 1s

in order to see the effects your light must be ON, click on the globe or heading and you should see this

below is link to more effects.

Hope this works and help you :pensive:

Hi Blacky,

Thank you for your input and post, sadly I don’t have addressable leds, thats why I’m using the analog controller.
Thank you anyway.

Sorry, the Orange, Red Strobe work as does the the Pulse, but it didn’t like the “addressable rainbow” in the editor in HA.

What I’d really like to do, is select an area in the colour wheel then the leds will all fade from one colour to the next around that selected diameter/ring of the colour wheel.

Yea that was the reason I deleted my original post. Wasn’t sure on how analogue would react but you mention rainbow effect (I didn’t think rainbow would work). I only used addressable lights running WLED.

I dont think you can select a area in the colour wheel (so I think that’s out). Have you tried “random”

ffects:
      - pulse:
          name: Pulse
      - random:
          name: Random
          transition_length: 5s
          update_interval: 7s
      - strobe:
          name: Red Strobe
          colors:
            - state: true
              brightness: 30%
              red: 100%
              green: 0%
              blue: 0%
              duration: 1s

I think this may be your closes option

or maybe this

      - strobe:
          name: Green - Yellow # you could make a rainbow by adding in colors and name it "Rainbow"
          colors: #just add in what you would like and as many you like
            - state: true
              brightness: 30%
              red: 0%
              green: 100%
              blue: 0%
              duration: 500ms
            - state: false
              duration: 10ms
            - state: true
              brightness: 30%
              red: 50%
              green: 50%
              blue: 0%
              duration: 500m

or this

    effects:
      - lambda:
          name: My Custom Effect
          update_interval: 1s
          lambda: |-
            static int state = 0;
            auto call = id(my_light).turn_on();
            // Transition of 1000ms = 1s
            call.set_transition_length(1000);
            if (state == 0) {
              call.set_rgb(1.0, 1.0, 1.0);
            } else if (state == 1) {
              call.set_rgb(1.0, 0.0, 1.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 == 4)
              state = 0;

Not sure what will work it will just be trial and error… hope this helps you.

PS: would be nice to know what works for you :grinning:

Hi Blacky,

Thank you for your help, I’m really grateful.

I’ll give them ago. I did try something I found on another post by adding 9effects-lambda), but the editor didn’t like the lambda, then again with my current limited knowledge, I may have got something wrong.

I’ll give your examples a try when I get chance and post my finding, as I’m sure there will be others that will benefit.

With your examples it’s given me a starting point to try, see what happens and learn from.

Does anyone know of an explanation/tutorial of lambda for a newbie as it looks more like c++ to me?

It is c++. See Automations and Templates — ESPHome

Hi Guys,

Thank you for your help.

I’ve managed to find away to do this in-part from your help on this thread and from the following thread;

When I power up I find that the Cold White are at 100%.

How do I stop the cold white being ON, on power-up, and to start the rainbow effect on power-up?

sensor:
  - platform: wifi_signal
    name: "WiFi Signal $devicename"
    update_interval: 60s
output:
  - platform: ledc
    pin: 26
    frequency: 25000Hz
    id: ledc_cw
  - platform: ledc
    pin: 18
    frequency: 25000Hz
    id: ledc_ww
  - platform: ledc
    pin: 19
    frequency: 25000Hz
    id: ledc_r
  - platform: ledc
    pin: 23
    frequency: 25000Hz
    id: ledc_g
  - platform: ledc
    pin: 05
    frequency: 25000Hz
    id: ledc_b
    
light:
  - platform: rgbww
    name: "Kitchen Colour LEDs"
    id: kcl
    warm_white: ledc_ww
    cold_white: ledc_cw
    red: ledc_r
    green: ledc_g
    blue: ledc_b
    cold_white_color_temperature: 5000K
    warm_white_color_temperature: 3000K
    effects:
      - lambda:
          name: Slow Rainbow
          update_interval: 16s
          lambda: |-
            static int state = 0;
            auto call = id(kcl).turn_on();
            call.set_transition_length(15000);
            if (state == 0) {
              call.set_rgb(1.0, 0.0, 0.0);
            } else if (state == 1) {
              call.set_rgb(1.0, 0.5, 0.0);
            } else if (state == 2) {
              call.set_rgb(1.0, 1.0, 0.0);
            } else if (state == 3) {
              call.set_rgb(0.5, 1.0, 0.0);
            } else if (state == 4) {
              call.set_rgb(0.0, 1.0, 0.0);
            } else if (state == 5) {
              call.set_rgb(0.0, 1.0, 0.5);
            } else if (state == 6) {
              call.set_rgb(0.0, 1.0, 1.0);
            } else if (state == 7) {
              call.set_rgb(0.0, 0.5, 1.0);
            } else if (state == 8) {
              call.set_rgb(0.0, 0.0, 1.0);
            } else if (state == 9) {
              call.set_rgb(0.5, 0.0, 1.0);
            } else if (state == 10) {
              call.set_rgb(1.0, 0.0, 1.0);
            } else if (state == 11) {
              call.set_rgb(1.0, 0.0, 0.5);
            }
            call.perform();
            state++;
            if (state == 12)
              state = 0;

Would I be correct in adding a line, the first call.set cw to 0.0.0;

lambda: |-
            static int state = 0;
            auto call = id(kcl).turn_on();
            call.set_transition_length(15000);
            if (state == 0) {
              call.set_cw(0.0, 0.0, 0.0);
            } else if (state == 1) {
              call.set_rgb(1.0, 0.0, 0.0);
            } else if (state == 2)

And so on…

Am I looking at doing this correctly or way-off?

Hi Guy’s, @Blacky , @nickrout

Ok, I’m now thinking I should use something along the line of the “on_boot”, But I haven’t quiet grasped it.
Hers what I have now, but get some errors;

esphome:
  name: kitchen-colour-leds

esp32:
  board: esp32dev
  framework:
    type: arduino


# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "pass"

ota:
  password: "pass"

wifi:
  ssid:pass
  password: pass

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

captive_portal:
    
sensor:
  - platform: wifi_signal
    name: "WiFi Signal $devicename"
    update_interval: 60s
output:
  - platform: ledc
    pin: 26
    frequency: 25000Hz
    id: ledc_cw
  - platform: ledc
    pin: 18
    frequency: 25000Hz
    id: ledc_ww
  - platform: ledc
    pin: 19
    frequency: 25000Hz
    id: ledc_r
  - platform: ledc
    pin: 23
    frequency: 25000Hz
    id: ledc_g
  - platform: ledc
    pin: 05
    frequency: 25000Hz
    id: ledc_b
    
light:
  - platform: rgbww
    name: "Kitchen Colour LEDs"
    id: kcl
    warm_white: ledc_ww
    cold_white: ledc_cw
    red: ledc_r
    green: ledc_g
    blue: ledc_b
    cold_white_color_temperature: 5000K
    warm_white_color_temperature: 3000K
    
    on_boot:
      then:
        - light.turn_off:
          state: True
          id: ledc_cw
    
    effects:
      - lambda:
          name: Slow Rainbow
          update_interval: 16s
          lambda: |-
            static int state = 0;
            auto call = id(kcl).turn_on();
            call.set_transition_length(15000);
            if (state == 0) {
              call.set_rgb(1.0, 0.0, 0.0);
            } else if (state == 1) {
              call.set_rgb(1.0, 0.5, 0.0);
            } else if (state == 2) {
              call.set_rgb(1.0, 1.0, 0.0);
            } else if (state == 3) {
              call.set_rgb(0.5, 1.0, 0.0);
            } else if (state == 4) {
              call.set_rgb(0.0, 1.0, 0.0);
            } else if (state == 5) {
              call.set_rgb(0.0, 1.0, 0.5);
            } else if (state == 6) {
              call.set_rgb(0.0, 1.0, 1.0);
            } else if (state == 7) {
              call.set_rgb(0.0, 0.5, 1.0);
            } else if (state == 8) {
              call.set_rgb(0.0, 0.0, 1.0);
            } else if (state == 9) {
              call.set_rgb(0.5, 0.0, 1.0);
            } else if (state == 10) {
              call.set_rgb(1.0, 0.0, 1.0);
            } else if (state == 11) {
              call.set_rgb(1.0, 0.0, 0.5);
            }
            call.perform();
            state++;
            if (state == 12)
              state = 0;

Can I ask for some assistance?

Where are the errors?

Hi @nickrout ,

If I hover over the little red X I see “target_platform”.

I’ve tried moving the added "on boot ", code around in different places and changed it a few times. I’ve also tried adding “platform: ESP32”, in different places.

Screen Shot 2022-08-14 at 11.58.23

Hi Guys,

Am I looking at doing this correct by using the “on boot”, to switch Off the cw leds?

When I switch the unit on or flash it, the cw leds are on full along with the random colour effect. I wish to switch the cw leds Off when booting and only come when I switch them On.

I’d be grateful for some advice.

Okay, @Blacky, @nickrout

I’ve figured this out, even though it doesn’t state you can do this with ledc in the esphome docs.

color_interlock: true

Although this works, it looses the colour identifier circle in the colour wheel. No biggy.

Hi Guys,
@nickrout @Blacky
This works, but when an effect is running (in colour mode, slow rainbow) and I select Temperature, the white leds on stay on only for the Transition Length of what effect was previously running, then it changes back to the colour effect.
Do I need a statement such as;
on_color_interlock:
then:
- effects.turn_off

Here is what I’m using at the moment after all the board info and passwords;


captive_portal:
    
sensor:
  - platform: wifi_signal
    name: "WiFi Signal $devicename"
    update_interval: 60s
output:
  - platform: ledc
    pin: 26
    frequency: 25000Hz
    id: ledc_cw
  - platform: ledc
    pin: 18
    frequency: 25000Hz
    id: ledc_ww
  - platform: ledc
    pin: 19
    frequency: 25000Hz
    id: ledc_r
  - platform: ledc
    pin: 23
    frequency: 25000Hz
    id: ledc_g
  - platform: ledc
    pin: 05
    frequency: 25000Hz
    id: ledc_b
    
light:
  - platform: rgbww
    name: "Kitchen Colour LEDs 2"
    id: kcl2
    warm_white: ledc_ww
    cold_white: ledc_cw
    red: ledc_r
    green: ledc_g
    blue: ledc_b
    cold_white_color_temperature: 5000K
    warm_white_color_temperature: 3000K
    color_interlock: true
    effects:
      - lambda:
          name: Slow Rainbow
          update_interval: 16s
          lambda: |-
            static int state = 0;
            auto call = id(kcl2).turn_on();
            call.set_transition_length(15000);
            if (state == 0) {
              call.set_rgb(1.0, 0.0, 0.0);
            } else if (state == 1) {
              call.set_rgb(1.0, 0.5, 0.0);
            } else if (state == 2) {
              call.set_rgb(1.0, 1.0, 0.0);
            } else if (state == 3) {
              call.set_rgb(0.5, 1.0, 0.0);
            } else if (state == 4) {
              call.set_rgb(0.0, 1.0, 0.0);
            } else if (state == 5) {
              call.set_rgb(0.0, 1.0, 0.5);
            } else if (state == 6) {
              call.set_rgb(0.0, 1.0, 1.0);
            } else if (state == 7) {
              call.set_rgb(0.0, 0.5, 1.0);
            } else if (state == 8) {
              call.set_rgb(0.0, 0.0, 1.0);
            } else if (state == 9) {
              call.set_rgb(0.5, 0.0, 1.0);
            } else if (state == 10) {
              call.set_rgb(1.0, 0.0, 1.0);
            } else if (state == 11) {
              call.set_rgb(1.0, 0.0, 0.5);
            }
            call.perform();
            state++;
            if (state == 12)
              state = 0;

Does anyone have and example of how to disable the effect if the white leds are On?

I’ve tried a few things, but still no success;

  - platform: rgbww
    name: "Kitchen Colour LEDs 2"
    id: kcl2
    warm_white: ledc_ww
    cold_white: ledc_cw
    red: ledc_r
    green: ledc_g
    blue: ledc_b
    cold_white_color_temperature: 5000K
    warm_white_color_temperature: 3000K
    color_interlock: true
    
    on_turn_on:
      - light.turn_off:
          id: kcl2
          effect: "None"
          brightness: 75%
    
    effects:
      - lambda:
          name: Slow Rainbow
          update_interval: 16s
on_turn_off:
      - light.turn_off:
          id: kcl2
          effect: "None"
          brightness: 75%
   on_ledc_ww:
      - light.turn_off:
          id: kcl2
          effect: "None"
          brightness: 75%

I there a way to turn the effect off when the white led?s are switched On or triggered?