Merge branch 'master' of github.com:technyon/nuki_hub
This commit is contained in:
@@ -34,6 +34,9 @@ Feel free to join us on Discord: https://discord.gg/9nPq85bP4p
|
||||
- Nuki Keypad 1.0
|
||||
- Nuki Keypad 2.0
|
||||
|
||||
<b>Untested but probably supported:</b>
|
||||
- Nuki Smart Lock Ultra
|
||||
|
||||
<b>Supported Ethernet devices:</b><br>
|
||||
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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user