fix pairing
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
2
main.cpp
2
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();
|
||||
|
||||
Reference in New Issue
Block a user