diff --git a/NukiWrapper.cpp b/NukiWrapper.cpp index 8feb18c..03d2bcd 100644 --- a/NukiWrapper.cpp +++ b/NukiWrapper.cpp @@ -52,6 +52,8 @@ void NukiWrapper::update() if (!_paired) { Serial.println(F("Nuki start pairing")); + _bleScanner.update(); + vTaskDelay( 5000 / portTICK_PERIOD_MS); if (_nukiBle.pairNuki()) { Serial.println(F("Nuki paired")); _paired = true; diff --git a/NukiWrapper.h b/NukiWrapper.h index d42426f..a46671f 100644 --- a/NukiWrapper.h +++ b/NukiWrapper.h @@ -42,5 +42,6 @@ private: bool _statusUpdated = false; unsigned long _nextLockStateUpdateTs = 0; unsigned long _nextBatteryReportTs = 0; + unsigned long _nextPairTs = 0; Nuki::LockAction _nextLockAction = (Nuki::LockAction)0xff; }; diff --git a/main.cpp b/main.cpp index 84fb203..b25f0ec 100644 --- a/main.cpp +++ b/main.cpp @@ -39,7 +39,7 @@ void setup() preferences = new Preferences(); preferences->begin("nukihub", false); network = new Network(preferences); - nuki = new NukiWrapper("Main Door", 2020001, network, preferences); + nuki = new NukiWrapper("ESP", 2020001, network, preferences); webCfgServer = new WebCfgServer(nuki, network, preferences); network->initialize();