mirror of https://github.com/arendst/Tasmota.git
decode-config.exe and clarifying the backup process
parent
28c6b65aca
commit
27836fca52
40
Upgrading.md
40
Upgrading.md
|
@ -3,7 +3,7 @@ Easily upgrade Tasmota to a newer version or different build while keeping all y
|
|||
_**The first rule of upgrading: If it ain't broke, don't fix it!**_
|
||||
In other words, ensure that there is a good reason to mess with a working installation (e.g., a need to use a new feature or address a found problem fixed in a more current version).
|
||||
|
||||
**Any time you upgrade it is highly recommended that you [back up your device settings](#device-settings). This is done in webUI under the ***"Configuration - Backup Config"*** menu.**
|
||||
**Any time you upgrade it is highly recommended that you [back up your device settings](#device-settings). It is easily done in webUI under ***"Configuration - Backup Config"*** page.**
|
||||
|
||||
|
||||
# OTA upgrade
|
||||
|
@ -89,25 +89,35 @@ 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 version 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 (constant reboots or reconnect). It is best to address this before upgrading across major versions of Tasmota.
|
||||
Tasmota uses flash memory to store options and settings. New versions add (or remove) features that use various regions of that memory. If you did not erase flash when you flashed your device, an updated version 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 (constant reboots or reconnects).
|
||||
|
||||
decode-config.py [installation instructions](https://github.com/arendst/Tasmota/blob/development/tools/decode-config.md).
|
||||
To avoid this use our decode-config tool to easily create and restore backups in Tasmota:
|
||||
|
||||
## decode-config tool
|
||||
* [decode-config.py](https://github.com/arendst/Tasmota/blob/development/tools/decode-config.md) - installation instructions in Python for Windows or Linux
|
||||
* [decode-config.exe](https://github.com/Jason2866/Tasmota-decode-config/blob/master/bin/decode-config.exe) - Windows 64bit only executable. If using this replace `decode-config.py` with `decode-config.exe` in the instruction examples.
|
||||
|
||||
#### 1. Make a configuration backup:
|
||||
* Use _decode-config.py_ from the Tasmota [`/tools/` folder](../tree/development/tools) to create a new backup straight from your device
|
||||
|
||||
1. Make a configuration backup using one of these two methods:
|
||||
- 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 device's 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-@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
|
||||
`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.
|
||||
> @f will be replaced by that device's FriendlyName
|
||||
* Convert a previously made `.dmp` backup into a JSON file
|
||||
|
||||
`decode-config.py -f <dmp_filename> --backup-file Config-@f --backup-type json`
|
||||
#### 2. Perform a reset
|
||||
`Reset 6`
|
||||
|
||||
> Erase flash settings area but retains Wi-Fi and MQTT settings
|
||||
#### 3. Upgrade the firmware via OTA or file upload
|
||||
#### 4. Restore configuration
|
||||
decode-config.py -d <deviceIP> --restore-file <config-filename>
|
||||
|
||||
If you can't restore configuration directly you can 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.
|
||||
Until now several versions of Tasmota have been released starting with the C version Sonoff-MQTT-OTA followed by Sonoff-MQTT-OTA-Arduino, Sonoff-Tasmota and ultimately **Tasmota**.
|
||||
|
||||
Migrating from one version to the next versions is mostly painless as the settings are saved in the same location in flash and newer settings are appended.
|
||||
|
||||
|
@ -129,6 +139,8 @@ As said, mostly painless. There are some deviations to this rule as I rearranged
|
|||
* Easy migration from **Tasmota 6.7.1** to **Tasmota 7.x**.
|
||||
As a safeguard perform a **Backup Configuration** before installing the new version. If settings are lost after the upgrade perform a **Restore Configuration**.
|
||||
|
||||
If *Backup Configuration -> Restore Configuration* fails, reset to firmware defaults and use [decode-config tool](#decode-config-tool) to restore your backed up configuration.
|
||||
|
||||
So to migrate from **Sonoff-MQTT-OTA-Arduino versions before 3.1.0** to **Tasmota 7.x** you will need to take five steps:
|
||||
|
||||
1. Migrate to **Tasmota 3.9.x**
|
||||
|
|
Loading…
Reference in New Issue