diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c80a6433..0ad78b178 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ All notable changes to this project will be documented in this file. - KNX ESP32 UDP mulicastpackage (#9811) - Command ``gpio`` using non-indexed functions regression from v9.1.0 (#9962) - ESP32 TasmotaClient firmware upgrade (#9218) +- Reset to defaults after 6 hours of DeepSleep (#9993) ### Removed diff --git a/RELEASENOTES.md b/RELEASENOTES.md index d9851de7b..efb2518f7 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -90,6 +90,7 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota - KNX ESP32 UDP mulicastpackage (#9811) - GUI MqttUser and MqttPassword updates when TLS is compiled in (#9825) - ESP32 TasmotaClient firmware upgrade (#9218) +- Reset to defaults after 6 hours of DeepSleep (#9993) ### Removed - Version compatibility check diff --git a/tasmota/settings.ino b/tasmota/settings.ino index 18711b5fc..e9fd78212 100644 --- a/tasmota/settings.ino +++ b/tasmota/settings.ino @@ -287,6 +287,8 @@ void UpdateQuickPowerCycle(bool update) { #ifndef FIRMWARE_MINIMAL if (Settings.flag3.fast_power_cycle_disable) { return; } // SetOption65 - Disable fast power cycle detection for device reset + + const uint32_t QPC_COUNT = 7; // Number of Power Cycles before Settings erase const uint32_t QPC_SIGNATURE = 0xFFA55AFF; diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino index d0aca91e3..d89e2c22c 100644 --- a/tasmota/tasmota.ino +++ b/tasmota/tasmota.ino @@ -205,9 +205,13 @@ void setup(void) { RtcReboot.fast_reboot_count = 0; } #ifdef FIRMWARE_MINIMAL - RtcReboot.fast_reboot_count = 0; // Disable fast reboot and quick power cycle detection + RtcReboot.fast_reboot_count = 0; // Disable fast reboot and quick power cycle detection #else - RtcReboot.fast_reboot_count++; + if (ResetReason() == REASON_DEEP_SLEEP_AWAKE) { + RtcReboot.fast_reboot_count = 0; // Disable fast reboot and quick power cycle detection + } else { + RtcReboot.fast_reboot_count++; + } #endif RtcRebootSave(); @@ -229,7 +233,6 @@ void setup(void) { if (1 == RtcReboot.fast_reboot_count) { // Allow setting override only when all is well UpdateQuickPowerCycle(true); - XdrvCall(FUNC_SETTINGS_OVERRIDE); } TasmotaGlobal.seriallog_level = Settings.seriallog_level;