diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 97d4a34d6..ce6c4963f 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -65,6 +65,7 @@ The following binary downloads have been compiled with ESP8266/Arduino library c - Fix Display handling of hexadecimal escape characters (#7387) - Fix ``WakeUp `` ignores provided value (#7473) - Fix exception 9 restart on log message in Ticker interrupt service routines NTP, Wemos and Hue emulation (#7496) +- Fix ``PowerDelta`` zero power detection (#7515) - Add command ``SetOption79 0/1`` to enable reset of counters at teleperiod time by Andre Thomas (#7355) - Add command ``SetOption82 0/1`` to limit the CT range for Alexa to 200..380 - Add command ``ShutterButton `` to control shutter(s) by to-scho (#7403) diff --git a/tasmota/CHANGELOG.md b/tasmota/CHANGELOG.md index 44b9cedb0..e1d562772 100644 --- a/tasmota/CHANGELOG.md +++ b/tasmota/CHANGELOG.md @@ -2,6 +2,8 @@ ### 8.1.0.4 20200116 +- Fix ``PowerDelta`` zero power detection (#7515) +- Fix OTA minimal gzipped detection regression from 8.1.0.3 - Add web page sliders when ``SetOption37 128`` is active allowing control of white(s) ### 8.1.0.3 20200106 diff --git a/tasmota/support_tasmota.ino b/tasmota/support_tasmota.ino index 1bbae6f1b..2fc83f53d 100644 --- a/tasmota/support_tasmota.ino +++ b/tasmota/support_tasmota.ino @@ -887,14 +887,19 @@ void Every250mSeconds(void) if (RtcSettings.ota_loader) { char *bch = strrchr(mqtt_data, '/'); // Only consider filename after last backslash prevent change of urls having "-" in it char *pch = strrchr((bch != nullptr) ? bch : mqtt_data, '-'); // Change from filename-DE.bin into filename-minimal.bin -// char *ech = strrchr((bch != nullptr) ? bch : mqtt_data, '.'); // Change from filename.bin into filename-minimal.bin - char *ech = strchr((bch != nullptr) ? bch : mqtt_data, '.'); // Change from filename.bin into filename-minimal.bin or filename.bin.gz into filename-minimal.bin.gz - if (!pch) { pch = ech; } + char *ech = strrchr((bch != nullptr) ? bch : mqtt_data, '.'); // Find file type (none, .bin or .bin.gz) + if ((ech != nullptr) && (0 == strncasecmp_P(ech, PSTR(".GZ"), 3))) { + char *fch = ech; + *fch = '\0'; + ech = strrchr((bch != nullptr) ? bch : mqtt_data, '.'); // Find file type .bin.gz + *fch = '.'; + } + char ota_url_type[strlen(ech) +1]; + strncpy(ota_url_type, ech, sizeof(ota_url_type)); // Either nothing, .bin or .bin.gz + if (pch == nullptr) { pch = ech; } if (pch) { mqtt_data[pch - mqtt_data] = '\0'; -// char *ech = strrchr(SettingsText(SET_OTAURL), '.'); // Change from filename.bin into filename-minimal.bin - char *ech = strchr(SettingsText(SET_OTAURL), '.'); // Change from filename.bin into filename-minimal.bin - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s-" D_JSON_MINIMAL "%s"), mqtt_data, ech); // Minimal filename must be filename-minimal + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s-" D_JSON_MINIMAL "%s"), mqtt_data, ota_url_type); // Minimal filename must be filename-minimal } } #endif // FIRMWARE_MINIMAL