From fcec346db8f455f7f080366bed9274b687131bcf Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Wed, 6 Apr 2022 15:02:15 +0200 Subject: [PATCH] Fix ESP32 save settings after OTA upload Fix ESP32 save settings after OTA upload regression from v10.0.0.3 --- CHANGELOG.md | 2 +- RELEASENOTES.md | 1 + tasmota/support_tasmota.ino | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c189d9bd..47ee6ba4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ All notable changes to this project will be documented in this file. - Remove support for Internet Explorer by allowing ECMAScript6 syntax using less JavaScript code bytes (#15280) ### Fixed - +- ESP32 save settings after OTA upload regression from v10.0.0.3 ## [11.0.0.4] 20220402 ### Added diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 487d6768d..075f722ab 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -153,6 +153,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo - Wiegand 34-bit rfid reading and presentation [#14834](https://github.com/arendst/Tasmota/issues/14834) - Orno WE517 power meter phase 2 current reactive [#14841](https://github.com/arendst/Tasmota/issues/14841) - NeoPool NPBit and NPRead/NPReadL output +- ESP32 save settings after OTA upload regression from v10.0.0.3 - ESP32 PowerOnState [#15084](https://github.com/arendst/Tasmota/issues/15084) ### Removed diff --git a/tasmota/support_tasmota.ino b/tasmota/support_tasmota.ino index fed56a30c..9af1b89f1 100644 --- a/tasmota/support_tasmota.ino +++ b/tasmota/support_tasmota.ino @@ -1172,7 +1172,6 @@ void Every250mSeconds(void) if (2 == TasmotaGlobal.ota_state_flag) { RtcSettings.ota_loader = 0; // Try requested image first ota_retry_counter = OTA_ATTEMPTS; - ESPhttpUpdate.rebootOnUpdate(false); SettingsSave(1); // Free flash for OTA update } if (TasmotaGlobal.ota_state_flag <= 0) { @@ -1247,10 +1246,12 @@ void Every250mSeconds(void) AddLog(LOG_LEVEL_INFO, "OTA: unsupported protocol"); ota_result = -999; } else { + httpUpdateLight.rebootOnUpdate(false); ota_result = (HTTP_UPDATE_FAILED != httpUpdateLight.update(OTAclient, version)); } #else // standard OTA over HTTP WiFiClient OTAclient; + ESPhttpUpdate.rebootOnUpdate(false); ota_result = (HTTP_UPDATE_FAILED != ESPhttpUpdate.update(OTAclient, full_ota_url, version)); #endif if (!ota_result) {