Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
Fix occasional connection error when flashing ESP32 firmware via file upload.
Explanation: when uploading a new firmware with file upload, the first step is to restart Tasmota and switch to Safeboot partition. The browser polls the Tasmota device until it reboots and confirms that the safeboot is the active partition.
The partition switch is done by calling /u4?u4=fct&api=" which returns false if the partition is the normal one (and forces reboot) and true if it's the safeboot.
As soon as true is received, the browser send a POST request to upload the firmware. The problem is that sometimes the POST is sent too soon. I'm not sure why but the webserver initialization does not seem to be complete.
This patch adds a delay of 1 second between the confirmation of safeboot switch and sending the firmware.
Checklist:
[x] The pull request is done against the latest development branch
[x] Only relevant files were touched
[x] Only one feature/fix was added per PR and the code change compiles without warnings
[ ] The code change is tested and works with Tasmota core ESP8266 V.2.7.6
[x] The code change is tested and works with Tasmota core ESP32 V.3.0.0
Description:
Fix occasional connection error when flashing ESP32 firmware via file upload.
Explanation: when uploading a new firmware with file upload, the first step is to restart Tasmota and switch to Safeboot partition. The browser polls the Tasmota device until it reboots and confirms that the safeboot is the active partition.
The partition switch is done by calling
/u4?u4=fct&api="
which returnsfalse
if the partition is the normal one (and forces reboot) andtrue
if it's the safeboot.As soon as
true
is received, the browser send aPOST
request to upload the firmware. The problem is that sometimes thePOST
is sent too soon. I'm not sure why but the webserver initialization does not seem to be complete.This patch adds a delay of 1 second between the confirmation of safeboot switch and sending the firmware.
Checklist:
NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass