boojew
(Boojew)
September 15, 2020, 1:41pm
1
Hey guys - I have an esphome wake-up light that transitions on over 15 minutes; however, I notice that it SEEMS like the stepping it uses is something like increase 3% every 30s (or something like that) - which when your as tired as I am in the morning feels agressive. Does anyone know if there is a way to control the step timer (ie. make it more granular) in esphome? I read through the docs and I couldnt see anything.
Alternatively, I used to do this with fanlinc light using AppDaemon and it was WAY more subtle in transition. May have to go back to that.
tom_l
September 15, 2020, 1:55pm
2
Can you paste your config?
boojew
(Boojew)
September 15, 2020, 2:17pm
3
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
- platform: esp8266_pwm
id: output_warm_white
pin: GPIO13
- platform: esp8266_pwm
id: output_cold_white
pin: GPIO5
light:
- platform: cwww
name: $device_name
id: $device_name
cold_white: output_cold_white
warm_white: output_warm_white
cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K
default_transition_length: 0.5s
From Node-Red, the data is basically
{"transition":900,"brightness":200,"color_temp":500}
tom_l
September 15, 2020, 2:22pm
4
Try increasing the pwm frequency.
boojew
(Boojew)
September 15, 2020, 2:40pm
5
Ah ok so something like?
output:
- platform: esp8266_pwm
id: output_red
pin: GPIO4
frequency: 1100 Hz
- platform: esp8266_pwm
id: output_green
pin: GPIO12
frequency: 1100 Hz
- platform: esp8266_pwm
id: output_blue
pin: GPIO14
frequency: 1100 Hz
- platform: esp8266_pwm
id: output_warm_white
pin: GPIO13
frequency: 1100 Hz
- platform: esp8266_pwm
id: output_cold_white
pin: GPIO5
frequency: 1100 Hz
light:
- platform: cwww
name: $device_name
id: $device_name
cold_white: output_cold_white
warm_white: output_warm_white
cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K
default_transition_length: 0.5s
Any recommendations on the stepping to use for the PWM? Should I move up by 100? Just not sure if I can break anything… Thanks!
tom_l
September 15, 2020, 2:58pm
6
I had a single pwm up to 20kHz on a Wemos D1 mini board. No idea how that will scale with multiple pwm outputs.
I’d move up by 4KHz steps and back off by half that each time it stops being adjustable.
They just stop being adjustable when you reach the limit.
So something like
4KHz
8KHz
12KHz
16KHz - fails
14KHz - ok
15KHz - ok