Add ESP32 internal temperature measurement and automatic Actuator switch Off (#1384)

* Add automatic stop of relay following ESP32 temperature

To avoid overheating when too much current goes through the device.

Add internal temperature reporting to SYStoMQTT

This function is not available with ESP32 S3 and C3

* Temp update and error log

Update of the temperature to get closer to the datasheet of the ESP32 -40 +85C
and add the module name to the error log
This commit is contained in:
Florian authored and GitHub committed 2023-01-10 11:32:56 -06:00
1 parent 31ffdf1e2b
commit c1cedcf333
5 files changed
+73 -3

No files matched your search

+6 -1
View File
@@ -46,7 +46,12 @@ extern void MQTTtoONOFF(char* topicOri, JsonObject& RFdata);
#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
#endif
#ifndef MAX_TEMP_ACTUATOR
//# define MAX_TEMP_ACTUATOR 70 // Temperature that will trigger the relay to go OFF
#endif
#ifndef TimeBetweenReadingIntTemp
# define TimeBetweenReadingIntTemp 5000 // Time interval between internal temp measurement to switch off the relay if MAX_TEMP_ACTUATOR is reached
#endif
/*-------------------PIN DEFINITIONS----------------------*/
// default pin, if not set into the MQTT json
#ifndef ACTUATOR_ONOFF_GPIO