fix pairing
This commit is contained in:
@@ -52,6 +52,8 @@ void NukiWrapper::update()
|
|||||||
if (!_paired) {
|
if (!_paired) {
|
||||||
Serial.println(F("Nuki start pairing"));
|
Serial.println(F("Nuki start pairing"));
|
||||||
|
|
||||||
|
_bleScanner.update();
|
||||||
|
vTaskDelay( 5000 / portTICK_PERIOD_MS);
|
||||||
if (_nukiBle.pairNuki()) {
|
if (_nukiBle.pairNuki()) {
|
||||||
Serial.println(F("Nuki paired"));
|
Serial.println(F("Nuki paired"));
|
||||||
_paired = true;
|
_paired = true;
|
||||||
|
|||||||
@@ -42,5 +42,6 @@ private:
|
|||||||
bool _statusUpdated = false;
|
bool _statusUpdated = false;
|
||||||
unsigned long _nextLockStateUpdateTs = 0;
|
unsigned long _nextLockStateUpdateTs = 0;
|
||||||
unsigned long _nextBatteryReportTs = 0;
|
unsigned long _nextBatteryReportTs = 0;
|
||||||
|
unsigned long _nextPairTs = 0;
|
||||||
Nuki::LockAction _nextLockAction = (Nuki::LockAction)0xff;
|
Nuki::LockAction _nextLockAction = (Nuki::LockAction)0xff;
|
||||||
};
|
};
|
||||||
|
|||||||
2
main.cpp
2
main.cpp
@@ -39,7 +39,7 @@ void setup()
|
|||||||
preferences = new Preferences();
|
preferences = new Preferences();
|
||||||
preferences->begin("nukihub", false);
|
preferences->begin("nukihub", false);
|
||||||
network = new Network(preferences);
|
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);
|
webCfgServer = new WebCfgServer(nuki, network, preferences);
|
||||||
|
|
||||||
network->initialize();
|
network->initialize();
|
||||||
|
|||||||
Reference in New Issue
Block a user