Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
Enable watchdog for ESP32x variants. The watchdog automatically resets the CPU if the main loop is not called for over 5 seconds. It is meant to detect situations when the CPU is stuck and frozen.
We tried the watchdog years ago, but it had some serious issues. They seem all solved now. It is however possible that the watchdog fires during normal long operations. Please report any such circumstances.
In C code, any call to yield() resets the watchdog. Similarly, in Berry, any call to tasmota.yields() resets both the Berry-specific watchdog (4 seconds) and the main watchdog (5 seconds)
Restart -3 was changed on ESP32 otherwise the device is stuck forever, there is no OSWATCH_RESET_TIME after 120s on ESP32
Note: watchdog is already enabled on ESP8266.
This is a second try after #21414 reverted
Checklist:
[x] The pull request is done against the latest development branch
[x] Only relevant files were touched
[x] Only one feature/fix was added per PR and the code change compiles without warnings
[x] The code change is tested and works with Tasmota core ESP8266 V.2.7.6
[x] The code change is tested and works with Tasmota core ESP32 V.3.0.0
Description:
Enable watchdog for ESP32x variants. The watchdog automatically resets the CPU if the main loop is not called for over 5 seconds. It is meant to detect situations when the CPU is stuck and frozen.
We tried the watchdog years ago, but it had some serious issues. They seem all solved now. It is however possible that the watchdog fires during normal long operations. Please report any such circumstances.
In
C
code, any call toyield()
resets the watchdog. Similarly, in Berry, any call totasmota.yields()
resets both the Berry-specific watchdog (4 seconds) and the main watchdog (5 seconds)Restart -3
was changed on ESP32 otherwise the device is stuck forever, there is noOSWATCH_RESET_TIME
after 120s on ESP32Note: watchdog is already enabled on ESP8266.
This is a second try after #21414 reverted
Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass