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:
1 parent
31ffdf1e2b
commit
c1cedcf333
5 files changed
+73
-3
No files matched your search
@@ -421,6 +421,15 @@ void pubMqttDiscovery() {
|
||||
# endif
|
||||
# endif
|
||||
# ifdef ESP32
|
||||
createDiscovery("sensor", //set Type
|
||||
subjectSYStoMQTT, "SYS: Internal temperature", (char*)getUniqueId("tempc", "").c_str(), //set state_topic,name,uniqueId
|
||||
"", "temperature", "{{ value_json.tempc }}", //set availability_topic,device_class,value_template,
|
||||
"", "", "°C", //set,payload_on,payload_off,unit_of_meas,
|
||||
0, //set off_delay
|
||||
"", "", true, "", //set,payload_avalaible,payload_not avalaible ,is a gateway entity, command topic
|
||||
"", "", "", "", false, // device name, device manufacturer, device model, device MAC
|
||||
stateClassMeasurement //State Class
|
||||
);
|
||||
# ifdef ZgatewayBT
|
||||
createDiscovery("sensor", //set Type
|
||||
subjectSYStoMQTT, "SYS: Low Power Mode", (char*)getUniqueId("lowpowermode", "").c_str(), //set state_topic,name,uniqueId
|
||||
|
||||
Reference in new issue
Block a user