mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 04:36:31 +00:00
Energy power delta report delayed
Energy power delta report delayed by two seconds allowing hardware to stabilize (#17751)
This commit is contained in:
parent
c776885691
commit
86979646ff
@ -20,6 +20,8 @@ All notable changes to this project will be documented in this file.
|
|||||||
### Changed
|
### Changed
|
||||||
- ESP32 Framework (Core) from v2.0.8 to v2.0.9
|
- ESP32 Framework (Core) from v2.0.8 to v2.0.9
|
||||||
- autoconf extract `display.ini` to file system
|
- autoconf extract `display.ini` to file system
|
||||||
|
- IRremoteESP8266 library from v2.8.4 to v2.8.5
|
||||||
|
- Energy power delta report delayed by two seconds allowing hardware to stabilize (#17751)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Partition_Manager.tapp fixed
|
- Partition_Manager.tapp fixed
|
||||||
|
@ -127,10 +127,14 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
|
|||||||
- Change command ``FileUpload`` index binary data detection from >199 to >299
|
- Change command ``FileUpload`` index binary data detection from >199 to >299
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- IRremoteESP8266 library from v2.8.4 to v2.8.5
|
||||||
- ESP32 Framework (Core) from v2.0.7 to v2.0.9
|
- ESP32 Framework (Core) from v2.0.7 to v2.0.9
|
||||||
- Refactored Zero Cross Dimmer [#18481](https://github.com/arendst/Tasmota/issues/18481)
|
- Refactored Zero Cross Dimmer [#18481](https://github.com/arendst/Tasmota/issues/18481)
|
||||||
|
- Energy power delta report delayed by two seconds allowing hardware to stabilize [#17751](https://github.com/arendst/Tasmota/issues/17751)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- ESP8266 Energy Export Active no update regression from v12.3.1.3
|
- ESP8266 Energy Export Active no update regression from v12.3.1.3
|
||||||
- NovaSDS GUI values [#18444](https://github.com/arendst/Tasmota/issues/18444)
|
- NovaSDS GUI values [#18444](https://github.com/arendst/Tasmota/issues/18444)
|
||||||
- Berry fix rules for string comparisons [#18464](https://github.com/arendst/Tasmota/issues/18464)
|
- Berry fix rules for string comparisons [#18464](https://github.com/arendst/Tasmota/issues/18464)
|
||||||
|
- Berry a rare condition when a GC causes a memory corruption
|
||||||
|
- Partition_Manager.tapp
|
||||||
|
@ -124,6 +124,7 @@ typedef struct {
|
|||||||
#ifdef USE_ENERGY_MARGIN_DETECTION
|
#ifdef USE_ENERGY_MARGIN_DETECTION
|
||||||
uint16_t power_history[ENERGY_MAX_PHASES][3];
|
uint16_t power_history[ENERGY_MAX_PHASES][3];
|
||||||
uint8_t power_steady_counter; // Allow for power on stabilization
|
uint8_t power_steady_counter; // Allow for power on stabilization
|
||||||
|
uint8_t margin_stable;
|
||||||
bool min_power_flag;
|
bool min_power_flag;
|
||||||
bool max_power_flag;
|
bool max_power_flag;
|
||||||
bool min_voltage_flag;
|
bool min_voltage_flag;
|
||||||
@ -556,7 +557,8 @@ void EnergyMarginCheck(void) {
|
|||||||
if (jsonflg) {
|
if (jsonflg) {
|
||||||
ResponseJsonEndEnd();
|
ResponseJsonEndEnd();
|
||||||
MqttPublishPrefixTopicRulesProcess_P(TELE, PSTR(D_RSLT_MARGINS), MQTT_TELE_RETAIN);
|
MqttPublishPrefixTopicRulesProcess_P(TELE, PSTR(D_RSLT_MARGINS), MQTT_TELE_RETAIN);
|
||||||
EnergyMqttShow();
|
// EnergyMqttShow();
|
||||||
|
Energy->margin_stable = 3; // Allow 2 seconds to stabilize before reporting
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_ENERGY_POWER_LIMIT
|
#ifdef USE_ENERGY_POWER_LIMIT
|
||||||
@ -681,6 +683,12 @@ void EnergyEverySecond(void) {
|
|||||||
|
|
||||||
#ifdef USE_ENERGY_MARGIN_DETECTION
|
#ifdef USE_ENERGY_MARGIN_DETECTION
|
||||||
EnergyMarginCheck();
|
EnergyMarginCheck();
|
||||||
|
if (Energy->margin_stable) {
|
||||||
|
Energy->margin_stable--;
|
||||||
|
if (!Energy->margin_stable) {
|
||||||
|
EnergyMqttShow();
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif // USE_ENERGY_MARGIN_DETECTION
|
#endif // USE_ENERGY_MARGIN_DETECTION
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,6 +176,7 @@ typedef struct {
|
|||||||
uint8_t fifth_second;
|
uint8_t fifth_second;
|
||||||
uint8_t command_code;
|
uint8_t command_code;
|
||||||
uint8_t power_steady_counter; // Allow for power on stabilization
|
uint8_t power_steady_counter; // Allow for power on stabilization
|
||||||
|
uint8_t margin_stable;
|
||||||
uint8_t mplr_counter;
|
uint8_t mplr_counter;
|
||||||
uint8_t max_energy_state;
|
uint8_t max_energy_state;
|
||||||
|
|
||||||
@ -772,7 +773,8 @@ void EnergyMarginCheck(void) {
|
|||||||
if (jsonflg) {
|
if (jsonflg) {
|
||||||
ResponseJsonEndEnd();
|
ResponseJsonEndEnd();
|
||||||
MqttPublishPrefixTopicRulesProcess_P(TELE, PSTR(D_RSLT_MARGINS), MQTT_TELE_RETAIN);
|
MqttPublishPrefixTopicRulesProcess_P(TELE, PSTR(D_RSLT_MARGINS), MQTT_TELE_RETAIN);
|
||||||
EnergyMqttShow();
|
// EnergyMqttShow();
|
||||||
|
Energy->margin_stable = 3; // Allow 2 seconds to stabilize before reporting
|
||||||
}
|
}
|
||||||
|
|
||||||
// Max Power
|
// Max Power
|
||||||
@ -893,6 +895,12 @@ void EnergyEverySecond(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
EnergyMarginCheck();
|
EnergyMarginCheck();
|
||||||
|
if (Energy->margin_stable) {
|
||||||
|
Energy->margin_stable--;
|
||||||
|
if (!Energy->margin_stable) {
|
||||||
|
EnergyMqttShow();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************************************\
|
/*********************************************************************************************\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user