Fix actuator manual control with button press and overheat protection (#1403)

Manual control with a button press triggered the relay but 2 times (when pressing and releasing), fixing this.

Check that we have two consecutive readings of temperature above the threshold to trigger the actuator to OFF
And remove it by default to the shelly, as I see unjustified jumps of temperature above 80C.
This commit is contained in:
Florian authored and GitHub committed 2023-01-18 18:10:54 -06:00
1 parent 76724240f4
commit b4003d4ea1
4 files changed
+28 -17

No files matched your search

+8 -1
View File
@@ -89,7 +89,14 @@ void MeasureGPIOInput() {
# if defined(ZactuatorONOFF) && defined(ACTUATOR_TRIGGER)
//Trigger the actuator if we are not at startup
if (InputState != 3) ActuatorManualTrigger(InputState);
if (InputState != 3) {
# if defined(ACTUATOR_BUTTON_TRIGGER_LEVEL)
if (InputState == ACTUATOR_BUTTON_TRIGGER_LEVEL)
ActuatorTrigger(); // Button press trigger
# else
ActuatorTrigger(); // Switch trigger
# endif
}
# endif
InputState = reading;
}