diff --git a/mock-api/package.json b/mock-api/package.json index a69838102..ec99d5d92 100644 --- a/mock-api/package.json +++ b/mock-api/package.json @@ -17,5 +17,5 @@ "@trivago/prettier-plugin-sort-imports": "^6.0.2", "prettier": "^3.9.8" }, - "packageManager": "pnpm@12.4.2" + "packageManager": "pnpm@12.6.0" } diff --git a/mock-api/pnpm-lock.yaml b/mock-api/pnpm-lock.yaml index 8f42cb36a..016e5a7de 100644 --- a/mock-api/pnpm-lock.yaml +++ b/mock-api/pnpm-lock.yaml @@ -7,153 +7,153 @@ importers: configDependencies: {} packageManagerDependencies: pnpm: - specifier: 12.4.2 - version: 12.4.2 + specifier: 12.6.0 + version: 12.6.0 packages: - '@pnpm/exe.android-arm64@12.4.2': - resolution: {integrity: sha512-E255MbcQ0V1577M2BV0ajWuP7KmTPYA0jqZnk3rK6Lq3kTvZWulMMb7iqRmnLsQbyWTkMEB2CfyM70loVDA8xg==} + '@pnpm/exe.android-arm64@12.6.0': + resolution: {integrity: sha512-kviIHft9h02q+7N2In7tSL9T/HRUSGwYmU74YPtsWU5ee7vgqPyC0JT6RRX6miW+NxX1CvHgQxg69qq1qTLJYQ==} cpu: [arm64] os: [android] - '@pnpm/exe.android-x64@12.4.2': - resolution: {integrity: sha512-J1pSeCUwuKxMG70ZzpWn8JzElxiEa8NN/3N0SlZRtU2xbztChaJCKF3HaBNIj9yPfeofWzJo/lwNvDDjraQuZw==} + '@pnpm/exe.android-x64@12.6.0': + resolution: {integrity: sha512-CT8aJKLq2mtZFE71pr4E5Z2xHL8uGnRGr+NclDqsXlVF4SVcQ2QAs14mWi0C8gjT4hbmi+Q0lJRRIkMAWfjjng==} cpu: [x64] os: [android] - '@pnpm/exe.darwin-arm64@12.4.2': - resolution: {integrity: sha512-A0WDo8iErfZBXgrLseQxw8i8Y9ctUpOEl/Uu+cubnTzpD8tT9ykIB548L8YTM2WD4OS+ZOHSxy8aGZcvKq8PaQ==} + '@pnpm/exe.darwin-arm64@12.6.0': + resolution: {integrity: sha512-rafpVkjzugKBMxSvGQd5wK1x5eOTkD/+lcJIFHeQhvd+BJ8kDisOOvwhQDrpGd4vd2Fx+hhW0P2Ptt638OlhFg==} cpu: [arm64] os: [darwin] - '@pnpm/exe.darwin-x64@12.4.2': - resolution: {integrity: sha512-MSgJdovBWHcb5DEOvfPH9yNi/T5O1Xa4ess+E1ESGo/5yuty7S4JoiIjami+fsNXfnoQMlwsMUqYU4zAvBcNCw==} + '@pnpm/exe.darwin-x64@12.6.0': + resolution: {integrity: sha512-72Jpuv1m24gI8zUNcaylYpBWEhBzz1VPhnDIU2GYM2eRP+KsOqVLwV78i+JrihI39zY2NNXmaN4eAKX1inpaDQ==} cpu: [x64] os: [darwin] - '@pnpm/exe.freebsd-x64@12.4.2': - resolution: {integrity: sha512-h2YumlQSNvgbRPv+RXwABohX65f9bOBZn+jMIt7bFDISZPCzQ+Nvpt6Awbp4ip5PwQgYxbu5iREJ1fHE39Fm8A==} + '@pnpm/exe.freebsd-x64@12.6.0': + resolution: {integrity: sha512-LON4QgNy1w/XF4uySZIyC/5hEB0oGdelXsY9tSKqstER+2j2X2oHz67skD11RRd/HWFRtMr64shQZ4I9ZoZ0zg==} cpu: [x64] os: [freebsd] - '@pnpm/exe.linux-arm64-musl@12.4.2': - resolution: {integrity: sha512-LwSEtSEDTv6S51YLs3YvSkPyun/QmfMic1UGICUkPWFu6ByP43RdMlkKvmVkfGhAYCpnxO057vrmyJqtfZrPCA==} + '@pnpm/exe.linux-arm64-musl@12.6.0': + resolution: {integrity: sha512-BdDpX+DeaMUc5x6WNcE6FkmFy36NwrBbBvwsZU737Zt3u1fTY+iKFPchjEQNCM4rT6q6xvF2oN3ZwExGsJCkxQ==} cpu: [arm64] os: [linux] libc: [musl] - '@pnpm/exe.linux-arm64@12.4.2': - resolution: {integrity: sha512-2dSiDXyhx+RTHsewxex8f/jVjqQXWJ2oow4kCVHEWdZKeBpgMxvZ6fHkTAUBJXgqhbKIDHvuNlZBP7gJfUWL5A==} + '@pnpm/exe.linux-arm64@12.6.0': + resolution: {integrity: sha512-8h2sNoIhHDpHDYqZZCh9PXr6krqW10btb0GHVGuw710muDHlFAHMtUG2ogmaHge6zJG1xgY4Y7mwX5g/LWvrYg==} cpu: [arm64] os: [linux] libc: [glibc] - '@pnpm/exe.linux-ppc64@12.4.2': - resolution: {integrity: sha512-8Itc+jQk+MTz04LS9D1RcH+VctAWmzM4l1cJQ+Sx7pAJNo7EKHdRMbC0Tok1jyQ7eEHNJZD5EleYneZqWfZM+g==} + '@pnpm/exe.linux-ppc64@12.6.0': + resolution: {integrity: sha512-ld6xgcEhFCFrsVsJhbmdmR714PnsEspO/Ij8w0/D7OSiz2hYGu3fZd5tKRxOI5m6H6Gl0/RRFAPncTHbsgXVjQ==} cpu: [ppc64] os: [linux] libc: [glibc] - '@pnpm/exe.linux-riscv64@12.4.2': - resolution: {integrity: sha512-hleOeqhTVpH+z9RVMGnxvU4ZnrkBUClWjCbHD9u6kwyqhGSpevoU1wTGish+CBRhmIgMAy9pAfFpqhbAKOKNfw==} + '@pnpm/exe.linux-riscv64@12.6.0': + resolution: {integrity: sha512-HIbImydoC3J8NFt+8MXfhTCf5rO6NjCMyinSAHac0VmV8uCHw+kbQkyAzxV84rzz9ZOzmBOnj0b1N461UIYGsw==} cpu: [riscv64] os: [linux] libc: [glibc] - '@pnpm/exe.linux-s390x@12.4.2': - resolution: {integrity: sha512-LAsQRRdP9aToENR6dtcIJ9l+e1zMYOX0tQcLGpRyLPVBQcYRLlvAPcmDshsiIHQjp05SDa9FI0czX1ZQ1a7a/A==} + '@pnpm/exe.linux-s390x@12.6.0': + resolution: {integrity: sha512-DjSqT7+BZ/lWcDHwNMuzsRVfyxUimh+D54Xw4tSWbdVVQhtWtNMUyI93LVnwCmsoEpar2gC3SFeAgywx37svKQ==} cpu: [s390x] os: [linux] libc: [glibc] - '@pnpm/exe.linux-x64-musl@12.4.2': - resolution: {integrity: sha512-kzfzH2/0BWdTABK14Yj5a1xsdkTEQUp2eXEPNakaD9jKL025lq3hyaKHIz/gIZaPDMe/1bFFK/En4ztFlbBJxw==} + '@pnpm/exe.linux-x64-musl@12.6.0': + resolution: {integrity: sha512-31lKeGPmRE6xfV6I3VjaEGVFRei14pl/zgoFDK4w+UkbJqOuNl2Ht3O1GuqNIg3Gl14qTEb4kZRAYFHXifDx9A==} cpu: [x64] os: [linux] libc: [musl] - '@pnpm/exe.linux-x64@12.4.2': - resolution: {integrity: sha512-/pbt0UVTa8NMDhzOWLQRfZ6G9ROKXlJPZtx845BqyWfc7hCrWXhTLBd70yO2y8+E+IWN3oHM1s/JsIQNGk1yvg==} + '@pnpm/exe.linux-x64@12.6.0': + resolution: {integrity: sha512-qFWBneHJAJ73W4whtbaFOL1M/7DBC6ILHXuxc7ZPtEhfPuT1zeZiGrmKHoMAfJA+mcm6xhOFljqVTUS+00Jabw==} cpu: [x64] os: [linux] libc: [glibc] - '@pnpm/exe.win32-arm64@12.4.2': - resolution: {integrity: sha512-PsW19e4dAUNpZ0cS9flaxFuAmpt2dKlH/Vvi8TZ4qyJjjQzue/CEsWm+6wKVP4CJ7IT8RdL4qh+soOPWIgF2Zw==} + '@pnpm/exe.win32-arm64@12.6.0': + resolution: {integrity: sha512-OhfefXEEykZlslSUhR8PPRe6MVPV3Oink/dVfIecE5velpc7j80cZYsHlaDrtRDcm3TPwQHkaRW1SJ1efX9oFg==} cpu: [arm64] os: [win32] - '@pnpm/exe.win32-x64@12.4.2': - resolution: {integrity: sha512-+xGoeE0g55ztWvl8i5QqdmNfW3nIrTVcoQrNshEOwxthm9Ag48oXton3uxOA3/SANyz5AXexEjj2KO20NnOrEw==} + '@pnpm/exe.win32-x64@12.6.0': + resolution: {integrity: sha512-L2tuyrD2+Imgxs3VK/ST/2L3xD6vDP0ktJQxM0TaGw7TbAQEMq+RMc8iK6Ew7Id579uzjJe8jSfJID2ZGsOHCA==} cpu: [x64] os: [win32] - pnpm@12.4.2: - resolution: {integrity: sha512-CK3GYTGAJ1x8ntraOdzwjJxhrU5+rzMKTzRh8QKw+QdCNFTRF/mOctR/7wYWBwZE17/8lzpqV/UJCm18NosHyQ==} + pnpm@12.6.0: + resolution: {integrity: sha512-PvaPlRyxEawgS0paFvCy3fDaVqluBBPoHYVdnwtV75JnFHCQKOHNAMQFwsX7e56OxNxGd3yAXQNzwvL/AP0g7A==} engines: {node: '>=18.*'} hasBin: true snapshots: - '@pnpm/exe.android-arm64@12.4.2': + '@pnpm/exe.android-arm64@12.6.0': optional: true - '@pnpm/exe.android-x64@12.4.2': + '@pnpm/exe.android-x64@12.6.0': optional: true - '@pnpm/exe.darwin-arm64@12.4.2': + '@pnpm/exe.darwin-arm64@12.6.0': optional: true - '@pnpm/exe.darwin-x64@12.4.2': + '@pnpm/exe.darwin-x64@12.6.0': optional: true - '@pnpm/exe.freebsd-x64@12.4.2': + '@pnpm/exe.freebsd-x64@12.6.0': optional: true - '@pnpm/exe.linux-arm64-musl@12.4.2': + '@pnpm/exe.linux-arm64-musl@12.6.0': optional: true - '@pnpm/exe.linux-arm64@12.4.2': + '@pnpm/exe.linux-arm64@12.6.0': optional: true - '@pnpm/exe.linux-ppc64@12.4.2': + '@pnpm/exe.linux-ppc64@12.6.0': optional: true - '@pnpm/exe.linux-riscv64@12.4.2': + '@pnpm/exe.linux-riscv64@12.6.0': optional: true - '@pnpm/exe.linux-s390x@12.4.2': + '@pnpm/exe.linux-s390x@12.6.0': optional: true - '@pnpm/exe.linux-x64-musl@12.4.2': + '@pnpm/exe.linux-x64-musl@12.6.0': optional: true - '@pnpm/exe.linux-x64@12.4.2': + '@pnpm/exe.linux-x64@12.6.0': optional: true - '@pnpm/exe.win32-arm64@12.4.2': + '@pnpm/exe.win32-arm64@12.6.0': optional: true - '@pnpm/exe.win32-x64@12.4.2': + '@pnpm/exe.win32-x64@12.6.0': optional: true - pnpm@12.4.2: + pnpm@12.6.0: optionalDependencies: - '@pnpm/exe.android-arm64': 12.4.2 - '@pnpm/exe.android-x64': 12.4.2 - '@pnpm/exe.darwin-arm64': 12.4.2 - '@pnpm/exe.darwin-x64': 12.4.2 - '@pnpm/exe.freebsd-x64': 12.4.2 - '@pnpm/exe.linux-arm64': 12.4.2 - '@pnpm/exe.linux-arm64-musl': 12.4.2 - '@pnpm/exe.linux-ppc64': 12.4.2 - '@pnpm/exe.linux-riscv64': 12.4.2 - '@pnpm/exe.linux-s390x': 12.4.2 - '@pnpm/exe.linux-x64': 12.4.2 - '@pnpm/exe.linux-x64-musl': 12.4.2 - '@pnpm/exe.win32-arm64': 12.4.2 - '@pnpm/exe.win32-x64': 12.4.2 + '@pnpm/exe.android-arm64': 12.6.0 + '@pnpm/exe.android-x64': 12.6.0 + '@pnpm/exe.darwin-arm64': 12.6.0 + '@pnpm/exe.darwin-x64': 12.6.0 + '@pnpm/exe.freebsd-x64': 12.6.0 + '@pnpm/exe.linux-arm64': 12.6.0 + '@pnpm/exe.linux-arm64-musl': 12.6.0 + '@pnpm/exe.linux-ppc64': 12.6.0 + '@pnpm/exe.linux-riscv64': 12.6.0 + '@pnpm/exe.linux-s390x': 12.6.0 + '@pnpm/exe.linux-x64': 12.6.0 + '@pnpm/exe.linux-x64-musl': 12.6.0 + '@pnpm/exe.win32-arm64': 12.6.0 + '@pnpm/exe.win32-x64': 12.6.0 --- lockfileVersion: '9.0' diff --git a/src/core/system.cpp b/src/core/system.cpp index 90c53fbc6..8ffdede52 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -1595,7 +1595,7 @@ bool System::check_upgrade() { // if we're coming from 3.4.4 or 3.5.0b14 which had no version stored then we need to apply new settings if (missing_version) { - LOG_INFO("Upgrade: Setting MQTT Entity ID format to older v3.4 format (0)"); + LOG_INFO("Upgrade: setting MQTT Entity ID format to older v3.4 format (0)"); EMSESP::esp32React.getMqttSettingsService()->update([&](MqttSettings & mqttSettings) { mqttSettings.entity_format = Mqtt::entityFormat::SINGLE_LONG; // use old Entity ID format from v3.4 return StateUpdateResult::CHANGED; @@ -1604,11 +1604,11 @@ bool System::check_upgrade() { EMSESP::esp32React.getMqttSettingsService()->update([&](MqttSettings & mqttSettings) { if (mqttSettings.entity_format == 1) { mqttSettings.entity_format = Mqtt::entityFormat::SINGLE_OLD; // use old Entity ID format from v3.6 - LOG_INFO("Upgrade: Setting MQTT Entity ID format to v3.6 format (3)"); + LOG_INFO("Upgrade: setting MQTT Entity ID format to v3.6 format (3)"); return StateUpdateResult::CHANGED; } else if (mqttSettings.entity_format == 2) { mqttSettings.entity_format = Mqtt::entityFormat::MULTI_OLD; // use old Entity ID format from v3.6 - LOG_INFO("Upgrade: Setting MQTT Entity ID format to v3.6 format (4)"); + LOG_INFO("Upgrade: setting MQTT Entity ID format to v3.6 format (4)"); return StateUpdateResult::CHANGED; } return StateUpdateResult::UNCHANGED; @@ -1624,12 +1624,12 @@ bool System::check_upgrade() { auto changed = StateUpdateResult::UNCHANGED; if (networkSettings.tx_power == 20) { networkSettings.tx_power = WIFI_POWER_19_5dBm; // use 19.5 as we don't have 20 anymore - LOG_INFO("Upgrade: Setting WiFi TX Power to Auto"); + LOG_INFO("Upgrade: setting WiFi TX Power to Auto"); changed = StateUpdateResult::CHANGED; } if (networkSettings.nosleep != true) { networkSettings.nosleep = true; - LOG_INFO("Upgrade: Disabling WiFi nosleep"); + LOG_INFO("Upgrade: disabling WiFi nosleep"); changed = StateUpdateResult::CHANGED; } return changed; @@ -1657,7 +1657,7 @@ bool System::check_upgrade() { EMSESP::esp32React.getAPSettingsService()->update([&](APSettings & apSettings) { if (apSettings.provisionMode == 0) { apSettings.provisionMode = AP_MODE_DISCONNECTED; // AP_MODE_DISCONNECTED is the new default - LOG_INFO("Upgrade: Setting AP provision mode to on disconnect"); + LOG_INFO("Upgrade: setting AP provision mode to on disconnect"); return StateUpdateResult::CHANGED; } return StateUpdateResult::UNCHANGED; @@ -1693,7 +1693,7 @@ bool System::check_upgrade() { } if (old_format) { - LOG_INFO("Upgrade: Migrating %d Scheduler entries to the new Commands Service", (int)oldScheduleItems.size()); + LOG_INFO("Upgrade: migrating %d Scheduler entries to the new Commands Service", (int)oldScheduleItems.size()); // create a Command for each Scheduler entry, reusing the entry's name (generating one if empty) EMSESP::webCommandService.update([&](WebCommands & commands) { @@ -1771,7 +1771,7 @@ bool System::check_upgrade() { }); } else if (this_version < settings_version) { // downgrading - LOG_NOTICE("Downgrading from version %d.%d.%d%s to version %d.%d.%d%s", + LOG_NOTICE("Upgrade: downgrading from version %d.%d.%d%s to version %d.%d.%d%s", settings_version.major(), settings_version.minor(), settings_version.patch(), @@ -1788,13 +1788,13 @@ bool System::check_upgrade() { if (save_version) { EMSESP::webSettingsService.update([&](WebSettings & settings) { settings.version = EMSESP_APP_VERSION; - LOG_DEBUG("Upgrade: Setting version to %s", EMSESP_APP_VERSION); + LOG_DEBUG("Upgrade: setting version to %s", EMSESP_APP_VERSION); return StateUpdateResult::CHANGED; }); } if (reboot_required) { - LOG_INFO("Upgrade: Rebooting to apply changes"); + LOG_INFO("Upgrade: rebooting to apply changes"); return true; // need reboot } diff --git a/src/emsesp_version.h b/src/emsesp_version.h index a0b2b0af5..7d790a329 100644 --- a/src/emsesp_version.h +++ b/src/emsesp_version.h @@ -1 +1 @@ -#define EMSESP_APP_VERSION "3.9.0-dev.12" +#define EMSESP_APP_VERSION "3.9.0-dev.13" diff --git a/src/web/WebStatusService.cpp b/src/web/WebStatusService.cpp index 804e7bdff..9c17e0296 100644 --- a/src/web/WebStatusService.cpp +++ b/src/web/WebStatusService.cpp @@ -405,31 +405,33 @@ void WebStatusService::schedule_versions_refresh() { versions_next_fetch_ms_ = next; } -// refresh of the cached versions.json, at most once a day +// refresh of the cached versions.json void WebStatusService::loop() { #ifndef EMSESP_STANDALONE - // with auto_fw_check off we only reach out to emsesp.org when the WebUI asks for version - // information, so an unattended system never contacts it at all - if (!EMSESP::system_.auto_fw_check() && !versions_fetch_requested_) { - return; - } // need a network if (!EMSESP::network_.network_connected()) { return; } - // 0 = idle, nothing scheduled - if (versions_next_fetch_ms_ == 0) { - return; - } + // a request from getVersions() always forces a fetch, bypassing the schedule and any backoff + if (!versions_fetch_requested_.exchange(false)) { + // with auto_fw_check off we only reach out to emsesp.org when the WebUI asks for version + // information, so an unattended system never contacts it at all + if (!EMSESP::system_.auto_fw_check()) { + return; + } - // not time yet (signed difference handles uint32 wrap) - if ((int32_t)(uuid::get_uptime() - versions_next_fetch_ms_) < 0) { - return; - } + // 0 = idle, nothing scheduled + if (versions_next_fetch_ms_ == 0) { + return; + } - versions_fetch_requested_ = false; + // not time yet (signed difference handles uint32 wrap) + if ((int32_t)(uuid::get_uptime() - versions_next_fetch_ms_) < 0) { + return; + } + } uint32_t interval; if (refresh_versions_cache()) {