Skip to content

Upgrading

Easily upgrade Tasmota to a newer version or different build while keeping all your settings

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 the current version).

Backup before upgrading

Any time you upgrade it is highly recommended to back up your device settings. That is easily done from the webUI using Configuration - Backup Config.

If you wish to switch to a different build or use development branch you need to download a binary file (gzipped or regular) or change the OTA Url link.

Download binaries from:

Gzipped binaries~

Gzipped binaries can be used only once you've upgraded to atleast Tasmota 8.2

Trying to upgrade with a gzipped binary using versions older than 8.2 will fail.

Tasmota 8.2 introduced upgrading using gzipped binaries which are smaller in size and will likely skip the intermediary minimal build installation. This makes the upgrade process faster and straightforward.

To use simply add .gz to the existing OTA Url or download the .bin.gz binary from the official OTA Server and the next upgrade will use the compressed file.

Upgrade using webUI~

Upgrading the device firmware over-the-air, aka OTA, is the most convenient way to upgrade.

To start the upgrade, open a web browser to your device's web UI and select Firmware Upgrade.

Upgrading_1

You are presented with two choices:

  • Upgrade by webserver - use an OTA server
  • Ugprade by file upload - uploading a downloaded or self-compiled binary file from your computer

Upgrading_2

Upgrade by web server~

If you want to upgrade to the latest release version click the first Start Upgrade button. This screen should appear

Upgrading_3

During this process Tasmota will download the new firmware from the url and install it. If you're not using a gzipped binary it might need to download tasmota-minimal.bin first, but all that happens automatically. All you have to do is wait 2 to 5 minutes.

After the upgrade is completed you can reconnect back to the web UI and check the firmware version on the bottom of the page or in the Information tab of the webUI.

Upgrade by file upload~

Go to Firmware Upgrade. This time browse to the binary you want to upgrade to with Choose File and click Start upgrade.
In our example its tasmota-sensors.bin.

image

You will see an Upload starting... and then Upload successful message. Wait until the device restarts, reconnect back to the web UI and check the firmware version on the bottom of the page or in the Information tab of the webUI.

Minimal build upgrade step

If the binary you're upgrading with is larger than 500kb you also need to download the minimal build (tasmota-minimal.bin(.gz)) since the upload process needs the space in flash memory to upload the new binary.

When you try to immediately upgrade with the new binary without using smaller minimal firmware you will be greeted with this error.

Upgrading_4

Minimal build upgrade step

This step is necessary only if you get the above error
Browse to the minimal binary with Choose File. The chosen filename should be visible.
In our example its tasmota-minimal.bin.

minimal upgrade

Wait until the device restarts. In the Main Menu web UI will display this warning message on top.

minimal message

Proceed to upgrade

Using Commands~

Your device can be upgraded using commands via MQTT, web requests or Console in the web UI.

OtaUrl is used to set your OTA address.

OtaUrl http://ota.tasmota.com/tasmota/tasmota-sensors.bin

In this example we chose a development branch version with additional sensors support

Initiate upgrade from OTA server

Upgrade 1

Wait for the upgrade process to complete and check the Tasmota version. In console you can use Status 2.

Using Device Button~

Devices with a built in button (the one used to put your device into flash mode) can initiate OTA upgrade with it.

7 short presses of the button will start OTA download of firmware using the Ota Url. Device LED is lit during the update.

Serial Upgrade~

Upgrade over the serial connection using serial-to-USB adapter.

Upload the new version over serial using the same process as in Flashing but DO NOT erase flash. The new binary will overwrite the old one and keep your settings.

External Programs~

Tasmota Device Manager or TDM is a multiplatform GUI application written in Python for discovery and management of Tasmota devices. You can set up OTA url and initiate OTA upgrade from TDM using GUI.

openHAB - implement an automation rule to upgrade devices from openHAB

Node-RED OTA server and firmware manager - Node-RED flow for managing OTA updates

OTA over SCP - setup and configure "OTA over SCP" upload for PlatformIO

Private OTA Server~

It is possible to create your own simple http OTA server (https is not supported) using Python and perform upgrades from there. Install Python3 and from the folder where the binary resides (make sure tasmota-minimal.bin is located there too) run:

python -m http.server 8000

(If the response is "No module named http" then try again with python3 instead of python.)

Change your OtaUrl to http://ipoftheserver:8000/yourbinary.bin(.gz) and start the upgrade process. Note: do not use /, -, or . characters in the name of yourbinary.

If your binary build (yourbinary.bin) is larger than the available free flash program space, Tasmota will need to first install the minimal version of Tasmota to make more space. To have this work via the web server OTA process, you have to copy the file tasmota-minimal.bin in the same folder where OTAURL for yourbinary.bin is placed, and rename tasmota-minimal.bin to yourbinary-minimal.bin.

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, Sonoff-Tasmota and ultimately Tasmota.

Intermediate upgrade steps are needed to migrate from older firmware to the current version. No migration is possible from original Sonoff-MQTT-OTA to Sonoff-MQTT-OTA-Arduino v1.0.11.

DO NOT ATTEMPT TO UPGRADE VERSIONS PRIOR TO v7.x STRAIGHT TO THE CURRENT VERSION

Remember that you must take each individual step between the device firmware version and the latest available.You can find all the required binaries in Tasmota Releases listed by version number.

Tip

As a safeguard perform "Backup Configuration" before upgrading. If settings are lost "Restore Configuration" should bring them back.

Upgrading from one minor version to the next is mostly painless as the settings are saved in the same location in flash and newer settings are appended.

As said, mostly painless! There are some deviations to this rule as the flash settings changed.

Upgrade Flow~

v1.0.11  🔀  v3.9.22  🔀  v4.2.0  🔀  v5.14.0  🔀  v6.1.1  🔀  v7.2.0  🔀  v8.1.0  🔀  Current release

Follow the path strictly to ensure success. Do not install only tasmota-minimal.bin but upgrade to full, working firmware. Linked -lite/-classic.bin binaries will do the job.

Tasmota v8.1 introduced a major change in parameter storage.

Downgrading is not recommended and upgrading to 8.1 has to follow the recommended path and can still fail in some cases. Don't forget to backup!

Notice for versions between 6.6.0.7 and 6.6.0.11

If you've used development versions between 6.6.0.7 and 6.6.0.11 back up your device settings. Convert the backup to human readable form as you MUST restore these settings manually.
Perform a Reset 6 before upgrading the firmware and, for safe measure, after the upgrade completes.

Downgrading~

While fallback or downgrading is common practice it was never supported due to Settings additions or changes in newer releases.

Starting with release v8.1.0 Doris settings in flash are re-allocated in such a way that fallback is only allowed and possible to v7.2.0. Once at v7.2.0 you're on your own when downgrading even further.

Backing Up Settings~

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).

To avoid this use our decode-config tool to easily create and restore backups in Tasmota:

decode-config tool~

  • decode-config - OS independent Python program to backup and restore Tasmota configuration data, also available as precompiled executables for Windows, MacOS and Linux. See Using instructions for details.
    If using one of the precompiled binary for your OS replace decode-config.py with decode-config_win32.exe, decode-config_win64.exe, decode-config_mac or decode-config_linux from the instruction examples.

1. make a configuration backup:

  • Create a new backup straight from your device

    decode-config.py --source <deviceIP> --backup-file Config-@f

    @f will be replaced by decode-config to device's FriendlyName

or

  • Create a backup from previously made .dmp file

decode-config.py --source <dmp_filename> --backup-file Config-@f

2. perform a device reset

Erase flash settings area but keep Wi-Fi and MQTT settings

Reset 6

3. upgrade the firmware via OTA or file upload

4. restore configuration

decode-config.py --source <deviceIP> --restore-file <backupfile>

...and you're done!

If you can't restore configuration directly you can configure the device manually referring to the Commands article and the settings (e.g., SetOptions, Rules, etc.) in the JSON file you created in step #1. You can paste the JSON into a JSON parser to make it easily readable.

Tip

If Backup Configuration -> Restore Configuration fails, reset to firmware defaults and use decode-config tool to restore your backed up configuration.