Remove overtemp detection on external energy monitoring devices

Removed overtemp detection on external energy monitoring devices (#11628)
This commit is contained in:
Theo Arends 2021-04-09 10:04:37 +02:00
parent 740e4392ef
commit 0650744ac2
10 changed files with 14 additions and 3 deletions

View File

@ -26,6 +26,7 @@ All notable changes to this project will be documented in this file.
- Limit number of relay/button columns in GUI to 8 (#11546)
- ADC range result from int to float using command ``FreqRes`` for decimal resolution selection (#11545)
- Teleinfo, if raw mode selected also return telemety values in SENSOR data
- Removed overtemp detection on external energy monitoring devices (#11628)
### Fixed
- HC-SR04 on ESP32 release serial interface if not used (#11507)

View File

@ -115,6 +115,7 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota
- DeepSleep announcement topic [#11223](https://github.com/arendst/Tasmota/issues/11223)
- Limit number of relay/button columns in GUI to 8 [#11546](https://github.com/arendst/Tasmota/issues/11546)
- ADC range result from int to float using command ``FreqRes`` for decimal resolution selection [#11545](https://github.com/arendst/Tasmota/issues/11545)
- Removed overtemp detection on external energy monitoring devices [#11628](https://github.com/arendst/Tasmota/issues/11628)
### Fixed
- PN532 on ESP32 Serial flush both Tx and Rx buffers [#10910](https://github.com/arendst/Tasmota/issues/10910)

View File

@ -102,6 +102,7 @@ struct ENERGY {
uint8_t phase_count; // Number of phases active
bool voltage_common; // Use single voltage
bool frequency_common; // Use single frequency
bool use_overtemp; // Use global temperature as overtemp trigger on internal energy monitor hardware
bool kWhtoday_offset_init;
bool voltage_available; // Enable if voltage is measured
@ -501,7 +502,7 @@ void EnergyMqttShow(void)
void EnergyEverySecond(void)
{
// Overtemp check
if (TasmotaGlobal.global_update) {
if (Energy.use_overtemp && TasmotaGlobal.global_update) {
if (TasmotaGlobal.power && !isnan(TasmotaGlobal.temperature_celsius) && (TasmotaGlobal.temperature_celsius > (float)Settings.param[P_OVER_TEMP])) { // SetOption42 Device overtemp, turn off relays
AddLog(LOG_LEVEL_DEBUG, PSTR("NRG: Temperature %1_f"), &TasmotaGlobal.temperature_celsius);

View File

@ -269,7 +269,8 @@ void HlwDrvInit(void)
Energy.current_available = false;
Energy.voltage_available = false;
}
Energy.use_overtemp = true; // Use global temperature for overtemp detection
TasmotaGlobal.energy_driver = XNRG_01;
}
}

View File

@ -221,7 +221,7 @@ void CseSnsInit(void) {
// Software serial init needs to be done here as earlier (serial) interrupts may lead to Exceptions
// CseSerial = new TasmotaSerial(Pin(GPIO_CSE7766_RX), Pin(GPIO_CSE7766_TX), 1);
CseSerial = new TasmotaSerial(Pin(GPIO_CSE7766_RX), -1, 1);
if (CseSerial->begin(4800, 2)) { // Fake Software Serial 8E1 by using two stop bits
if (CseSerial->begin(4800, SERIAL_8E1)) {
if (CseSerial->hardwareSerial()) {
SetSerial(4800, TS_SERIAL_8E1);
ClaimSerial();
@ -230,6 +230,7 @@ void CseSnsInit(void) {
Settings.param[P_CSE7766_INVALID_POWER] = CSE_MAX_INVALID_POWER; // SetOption39 1..255
}
Cse.power_invalid = Settings.param[P_CSE7766_INVALID_POWER];
Energy.use_overtemp = true; // Use global temperature for overtemp detection
} else {
TasmotaGlobal.energy_driver = ENERGY_NONE;
}

View File

@ -573,6 +573,7 @@ void McpSnsInit(void)
mcp_buffer = (char*)(malloc(MCP_BUFFER_SIZE));
}
DigitalWrite(GPIO_MCP39F5_RST, 0, 1); // MCP enable
Energy.use_overtemp = true; // Use global temperature for overtemp detection
} else {
TasmotaGlobal.energy_driver = ENERGY_NONE;
}

View File

@ -215,6 +215,7 @@ void Ade7953DrvInit(void)
Energy.phase_count = 2; // Handle two channels as two phases
Energy.voltage_common = true; // Use common voltage
Energy.frequency_common = true; // Use common frequency
Energy.use_overtemp = true; // Use global temperature for overtemp detection
TasmotaGlobal.energy_driver = XNRG_07;
}
}

View File

@ -219,6 +219,7 @@ void Bl0940SnsInit(void) {
Settings.energy_current_calibration = BL0940_IREF;
Settings.energy_power_calibration = BL0940_PREF;
}
Energy.use_overtemp = true; // Use global temperature for overtemp detection
for (uint32_t i = 0; i < 5; i++) {
for (uint32_t j = 0; j < 6; j++) {

View File

@ -600,6 +600,7 @@ void Cse7761DrvInit(void) {
#ifdef CSE7761_FREQUENCY
Energy.frequency_common = true; // Use common frequency
#endif
Energy.use_overtemp = true; // Use global temperature for overtemp detection
TasmotaGlobal.energy_driver = XNRG_19;
}
}

View File

@ -33,6 +33,7 @@
#define NRG_DUMMY_U_COMMON true // Phase voltage = false, Common voltage = true
#define NRG_DUMMY_F_COMMON true // Phase frequency = false, Common frequency = true
#define NRG_DUMMY_DC false // AC = false, DC = true;
#define NRG_DUMMY_OVERTEMP true // Use global temperature for overtemp detection
#define NRG_DUMMY_UREF 24000 // Voltage 240.00 V (= P / I)
#define NRG_DUMMY_IREF 41666 // Current 0.417 A (= P / U)
@ -121,6 +122,7 @@ void NrgDummyDrvInit(void) {
Energy.voltage_common = NRG_DUMMY_U_COMMON; // Phase voltage = false, Common voltage = true
Energy.frequency_common = NRG_DUMMY_F_COMMON; // Phase frequency = false, Common frequency = true
Energy.type_dc = NRG_DUMMY_DC; // AC = false, DC = true;
Energy.use_overtemp = NRG_DUMMY_OVERTEMP; // Use global temperature for overtemp detection
TasmotaGlobal.energy_driver = XNRG_20;
}