Created Upgrading (markdown)

blakadder 2019-04-09 22:30:04 +02:00
parent 09c3d45323
commit 5c3b86ff96
1 changed files with 98 additions and 0 deletions

98
Upgrading.md Normal file

@ -0,0 +1,98 @@
Easily upgrade Tasmota to a newer version or different build while keeping all your settings.
# OTA upgrade
Most convenient way to upgrade. Open a web browser to you device's Web UI and select Firmware Upgrade.
![Firmware Upgrade screen](https://user-images.githubusercontent.com/5904370/55826325-144d7f80-5b08-11e9-93dd-5e2160eaa5a4.png)
You are presented with two choices. Using an OTA server or by uploading a downloaded or self-compiled binary file.
![Upgrade choices](https://user-images.githubusercontent.com/5904370/55826754-f92f3f80-5b08-11e9-8329-7c37d43e18cd.png)
## Upgrade by web server
If you want to upgrade to the latest release version click the first **Start Upgrade** button. This screen should appear
![image](https://user-images.githubusercontent.com/5904370/55827075-ac983400-5b09-11e9-83d7-e6d576676db6.png)
During this process Tasmota will download the new firmware from the url and install it. It might need to download **sonoff-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.
### Changing Ota Url
If you wish to switch to a different [build](Builds) you have to change Ota Url to the desired binary from our [OTA Server](http://thehackbox.org/tasmota/release/).
It is also possible to create your own http OTA server (https is not supported) and perform upgrades from there.
Guide to setting up a [**Python HTTP OTA server**](Python-HTTP-OTA-Server).
### OTA upgrade using commands
Your device can be upgraded using [commands](Commands) via MQTT, web requests or Console in the Web UI.
[OtaUrl](Commands#OtaUrl) is used to set your OTA address.
```lua
otaurl http://thehackbox.org/tasmota/020500/sonoff-sensors.bin
```
*In this example we chose a development branch version with additional sensors support based on a 2.5 core*
Initiate [upgrade](Commands#upgrade) from OTA server
```lua
upgrade 1
```
Wait for the upgrade process to complete and check the Tasmota version. If in console you can use `status 2`.
## Upgrade by file upload
This process requires you to have a minimal build ([sonoff-minimal.bin](http://thehackbox.org/tasmota/release/sonoff-minimal.bin)) of the firmware since the upload process needs the space in flash memory to upload the new binary.
When you try to immediately upgrade to a new binary without using minimal firmware you will be greeted with this error.
![Upload error](https://user-images.githubusercontent.com/5904370/55827974-b327ab00-5b0b-11e9-968b-a654c4241ee9.png)
Browse to the minimal binary with **Choose File**. The chosen filename should be visible. *In our example we use **sonoff-minimal.bin***
![minimal upgrade](https://user-images.githubusercontent.com/5904370/55828203-29c4a880-5b0c-11e9-8315-dff8a3aa9134.png)
Wait until the device restarts. Web UI will display this warning message on top.
![minimal message](https://user-images.githubusercontent.com/5904370/55828993-e834fd00-5b0d-11e9-9221-b106f622c9fb.png)
Go to **Firmware Upgrade** again. This time browse to the binary you want to upgrade to with **Choose File** and click **Start upgrade**. *In our example we use **sonoff-sensors.bin***
![image](https://user-images.githubusercontent.com/5904370/55827836-68a62e80-5b0b-11e9-830b-9240d83ba11e.png)
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.
# 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](Flashing) but DO NOT erase flash. The new binary will flash over the old one and keep all your settings intact.
# External programs
[**Tasmota Device Manager**](https://github.com/jziolkowski/tdm) 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**](https://github.com/arendst/Sonoff-Tasmota/wiki/openHAB#maintenance-actions) - implement an automation rule to upgrade devices from openHAB
[**Node-RED OTA server and firmware manager**](https://flows.nodered.org/flow/888b4cd95250197eb429b2f40d188185) - [Node-RED](https://nodered.org/) flow for managing OTA updates
[**OTA over SCP**](OTA-over-SCP) - setup and configure "OTA over SCP" upload for PlatformIO
# Migration path for older releases
Until now several versions of Tasmota have been released starting with the C version Sonoff-MQTT-OTA followed by Sonoff-MQTT-OTA-Arduino and Sonoff-Tasmota.
Migrating from one 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 positions got rearranged. In the next list you'll find an overview of supported migrations paths.
* No migration from **Sonoff-MQTT-OTA** to **Sonoff-MQTT-OTA-Arduino** or **Sonoff-Tasmota**.<br/>The settings flash layout and OTA image locations are different from the Arduino versions
* Easy migration from **Sonoff-MQTT-OTA-Arduino 1.0.11** to **Sonoff-Tasmota 3.9.x**.<br/>After installing Sonoff-Tasmota for the first time some settings need to be adjusted via web configuration or MQTT commands.
* Easy migration from **Sonoff-MQTT-OTA-Arduino 3.1.0** to **Sonoff-Tasmota 4.x**.<br/>After installing Sonoff-Tasmota for the first time some settings need to be adjusted via web configuration or MQTT commands.
* Easy migration from **Sonoff-Tasmota 4.x** to **Sonoff-Tasmota 5.14**.<br/>As a safeguard perform a **Backup Configuration** before installing the new version. If settings are lost after the upgrade perform a **Restore Configuration**.
* Easy migration from **Sonoff-Tasmota 5.2** to **Sonoff-Tasmota 6.x**.<br/>As a safeguard perform a **Backup Configuration** before installing the new version. If settings are lost after the upgrade perform a **Restore Configuration**.
So to migrate from **Sonoff-MQTT-OTA-Arduino versions before 3.1.0** to **Sonoff-Tasmota 6.x** you will need to take four steps:
1. Migrate to **Sonoff-Tasmota 3.9.x**
2. Migrate to **Sonoff-Tasmota 4.x**
3. Migrate to **Sonoff-Tasmota 5.14**
4. Migrate to **Sonoff-Tasmota 6.x**