Created Device Operational Recovery (markdown)

Michael Ingraham 2019-10-17 13:45:34 -04:00
parent 3a83af3a2d
commit 2bf77626fc
1 changed files with 20 additions and 0 deletions

@ -0,0 +1,20 @@
Configuration problems can cause boot loops, devices which will not appear (i.e., no `sonoff-xxxx` AP) or connect to Wi-Fi or appear, erratic behavior, etc. In cases such as these, a means to restore the device to proper operation is difficult. A "recovery" process is required.
By default, the firmware tries to preserve the existing configuration (to support automated updates via OTA upgrades). However, various things can happen that cause the existing configuration to be a problem, e.g., when upgrading from old releases without following the [migration path](Upgrading#migration-path-for-older-releases).
When code updates change the values or the way settings are used, those code changes don't directly change the settings on the running device when you load the new firmware. What happens is that when it boots up, the firmware looks to see if it has a valid configuration (is it an upgrade from an older Tasmota version), and if the CFG_HOLDER value is in the right place, it assumes that the existing configuration is valid. If it doesn't find the right value, it assumes that this is not a "simple" upgrade and takes the compiled-in configuration settings and writes them out to the configuration area.
Listed below are a few ways to reset the device to what is set in the firmware binary (`my_user_config` and `user_config_override.h`), i.e., firmware defaults, in order to recover a device:
- Hold the button (`Button1`) down, if available, for 40 seconds
- Issue `Reset 1` command via the console, MQTT, or HTTP
- Cycle power following this procedure: **(6.6.0.18)**
Unplug the device for several seconds (>30) to ensure that the volatile memory clears, specifically, the real time clock (RTC) memory.
Initiate a power cycling procedure:
1. Apply power for 1-2 seconds but less than 8 seconds and unplug the device.
2. Wait 1-2 seconds and repeat step _i_
    Cycle power four (4) times in this manner
On the following powering up of the device, _all the device settings_ will be reset to the defaults of the firmware binary originally flashed on the device.
- Connect the device to the serial programming interface, erase the flash memory, and flash a "clean" well-known firmware binary.