Updates migrate_sonoff_tasmota.rst. Improves information about compressed images. (#3004)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: H. Árkosi Róbert <robreg@zsurob.hu>
This commit is contained in:
F.D.Castel 2023-06-27 16:45:37 -03:00 committed by GitHub
parent d44b4e11fe
commit 2ed4b09706
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 62 additions and 15 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -1,28 +1,47 @@
Migrating from Sonoff Tasmota
=============================
Migrating from Tasmota
======================
.. seo::
:description: Migration guide for installing ESPHome on ESPs running Sonoff Tasmota.
:description: Migration guide for installing ESPHome on ESPs running Tasmota.
:image: tasmota.svg
Migrating from previous Sonoff Tasmota setups is very easy. You just need to have
Migrating from previous Tasmota setups is very easy. You just need to have
ESPHome create a binary for you and then upload that in the Tasmota web interface.
Getting the Binary
------------------
First create a configuration for your device. Then, generate and download the legacy binary:
First create a configuration for your device. Then, generate and download the firmware image:
- **Using the Home Assistant add-on/dashboard**: Just click the ``COMPILE``
button, wait for the compilation to end and press the ``DOWNLOAD BINARY``
button.
Using the Home Assistant add-on/dashboard
`````````````````````````````````````````
.. figure:: images/download_binary.png
From the card of your device: open **the three dots menu** and select **Install** option.
- **Using the command line**: run ``esphome livingroom.yaml compile`` (replacing
``livingroom.yaml`` with your configuration file of course) and navigate to the
``<NODE_NAME>/.pioenvs/<NODE_NAME>/`` folder. There you will find a ``firmware.bin`` file.
This is the binary that you will upload.
.. figure:: images/dashboard-install.png
A new dialog will open. Click on **Manual download** option.
.. figure:: images/dashboard-install-manual.png
Finally, choose **modern format** in the last dialog.
.. figure:: images/dashboard-install-manual-modern.png
The build process of the firmware will start and the image will be automatically downloaded after its completion.
Using the command line
``````````````````````
From your configuration files folder, run
::
esphome <MY_DEVICE>.yaml compile
replacing ``<MY_DEVICE>.yaml`` with your configuration file and navigate to the ``<MY_DEVICE>/.pioenvs/<MY_DEVICE>/`` folder.
There you will find a ``firmware.bin`` file. This is the binary that you will upload.
Uploading the Binary
--------------------
@ -55,10 +74,38 @@ Happy Hacking!
switching from Tasmota, you need to power-cycle the device once. After that
the dimming functionality will work as usual and no more power cycles are required.
About image size and ESP8266
----------------------------
.. note::
ESP8266 has very limited storage space. Trying to upload a large image will cause the
upgrade process to fail.
If you are using Tasmota 8+ on ESP8266 and get an error after uploading the firmware, first upload ``tasmota-minimal.bin.gz`` from Tasmota repository, next upload firmware generated from ESPHome. Another way to try is to simply ``gzip`` the ESPHome binary and upload the ``.gz`` file instead. If you are using Tasmota 7.2+ it is necessary to run the command “SetOption78 1” in the Tasmota console and restart your device to be able to upgrade to esphome.
Tasmota 8.2 introduced upgrading using gzipped binaries which are smaller in size and
make the upgrade process easier.
- If you are using Tasmota 8.2 or later (recommended) you probably will want to compress the firmware generated from ESPHome with ``gzip`` before uploading it.
- If you are using any version older than 8.2: first upload ``tasmota-minimal.bin`` from Tasmota repository. Then upload the firmware generated from ESPHome.
- Alternatively, first upgrade Tasmota to the latest version. Then use the first (gzip, recommended) method.
If you are using Tasmota 7.2+ it may be necessary to run the command ``SetOption78 1`` in the
Tasmota console and restart your device to be able to upgrade to esphome.
Automated migration from console
--------------------------------
You may also use Tasmota console to invoke the upgrade with just two commands:
::
OtaUrl http://<MY-ESPHOME:6502>/download.bin?configuration=<MY_DEVICE>.yaml&type=firmware-factory.bin&compressed=1
Upgrade 1
replacing ``http://<MY-ESPHOME:6502>/`` with the host and port of your ESPHome installation and ``<MY_DEVICE>.yaml``
with your device configuration file name.
If you need to use the uncompressed image for any reason, just remove ``&compressed=1`` from the above url.
See Also
--------