Merge remote-tracking branch 'emsesp/dev' into dev

This commit is contained in:
MichaelDvP
2026-09-24 08:20:19 +02:00
5 changed files with 90 additions and 88 deletions
+1 -1
View File
@@ -17,5 +17,5 @@
"@trivago/prettier-plugin-sort-imports": "^6.0.2", "@trivago/prettier-plugin-sort-imports": "^6.0.2",
"prettier": "^3.9.8" "prettier": "^3.9.8"
}, },
"packageManager": "pnpm@12.4.2" "packageManager": "pnpm@12.6.0"
} }
+61 -61
View File
@@ -7,153 +7,153 @@ importers:
configDependencies: {} configDependencies: {}
packageManagerDependencies: packageManagerDependencies:
pnpm: pnpm:
specifier: 12.4.2 specifier: 12.6.0
version: 12.4.2 version: 12.6.0
packages: packages:
'@pnpm/exe.android-arm64@12.4.2': '@pnpm/exe.android-arm64@12.6.0':
resolution: {integrity: sha512-E255MbcQ0V1577M2BV0ajWuP7KmTPYA0jqZnk3rK6Lq3kTvZWulMMb7iqRmnLsQbyWTkMEB2CfyM70loVDA8xg==} resolution: {integrity: sha512-kviIHft9h02q+7N2In7tSL9T/HRUSGwYmU74YPtsWU5ee7vgqPyC0JT6RRX6miW+NxX1CvHgQxg69qq1qTLJYQ==}
cpu: [arm64] cpu: [arm64]
os: [android] os: [android]
'@pnpm/exe.android-x64@12.4.2': '@pnpm/exe.android-x64@12.6.0':
resolution: {integrity: sha512-J1pSeCUwuKxMG70ZzpWn8JzElxiEa8NN/3N0SlZRtU2xbztChaJCKF3HaBNIj9yPfeofWzJo/lwNvDDjraQuZw==} resolution: {integrity: sha512-CT8aJKLq2mtZFE71pr4E5Z2xHL8uGnRGr+NclDqsXlVF4SVcQ2QAs14mWi0C8gjT4hbmi+Q0lJRRIkMAWfjjng==}
cpu: [x64] cpu: [x64]
os: [android] os: [android]
'@pnpm/exe.darwin-arm64@12.4.2': '@pnpm/exe.darwin-arm64@12.6.0':
resolution: {integrity: sha512-A0WDo8iErfZBXgrLseQxw8i8Y9ctUpOEl/Uu+cubnTzpD8tT9ykIB548L8YTM2WD4OS+ZOHSxy8aGZcvKq8PaQ==} resolution: {integrity: sha512-rafpVkjzugKBMxSvGQd5wK1x5eOTkD/+lcJIFHeQhvd+BJ8kDisOOvwhQDrpGd4vd2Fx+hhW0P2Ptt638OlhFg==}
cpu: [arm64] cpu: [arm64]
os: [darwin] os: [darwin]
'@pnpm/exe.darwin-x64@12.4.2': '@pnpm/exe.darwin-x64@12.6.0':
resolution: {integrity: sha512-MSgJdovBWHcb5DEOvfPH9yNi/T5O1Xa4ess+E1ESGo/5yuty7S4JoiIjami+fsNXfnoQMlwsMUqYU4zAvBcNCw==} resolution: {integrity: sha512-72Jpuv1m24gI8zUNcaylYpBWEhBzz1VPhnDIU2GYM2eRP+KsOqVLwV78i+JrihI39zY2NNXmaN4eAKX1inpaDQ==}
cpu: [x64] cpu: [x64]
os: [darwin] os: [darwin]
'@pnpm/exe.freebsd-x64@12.4.2': '@pnpm/exe.freebsd-x64@12.6.0':
resolution: {integrity: sha512-h2YumlQSNvgbRPv+RXwABohX65f9bOBZn+jMIt7bFDISZPCzQ+Nvpt6Awbp4ip5PwQgYxbu5iREJ1fHE39Fm8A==} resolution: {integrity: sha512-LON4QgNy1w/XF4uySZIyC/5hEB0oGdelXsY9tSKqstER+2j2X2oHz67skD11RRd/HWFRtMr64shQZ4I9ZoZ0zg==}
cpu: [x64] cpu: [x64]
os: [freebsd] os: [freebsd]
'@pnpm/exe.linux-arm64-musl@12.4.2': '@pnpm/exe.linux-arm64-musl@12.6.0':
resolution: {integrity: sha512-LwSEtSEDTv6S51YLs3YvSkPyun/QmfMic1UGICUkPWFu6ByP43RdMlkKvmVkfGhAYCpnxO057vrmyJqtfZrPCA==} resolution: {integrity: sha512-BdDpX+DeaMUc5x6WNcE6FkmFy36NwrBbBvwsZU737Zt3u1fTY+iKFPchjEQNCM4rT6q6xvF2oN3ZwExGsJCkxQ==}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
libc: [musl] libc: [musl]
'@pnpm/exe.linux-arm64@12.4.2': '@pnpm/exe.linux-arm64@12.6.0':
resolution: {integrity: sha512-2dSiDXyhx+RTHsewxex8f/jVjqQXWJ2oow4kCVHEWdZKeBpgMxvZ6fHkTAUBJXgqhbKIDHvuNlZBP7gJfUWL5A==} resolution: {integrity: sha512-8h2sNoIhHDpHDYqZZCh9PXr6krqW10btb0GHVGuw710muDHlFAHMtUG2ogmaHge6zJG1xgY4Y7mwX5g/LWvrYg==}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
libc: [glibc] libc: [glibc]
'@pnpm/exe.linux-ppc64@12.4.2': '@pnpm/exe.linux-ppc64@12.6.0':
resolution: {integrity: sha512-8Itc+jQk+MTz04LS9D1RcH+VctAWmzM4l1cJQ+Sx7pAJNo7EKHdRMbC0Tok1jyQ7eEHNJZD5EleYneZqWfZM+g==} resolution: {integrity: sha512-ld6xgcEhFCFrsVsJhbmdmR714PnsEspO/Ij8w0/D7OSiz2hYGu3fZd5tKRxOI5m6H6Gl0/RRFAPncTHbsgXVjQ==}
cpu: [ppc64] cpu: [ppc64]
os: [linux] os: [linux]
libc: [glibc] libc: [glibc]
'@pnpm/exe.linux-riscv64@12.4.2': '@pnpm/exe.linux-riscv64@12.6.0':
resolution: {integrity: sha512-hleOeqhTVpH+z9RVMGnxvU4ZnrkBUClWjCbHD9u6kwyqhGSpevoU1wTGish+CBRhmIgMAy9pAfFpqhbAKOKNfw==} resolution: {integrity: sha512-HIbImydoC3J8NFt+8MXfhTCf5rO6NjCMyinSAHac0VmV8uCHw+kbQkyAzxV84rzz9ZOzmBOnj0b1N461UIYGsw==}
cpu: [riscv64] cpu: [riscv64]
os: [linux] os: [linux]
libc: [glibc] libc: [glibc]
'@pnpm/exe.linux-s390x@12.4.2': '@pnpm/exe.linux-s390x@12.6.0':
resolution: {integrity: sha512-LAsQRRdP9aToENR6dtcIJ9l+e1zMYOX0tQcLGpRyLPVBQcYRLlvAPcmDshsiIHQjp05SDa9FI0czX1ZQ1a7a/A==} resolution: {integrity: sha512-DjSqT7+BZ/lWcDHwNMuzsRVfyxUimh+D54Xw4tSWbdVVQhtWtNMUyI93LVnwCmsoEpar2gC3SFeAgywx37svKQ==}
cpu: [s390x] cpu: [s390x]
os: [linux] os: [linux]
libc: [glibc] libc: [glibc]
'@pnpm/exe.linux-x64-musl@12.4.2': '@pnpm/exe.linux-x64-musl@12.6.0':
resolution: {integrity: sha512-kzfzH2/0BWdTABK14Yj5a1xsdkTEQUp2eXEPNakaD9jKL025lq3hyaKHIz/gIZaPDMe/1bFFK/En4ztFlbBJxw==} resolution: {integrity: sha512-31lKeGPmRE6xfV6I3VjaEGVFRei14pl/zgoFDK4w+UkbJqOuNl2Ht3O1GuqNIg3Gl14qTEb4kZRAYFHXifDx9A==}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
libc: [musl] libc: [musl]
'@pnpm/exe.linux-x64@12.4.2': '@pnpm/exe.linux-x64@12.6.0':
resolution: {integrity: sha512-/pbt0UVTa8NMDhzOWLQRfZ6G9ROKXlJPZtx845BqyWfc7hCrWXhTLBd70yO2y8+E+IWN3oHM1s/JsIQNGk1yvg==} resolution: {integrity: sha512-qFWBneHJAJ73W4whtbaFOL1M/7DBC6ILHXuxc7ZPtEhfPuT1zeZiGrmKHoMAfJA+mcm6xhOFljqVTUS+00Jabw==}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
libc: [glibc] libc: [glibc]
'@pnpm/exe.win32-arm64@12.4.2': '@pnpm/exe.win32-arm64@12.6.0':
resolution: {integrity: sha512-PsW19e4dAUNpZ0cS9flaxFuAmpt2dKlH/Vvi8TZ4qyJjjQzue/CEsWm+6wKVP4CJ7IT8RdL4qh+soOPWIgF2Zw==} resolution: {integrity: sha512-OhfefXEEykZlslSUhR8PPRe6MVPV3Oink/dVfIecE5velpc7j80cZYsHlaDrtRDcm3TPwQHkaRW1SJ1efX9oFg==}
cpu: [arm64] cpu: [arm64]
os: [win32] os: [win32]
'@pnpm/exe.win32-x64@12.4.2': '@pnpm/exe.win32-x64@12.6.0':
resolution: {integrity: sha512-+xGoeE0g55ztWvl8i5QqdmNfW3nIrTVcoQrNshEOwxthm9Ag48oXton3uxOA3/SANyz5AXexEjj2KO20NnOrEw==} resolution: {integrity: sha512-L2tuyrD2+Imgxs3VK/ST/2L3xD6vDP0ktJQxM0TaGw7TbAQEMq+RMc8iK6Ew7Id579uzjJe8jSfJID2ZGsOHCA==}
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
pnpm@12.4.2: pnpm@12.6.0:
resolution: {integrity: sha512-CK3GYTGAJ1x8ntraOdzwjJxhrU5+rzMKTzRh8QKw+QdCNFTRF/mOctR/7wYWBwZE17/8lzpqV/UJCm18NosHyQ==} resolution: {integrity: sha512-PvaPlRyxEawgS0paFvCy3fDaVqluBBPoHYVdnwtV75JnFHCQKOHNAMQFwsX7e56OxNxGd3yAXQNzwvL/AP0g7A==}
engines: {node: '>=18.*'} engines: {node: '>=18.*'}
hasBin: true hasBin: true
snapshots: snapshots:
'@pnpm/exe.android-arm64@12.4.2': '@pnpm/exe.android-arm64@12.6.0':
optional: true optional: true
'@pnpm/exe.android-x64@12.4.2': '@pnpm/exe.android-x64@12.6.0':
optional: true optional: true
'@pnpm/exe.darwin-arm64@12.4.2': '@pnpm/exe.darwin-arm64@12.6.0':
optional: true optional: true
'@pnpm/exe.darwin-x64@12.4.2': '@pnpm/exe.darwin-x64@12.6.0':
optional: true optional: true
'@pnpm/exe.freebsd-x64@12.4.2': '@pnpm/exe.freebsd-x64@12.6.0':
optional: true optional: true
'@pnpm/exe.linux-arm64-musl@12.4.2': '@pnpm/exe.linux-arm64-musl@12.6.0':
optional: true optional: true
'@pnpm/exe.linux-arm64@12.4.2': '@pnpm/exe.linux-arm64@12.6.0':
optional: true optional: true
'@pnpm/exe.linux-ppc64@12.4.2': '@pnpm/exe.linux-ppc64@12.6.0':
optional: true optional: true
'@pnpm/exe.linux-riscv64@12.4.2': '@pnpm/exe.linux-riscv64@12.6.0':
optional: true optional: true
'@pnpm/exe.linux-s390x@12.4.2': '@pnpm/exe.linux-s390x@12.6.0':
optional: true optional: true
'@pnpm/exe.linux-x64-musl@12.4.2': '@pnpm/exe.linux-x64-musl@12.6.0':
optional: true optional: true
'@pnpm/exe.linux-x64@12.4.2': '@pnpm/exe.linux-x64@12.6.0':
optional: true optional: true
'@pnpm/exe.win32-arm64@12.4.2': '@pnpm/exe.win32-arm64@12.6.0':
optional: true optional: true
'@pnpm/exe.win32-x64@12.4.2': '@pnpm/exe.win32-x64@12.6.0':
optional: true optional: true
pnpm@12.4.2: pnpm@12.6.0:
optionalDependencies: optionalDependencies:
'@pnpm/exe.android-arm64': 12.4.2 '@pnpm/exe.android-arm64': 12.6.0
'@pnpm/exe.android-x64': 12.4.2 '@pnpm/exe.android-x64': 12.6.0
'@pnpm/exe.darwin-arm64': 12.4.2 '@pnpm/exe.darwin-arm64': 12.6.0
'@pnpm/exe.darwin-x64': 12.4.2 '@pnpm/exe.darwin-x64': 12.6.0
'@pnpm/exe.freebsd-x64': 12.4.2 '@pnpm/exe.freebsd-x64': 12.6.0
'@pnpm/exe.linux-arm64': 12.4.2 '@pnpm/exe.linux-arm64': 12.6.0
'@pnpm/exe.linux-arm64-musl': 12.4.2 '@pnpm/exe.linux-arm64-musl': 12.6.0
'@pnpm/exe.linux-ppc64': 12.4.2 '@pnpm/exe.linux-ppc64': 12.6.0
'@pnpm/exe.linux-riscv64': 12.4.2 '@pnpm/exe.linux-riscv64': 12.6.0
'@pnpm/exe.linux-s390x': 12.4.2 '@pnpm/exe.linux-s390x': 12.6.0
'@pnpm/exe.linux-x64': 12.4.2 '@pnpm/exe.linux-x64': 12.6.0
'@pnpm/exe.linux-x64-musl': 12.4.2 '@pnpm/exe.linux-x64-musl': 12.6.0
'@pnpm/exe.win32-arm64': 12.4.2 '@pnpm/exe.win32-arm64': 12.6.0
'@pnpm/exe.win32-x64': 12.4.2 '@pnpm/exe.win32-x64': 12.6.0
--- ---
lockfileVersion: '9.0' lockfileVersion: '9.0'
+10 -10
View File
@@ -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 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) { 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) { EMSESP::esp32React.getMqttSettingsService()->update([&](MqttSettings & mqttSettings) {
mqttSettings.entity_format = Mqtt::entityFormat::SINGLE_LONG; // use old Entity ID format from v3.4 mqttSettings.entity_format = Mqtt::entityFormat::SINGLE_LONG; // use old Entity ID format from v3.4
return StateUpdateResult::CHANGED; return StateUpdateResult::CHANGED;
@@ -1604,11 +1604,11 @@ bool System::check_upgrade() {
EMSESP::esp32React.getMqttSettingsService()->update([&](MqttSettings & mqttSettings) { EMSESP::esp32React.getMqttSettingsService()->update([&](MqttSettings & mqttSettings) {
if (mqttSettings.entity_format == 1) { if (mqttSettings.entity_format == 1) {
mqttSettings.entity_format = Mqtt::entityFormat::SINGLE_OLD; // use old Entity ID format from v3.6 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; return StateUpdateResult::CHANGED;
} else if (mqttSettings.entity_format == 2) { } else if (mqttSettings.entity_format == 2) {
mqttSettings.entity_format = Mqtt::entityFormat::MULTI_OLD; // use old Entity ID format from v3.6 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::CHANGED;
} }
return StateUpdateResult::UNCHANGED; return StateUpdateResult::UNCHANGED;
@@ -1624,12 +1624,12 @@ bool System::check_upgrade() {
auto changed = StateUpdateResult::UNCHANGED; auto changed = StateUpdateResult::UNCHANGED;
if (networkSettings.tx_power == 20) { if (networkSettings.tx_power == 20) {
networkSettings.tx_power = WIFI_POWER_19_5dBm; // use 19.5 as we don't have 20 anymore 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; changed = StateUpdateResult::CHANGED;
} }
if (networkSettings.nosleep != true) { if (networkSettings.nosleep != true) {
networkSettings.nosleep = true; networkSettings.nosleep = true;
LOG_INFO("Upgrade: Disabling WiFi nosleep"); LOG_INFO("Upgrade: disabling WiFi nosleep");
changed = StateUpdateResult::CHANGED; changed = StateUpdateResult::CHANGED;
} }
return changed; return changed;
@@ -1657,7 +1657,7 @@ bool System::check_upgrade() {
EMSESP::esp32React.getAPSettingsService()->update([&](APSettings & apSettings) { EMSESP::esp32React.getAPSettingsService()->update([&](APSettings & apSettings) {
if (apSettings.provisionMode == 0) { if (apSettings.provisionMode == 0) {
apSettings.provisionMode = AP_MODE_DISCONNECTED; // AP_MODE_DISCONNECTED is the new default 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::CHANGED;
} }
return StateUpdateResult::UNCHANGED; return StateUpdateResult::UNCHANGED;
@@ -1693,7 +1693,7 @@ bool System::check_upgrade() {
} }
if (old_format) { 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) // create a Command for each Scheduler entry, reusing the entry's name (generating one if empty)
EMSESP::webCommandService.update([&](WebCommands & commands) { EMSESP::webCommandService.update([&](WebCommands & commands) {
@@ -1771,7 +1771,7 @@ bool System::check_upgrade() {
}); });
} else if (this_version < settings_version) { } else if (this_version < settings_version) {
// downgrading // 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.major(),
settings_version.minor(), settings_version.minor(),
settings_version.patch(), settings_version.patch(),
@@ -1788,13 +1788,13 @@ bool System::check_upgrade() {
if (save_version) { if (save_version) {
EMSESP::webSettingsService.update([&](WebSettings & settings) { EMSESP::webSettingsService.update([&](WebSettings & settings) {
settings.version = EMSESP_APP_VERSION; 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; return StateUpdateResult::CHANGED;
}); });
} }
if (reboot_required) { if (reboot_required) {
LOG_INFO("Upgrade: Rebooting to apply changes"); LOG_INFO("Upgrade: rebooting to apply changes");
return true; // need reboot return true; // need reboot
} }
+1 -1
View File
@@ -1 +1 @@
#define EMSESP_APP_VERSION "3.9.0-dev.12" #define EMSESP_APP_VERSION "3.9.0-dev.13"
+10 -8
View File
@@ -405,20 +405,23 @@ void WebStatusService::schedule_versions_refresh() {
versions_next_fetch_ms_ = next; 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() { void WebStatusService::loop() {
#ifndef EMSESP_STANDALONE #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 // need a network
if (!EMSESP::network_.network_connected()) { if (!EMSESP::network_.network_connected()) {
return; 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;
}
// 0 = idle, nothing scheduled // 0 = idle, nothing scheduled
if (versions_next_fetch_ms_ == 0) { if (versions_next_fetch_ms_ == 0) {
return; return;
@@ -428,8 +431,7 @@ void WebStatusService::loop() {
if ((int32_t)(uuid::get_uptime() - versions_next_fetch_ms_) < 0) { if ((int32_t)(uuid::get_uptime() - versions_next_fetch_ms_) < 0) {
return; return;
} }
}
versions_fetch_requested_ = false;
uint32_t interval; uint32_t interval;
if (refresh_versions_cache()) { if (refresh_versions_cache()) {