From 5ca6c55fa7d5169578b32b14d821c4105bad0c62 Mon Sep 17 00:00:00 2001 From: Alessandro Del Prete Date: Sun, 22 Sep 2024 06:01:53 +0200 Subject: [PATCH 1/4] - availability topic should be a list (#476) - fix stat_jammed with stat_jam --- src/NukiNetwork.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NukiNetwork.cpp b/src/NukiNetwork.cpp index b07dc6f..1aff483 100644 --- a/src/NukiNetwork.cpp +++ b/src/NukiNetwork.cpp @@ -874,7 +874,7 @@ void NukiNetwork::publishHASSConfig(char* deviceType, const char* baseTopic, cha json["name"] = nullptr; json["unique_id"] = String(uidString) + "_lock"; json["cmd_t"] = String("~") + String(mqtt_topic_lock_action); - json["avty"]["t"] = availabilityTopic; + json["avty"][0]["t"] = availabilityTopic; json["pl_lock"] = lockAction; json["pl_unlk"] = unlockAction; @@ -883,7 +883,7 @@ void NukiNetwork::publishHASSConfig(char* deviceType, const char* baseTopic, cha if((int)aclPrefs[2]) json["pl_open"] = openAction; json["stat_t"] = String("~") + mqtt_topic_lock_ha_state; - json["stat_jammed"] = "jammed"; + json["stat_jam"] = "jammed"; json["stat_locked"] = "locked"; json["stat_locking"] = "locking"; json["stat_unlocked"] = "unlocked"; From fee10b2c9fd7984618404da8e8a1a0dc94c8de05 Mon Sep 17 00:00:00 2001 From: technyon Date: Sun, 22 Sep 2024 06:07:22 +0200 Subject: [PATCH 2/4] code formatting --- src/WebCfgServer.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/WebCfgServer.cpp b/src/WebCfgServer.cpp index 9a3a7c9..208124e 100644 --- a/src/WebCfgServer.cpp +++ b/src/WebCfgServer.cpp @@ -3133,8 +3133,14 @@ void WebCfgServer::buildGpioConfigHtml(AsyncWebServerRequest *request) String pinStr = String(pin); String pinDesc = "Gpio " + pinStr; printDropDown(pinStr.c_str(), pinDesc.c_str(), "", options, "gpioselect"); - if(std::find(disabledPins.begin(), disabledPins.end(), pin) != disabledPins.end()) gpiopreselects.concat("gpio[" + pinStr + "] = '21';"); - else gpiopreselects.concat("gpio[" + pinStr + "] = '" + getPreselectionForGpio(pin) + "';"); + if(std::find(disabledPins.begin(), disabledPins.end(), pin) != disabledPins.end()) + { + gpiopreselects.concat("gpio[" + pinStr + "] = '21';"); + } + else + { + gpiopreselects.concat("gpio[" + pinStr + "] = '" + getPreselectionForGpio(pin) + "';"); + } } _response.concat(""); @@ -4030,8 +4036,14 @@ void WebCfgServer::printDropDown(const char *token, const char *description, con _response.concat(description); _response.concat(""); - if(className.length() > 0) _response.concat(""); From 654fcc0f5e48ceed51aa7cff8b472ec8bb328f24 Mon Sep 17 00:00:00 2001 From: technyon Date: Sun, 22 Sep 2024 16:31:14 +0200 Subject: [PATCH 3/4] fix s3 build --- sdkconfig.defaults.esp32-s3 | 1 + src/Config.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sdkconfig.defaults.esp32-s3 b/sdkconfig.defaults.esp32-s3 index 10a55c9..12f1bb1 100644 --- a/sdkconfig.defaults.esp32-s3 +++ b/sdkconfig.defaults.esp32-s3 @@ -2,5 +2,6 @@ CONFIG_SPIRAM=y CONFIG_SPIRAM_IGNORE_NOTFOUND=y CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC=y CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT=y +CONFIG_SOC_SPIRAM_SUPPORTED=n CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096 CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=50768 \ No newline at end of file diff --git a/src/Config.h b/src/Config.h index 74e85f5..889d1b7 100644 --- a/src/Config.h +++ b/src/Config.h @@ -4,7 +4,7 @@ #define NUKI_HUB_VERSION "9.01" #define NUKI_HUB_BUILD "unknownbuildnr" -#define NUKI_HUB_DATE "2024-09-01" +#define NUKI_HUB_DATE "2024-09-22" #define GITHUB_LATEST_RELEASE_URL (char*)"https://github.com/technyon/nuki_hub/releases/latest" #define GITHUB_OTA_MANIFEST_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/manifest.json" From 5732952e86a108677c2e063f582556f6fc182858 Mon Sep 17 00:00:00 2001 From: iranl Date: Sat, 28 Sep 2024 21:50:30 +0200 Subject: [PATCH 4/4] Revert "fix s3 build" This reverts commit 654fcc0f5e48ceed51aa7cff8b472ec8bb328f24. --- sdkconfig.defaults.esp32-s3 | 1 - src/Config.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sdkconfig.defaults.esp32-s3 b/sdkconfig.defaults.esp32-s3 index 12f1bb1..10a55c9 100644 --- a/sdkconfig.defaults.esp32-s3 +++ b/sdkconfig.defaults.esp32-s3 @@ -2,6 +2,5 @@ CONFIG_SPIRAM=y CONFIG_SPIRAM_IGNORE_NOTFOUND=y CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC=y CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT=y -CONFIG_SOC_SPIRAM_SUPPORTED=n CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=4096 CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=50768 \ No newline at end of file diff --git a/src/Config.h b/src/Config.h index 889d1b7..74e85f5 100644 --- a/src/Config.h +++ b/src/Config.h @@ -4,7 +4,7 @@ #define NUKI_HUB_VERSION "9.01" #define NUKI_HUB_BUILD "unknownbuildnr" -#define NUKI_HUB_DATE "2024-09-22" +#define NUKI_HUB_DATE "2024-09-01" #define GITHUB_LATEST_RELEASE_URL (char*)"https://github.com/technyon/nuki_hub/releases/latest" #define GITHUB_OTA_MANIFEST_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/manifest.json"