Updated Upgrading (markdown)

blakadder 2019-11-09 13:09:07 +01:00
parent 9c0dcea4f4
commit a47920d157
1 changed files with 11 additions and 8 deletions

@ -89,19 +89,22 @@ You can set up OTA url and initiate OTA upgrade from TDM using GUI.
[**OTA over SCP**](OTA-over-SCP) - setup and configure "OTA over SCP" upload for PlatformIO
# Device Settings
Tasmota uses flash memory to store options and settings. New versions add (or remove) features that use various regions of flash memory. If you did not erase flash when you originally flashed your device, an updated verion of Tasmota may be accessing areas with values left over from the old Tasmota or even the original factory firmware. This might cause unexpected and unwanted behavior or even major problems (contant reboots or reconnect). It is best to address this before upgrading across major versions of Tasmota.
**decode-config.py does not work in Windows**
Tasmota uses flash memory to store many options and settings. Newer versions of Tasmota add features and use more and more of this area than earlier versions. These regions of flash were therefore not used by Tasmota before. If you did not erase flash when you originally flashed your device, a newer update may be accessing areas with values left over from the original factory firmware. Therefore there could be unexpected behavior. It is best to address this before upgrading across major versions of Tasmota.
1. Make a configuration backup using one of these two methods:
- Use `decode-config.py` from the Tasmota [`tools` code folder](../tree/development/tools) to create the backup in human readable form:
`decode-config.py -d <deviceIP> --backup-file Config-@H-@f-@v --backup-type json`
- Use `decode-config.py` from the Tasmota [`/tools/` folder](../tree/development/tools) to convert a .dmp backup to a readable form (JSON file):
`decode-config.py -d <deviceIP> --backup-file Config-@f --backup-type json`
> @f will be replaced by that devices FriendlyName
- If you have a `.dmp` backup already, you can create a JSON extract from that file:
`decode-config.py -f <dmpFile> --backup-file Config-@H-@f-@v --backup-type json`
`decode-config.py -f <dmpFile> --backup-file Config-@f --backup-type json`
2. Perform a `Reset 6` (erases flash settings area but retains Wi-Fi and MQTT settings)
3. Upgrade the firmware
4. Restore configuration
Particularly the older your current Tasmota versions is, it is probably best not to restore the backup directly since there may be some outdated settings in your configuration. There are often newer better alternatives, particularly since an upgrade is normally done to use new features. Configure the device manually referring to the [Commands article](Commands) and the settings (e.g., SetOptions, Rules, etc.) in the JSON file you created in step #1.
4. Restore configuration
`decode-config.py -d <deviceIP> --restore-file Config_@f`
It is probably best not to restore the backup directly when doing a big leap between versions, since there may be some outdated settings in your configuration. There are often newer better alternatives, particularly since an upgrade is normally done to use new features. Configure the device manually referring to the [Commands article](Commands) and the settings (e.g., SetOptions, Rules, etc.) in the JSON file you created in step #1. You can paste the JSON to a [JSON parser](https://jsonformatter.org/json-parser) to make it easily readable.
# Migration path
Until now several versions of Tasmota have been released starting with the C version Sonoff-MQTT-OTA followed by Sonoff-MQTT-OTA-Arduino, Tasmota and ultimately Tasmota.