Hi guys,
I have HAOS installed in Virtualbox on and old 2009 Always ON Imac
Running Home Assistant OS 13.2.
Conbee11
I’ve had problems with this before and alway thought this was a poor Wi-Fi signal, but now I don’t know if this is a sketch issue, a Wi Fi issue (currently ay 83dbm), or something else?
Okay, I reverted back to my original setup which I’ll document below. This problem has only recently been found as I only really use these LEDs during the darker winter months.
I gone back and read through all the updates for 2024, butt still can’t find whats causing my problem. I’m sure I’ve overlooked something.
What should happen is when motion is detected by the Aqara motion sensor, the kitchen LEDs which are normally on a slow rainbow effect change to full brightness CW, then when no motion is detected revert back from a snapshot to their original state/colour and effect.
What is happening is, motion is detected, the LEDs change to full CW brightness, but when the snapshot is reloaded the LEDs revert back to a red light and no effect.
I’ve attempted and changed many things in an attempt to fix this but had no luck in doing so. I’ve also tried rewriting the automations and scene, due to the updates to automations and scenes over the last year possibly breaking the setup, but his ended up with the automation not working at-all. The LEDs wouldn’t change to full CW when motion was detected for example.
It seems to me that the LED “effect” with ESPHome isn’t being collected or reused with the snapshot?
Does anyone have any ideas what’s going on?
I’d be really grateful for some advice as I’m completely stumped.
Automation to detect motion, create snapshot, LEDs to Full CW
alias: kitchen leds catch
description: ""
triggers:
- type: motion
device_id: 55e691e9b1cb092f850de53663eb780c
entity_id: ef1867600fa68c4a2acc25f499e294fb
domain: binary_sensor
trigger: device
conditions: []
actions:
- data:
scene_id: leds_before_motion
snapshot_entities:
- light.kitchen_colour_leds_1
action: scene.create
- data:
kelvin: 6500
brightness: 255
target:
entity_id:
- light.kitchen_colour_leds_1
action: light.turn_on
mode: restart
Scene to put the snapshot into and to be reloaded from after NO motion.
Automation to reload the snapshot from the above scene.
alias: kitchen leds reload
description: ""
triggers:
- type: no_motion
device_id: 55e691e9b1cb092f850de53663eb780c
entity_id: ef1867600fa68c4a2acc25f499e294fb
domain: binary_sensor
trigger: device
conditions: []
actions:
- action: scene.turn_on
data: {}
target:
entity_id: scene.leds_before_motion
mode: restart
ESPHome LED Control Effects on ESPThings Analog Controller.
esphome:
name: kitchen-colour-leds-1
friendly_name: Kitchen-colour-leds-1
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "xxxxxx"
ota:
- platform: esphome
password: "xxxxxx"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Kitchen-Colour-Leds-1"
password: "xxxxxx"
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 1"
id: kcl1
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(kcl1).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;
- strobe:
- strobe:
name: Strobe Effect With Custom Values
colors:
- state: true
brightness: 100%
red: 100%
green: 90%
blue: 0%
duration: 500ms
- state: false
duration: 250ms
- state: true
brightness: 100%
red: 0%
green: 100%
blue: 0%
duration: 500ms
- flicker:
- flicker:
name: Flicker Effect With Custom Values
alpha: 95%
intensity: 10.5%
- random:
- random:
name: Random Effect With Custom Values
transition_length: 5s
update_interval: 7s
- pulse:
- pulse:
name: "Fast Pulse"
transition_length: 0.5s
update_interval: 0.5s
- pulse:
name: "Slow Pulse"
# transition_length: 1s # defaults to 1s
update_interval: 2s