Currently Working on a Project to Automate the Air Flow on My Wood Heater.
I have an EspHome Device controlling a Servo to Move the Air Damper.
I also have Several WaveShare Displays that Display Temperature Gauges
& a Slider that allows me to Manually move the Damper.
The Issue I'm Seeing is that if one of these Displays is Rebooted, or possibly also loses the API Connection, the Panel will cause the Servo to trigger & move thru it's Sequence.
Servo Control is like this, always moving to zero before establishing a new setting.
(The Servo & Heater Temp Probes are on it's Own Esp32).
##### Servo Control #####
servo:
- id: wh_servo1
output: whs_output
min_level: 5%
max_level: 10%
transition_length: 1s
#
output:
- platform: ledc
id: whs_output
pin: 23
frequency: 50 Hz
#
number:
- platform: template
id: whservoslider
name: Heater Servo
optimistic: true
min_value: 0
max_value: 100
initial_value: 0
step: 10
on_value:
then:
- servo.write:
id: wh_servo1
level: -100%
- delay: 1s
- servo.write:
id: wh_servo1
level: !lambda |-
return x/100;
- delay: 1s
- servo.write:
id: wh_servo1
level: 0%
- delay: 2s
- servo.detach: wh_servo1
The WaveShare Panels have a Slider that Ranges from 0 to 10, which I then Scale up by x10 to match the Servo Value.
Slider Portion of My LVGL is this:-
- slider:
id: servo_slider
align: BOTTOM_MID
x: 0
y: -50
width: 400
height: 50
pad_all: 0
radius: 5
min_value: 0
max_value: 10
#step: 10
value: 5 # Default slider value (50% brightness)
indicator:
radius: 5
knob:
bg_opa: "0%" # Hides the knob entirely
radius: 0
on_value:
then:
- lvgl.label.update:
id: wh_servo_slide
text: !lambda |-
char buf[32];
sprintf(buf, "Servo: %.0f%%", x * 10 );
return std::string(buf);
- homeassistant.action:
action: number.set_value
data:
entity_id: number.woodheat_1_heater_servo
value: !lambda return x * 10;
- label:
text: "Servo: 50%"
id: wh_servo_slide
y: 0
width: 400
align: BOTTOM_MID
text_align: CENTER
text_color: WHITE
text_font: robo_25 # override font size
This is the Sensor Code that the WaveShare's uses to pull the Heaters Servo Value from Home Assistant:-
sensor:
- platform: homeassistant
name: "Servo Value"
id: fire_servo
entity_id: number.woodheat_1_heater_servo
internal: True
on_value:
then:
- lvgl.slider.update:
id: servo_slider
value: !lambda 'return x /10;'
Can Anyone Point to Why the Servo Does this Dance back to its present value every time one of the WaveShare Panels is rebooted.
While It's only a Minor anomaly to Me, My Wife is going Crazy about the Heater Having a Mind of it's Own every time I'm Updating the Code on the Panel in other Rooms.
Thanks.