diff --git a/README.md b/README.md
index 598ebd5..3cd3d14 100644
--- a/README.md
+++ b/README.md
@@ -34,6 +34,9 @@ Feel free to join us on Discord: https://discord.gg/9nPq85bP4p
- Nuki Keypad 1.0
- Nuki Keypad 2.0
+Untested but probably supported:
+- Nuki Smart Lock Ultra
+
Supported Ethernet devices:
As an alternative to Wi-Fi (which is available on any supported ESP32), the following ESP32 modules with built-in wired ethernet are supported:
- [Olimex ESP32-POE](https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware)
diff --git a/lib/BleScanner/src/BleScanner.cpp b/lib/BleScanner/src/BleScanner.cpp
index ff4eca4..253abf9 100644
--- a/lib/BleScanner/src/BleScanner.cpp
+++ b/lib/BleScanner/src/BleScanner.cpp
@@ -21,7 +21,7 @@ Scanner::Scanner(int reservedSubscribers) {
}
void Scanner::initialize(const std::string& deviceName, const bool wantDuplicates, const uint16_t interval, const uint16_t window) {
- if (!BLEDevice::getInitialized()) {
+ if (!BLEDevice::isInitialized()) {
if (wantDuplicates) {
// reduce memory footprint, cache is not used anyway
#ifdef CONFIG_BTDM_BLE_SCAN_DUPL
diff --git a/src/Config.h b/src/Config.h
index cf7ca8a..8592bd0 100644
--- a/src/Config.h
+++ b/src/Config.h
@@ -4,7 +4,7 @@
#define NUKI_HUB_VERSION "9.02"
#define NUKI_HUB_BUILD "unknownbuildnr"
-#define NUKI_HUB_DATE "2024-11-08"
+#define NUKI_HUB_DATE "2024-11-11"
#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"
diff --git a/src/NukiOpenerWrapper.cpp b/src/NukiOpenerWrapper.cpp
index 2e70327..7163034 100644
--- a/src/NukiOpenerWrapper.cpp
+++ b/src/NukiOpenerWrapper.cpp
@@ -272,9 +272,8 @@ void NukiOpenerWrapper::update()
}
if(_statusUpdated || _nextLockStateUpdateTs == 0 || ts >= _nextLockStateUpdateTs || (queryCommands & QUERY_COMMAND_LOCKSTATE) > 0)
{
- updateKeyTurnerState();
+ _statusUpdated = updateKeyTurnerState();
_nextLockStateUpdateTs = ts + _intervalLockstate * 1000;
- _statusUpdated = false;
_network->publishStatusUpdated(_statusUpdated);
}
if(_network->mqttConnectionState() == 2)
@@ -418,8 +417,9 @@ void NukiOpenerWrapper::unpair()
_paired = false;
}
-void NukiOpenerWrapper::updateKeyTurnerState()
+bool NukiOpenerWrapper::updateKeyTurnerState()
{
+ bool updateStatus = false;
Nuki::CmdResult result = (Nuki::CmdResult)-1;
int retryCount = 0;
@@ -445,7 +445,7 @@ void NukiOpenerWrapper::updateKeyTurnerState()
{
_nextLockStateUpdateTs = espMillis() + _retryDelay;
}
- return;
+ return false;
}
_retryLockstateCount = 0;
@@ -491,6 +491,7 @@ void NukiOpenerWrapper::updateKeyTurnerState()
postponeBleWatchdog();
Log->println(F("Done querying opener state"));
+ return updateStatus;
}
void NukiOpenerWrapper::updateBatteryState()
diff --git a/src/NukiOpenerWrapper.h b/src/NukiOpenerWrapper.h
index aea104d..eb8237a 100644
--- a/src/NukiOpenerWrapper.h
+++ b/src/NukiOpenerWrapper.h
@@ -60,7 +60,7 @@ private:
void onTimeControlCommandReceived(const char* value);
void onAuthCommandReceived(const char* value);
- void updateKeyTurnerState();
+ bool updateKeyTurnerState();
void updateBatteryState();
void updateConfig();
void updateAuthData(bool retrieved);
diff --git a/src/NukiWrapper.cpp b/src/NukiWrapper.cpp
index c680edd..a417326 100644
--- a/src/NukiWrapper.cpp
+++ b/src/NukiWrapper.cpp
@@ -291,8 +291,7 @@ void NukiWrapper::update()
if(_nukiOfficial->getStatusUpdated() || _statusUpdated || _nextLockStateUpdateTs == 0 || ts >= _nextLockStateUpdateTs || (queryCommands & QUERY_COMMAND_LOCKSTATE) > 0)
{
Log->println("Updating Lock state based on status, timer or query");
- updateKeyTurnerState();
- _statusUpdated = false;
+ _statusUpdated = updateKeyTurnerState();
_nextLockStateUpdateTs = ts + _intervalLockstate * 1000;
_network->publishStatusUpdated(_statusUpdated);
}
@@ -427,8 +426,9 @@ void NukiWrapper::unpair()
_paired = false;
}
-void NukiWrapper::updateKeyTurnerState()
+bool NukiWrapper::updateKeyTurnerState()
{
+ bool updateStatus = false;
Nuki::CmdResult result = (Nuki::CmdResult)-1;
int retryCount = 0;
@@ -460,7 +460,7 @@ void NukiWrapper::updateKeyTurnerState()
Log->println("ms");
_nextLockStateUpdateTs = espMillis() + _retryDelay;
}
- return;
+ return false;
}
_retryLockstateCount = 0;
@@ -489,7 +489,7 @@ void NukiWrapper::updateKeyTurnerState()
}
else if(!_nukiOfficial->getOffConnected() && espMillis() < _statusUpdatedTs + 10000)
{
- _statusUpdated = true;
+ updateStatus = true;
Log->println(F("Lock: Keep updating status on intermediate lock state"));
}
@@ -501,6 +501,7 @@ void NukiWrapper::updateKeyTurnerState()
postponeBleWatchdog();
Log->println(F("Done querying lock state"));
+ return updateStatus;
}
void NukiWrapper::updateBatteryState()
diff --git a/src/NukiWrapper.h b/src/NukiWrapper.h
index 82484d5..c7f9888 100644
--- a/src/NukiWrapper.h
+++ b/src/NukiWrapper.h
@@ -65,7 +65,7 @@ private:
void onAuthCommandReceived(const char* value);
void onGpioActionReceived(const GpioAction& action, const int& pin);
- void updateKeyTurnerState();
+ bool updateKeyTurnerState();
void updateBatteryState();
void updateConfig();
void updateAuthData(bool retrieved);
diff --git a/src/WebCfgServer.cpp b/src/WebCfgServer.cpp
index 051a1cc..c9065b5 100644
--- a/src/WebCfgServer.cpp
+++ b/src/WebCfgServer.cpp
@@ -4063,10 +4063,10 @@ esp_err_t WebCfgServer::buildInfoHtml(PsychicRequest *request)
if(esp_psram_get_size() > 0)
{
response.print("\nPSRAM Available: Yes");
- response.print("\nTotal PSRAM: ");
- response.print(esp_psram_get_size());
response.print("\nFree PSRAM: ");
response.print((esp_get_free_heap_size() - ESP.getFreeHeap()));
+ response.print("\nTotal PSRAM: ");
+ response.print(esp_psram_get_size());
response.print("\nTotal free heap: ");
response.print(esp_get_free_heap_size());
}
diff --git a/src/idf_component.yml b/src/idf_component.yml
index a49a480..b69cad4 100644
--- a/src/idf_component.yml
+++ b/src/idf_component.yml
@@ -4,7 +4,7 @@ dependencies:
esp-nimble-cpp:
git: https://github.com/h2zero/esp-nimble-cpp.git
- version: 758c4d0471cca8a00c8652aac2e16940ecb30cb3
+ version: 020c61700dce2174769f855d45ab0ea70a2aaac4
espressif/libsodium: "^1.0.20~1"