Skip to content

Commit

Permalink
fix pairing
Browse files Browse the repository at this point in the history
  • Loading branch information
technyon committed Apr 2, 2022
1 parent abea094 commit 9792110
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NukiWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions NukiWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ class NukiWrapper : public Nuki::SmartlockEventHandler
bool _statusUpdated = false;
unsigned long _nextLockStateUpdateTs = 0;
unsigned long _nextBatteryReportTs = 0;
unsigned long _nextPairTs = 0;
Nuki::LockAction _nextLockAction = (Nuki::LockAction)0xff;
};
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 9792110

Please sign in to comment.