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

+4 -4
View File
@@ -40,11 +40,11 @@ extern void MQTTtoONOFF(char* topicOri, JsonObject& RFdata);
# define ACTUATOR_ON LOW // LOW or HIGH, set to the output level of the GPIO pin to turn the actuator on.
#endif
//# define ACTUATOR_ONOFF_DEFAULT !ACTUATOR_ON // ACTUATOR_ON or !ACTUATOR_ON, set to the state desired on reset.
#ifndef ACTUATOR_BUTTON_TRIGGER_LEVEL
//# define ACTUATOR_BUTTON_TRIGGER_LEVEL LOW // 0 or 1, set to the sensing level which to detect a button press to change the actuator state.
#endif
#ifndef ACTUATOR_TRIGGER
# define ACTUATOR_TRIGGER false // false or true, enable to control an actuator directly from the board switch (default behavior if true), or by button if ACTUATOR_BUTTON_TRIGGER_LEVEL is defined
# define ACTUATOR_TRIGGER false // false or true, enable to control an actuator directly from the board switch (default behavior if true), or by button if ACTUATOR_BUTTON_TRIGGER_LEVEL is also defined
#endif
#ifndef ACTUATOR_BUTTON_TRIGGER_LEVEL
//# define ACTUATOR_BUTTON_TRIGGER_LEVEL LOW // 0 or 1, set to the level which to detect a button press to change the actuator state.
#endif
#ifndef MAX_TEMP_ACTUATOR
//# define MAX_TEMP_ACTUATOR 70 // Temperature that will trigger the relay to go OFF