add keypad control for opener
This commit is contained in:
@@ -33,12 +33,15 @@ public:
|
||||
private:
|
||||
static bool onLockActionReceivedCallback(const char* value);
|
||||
static void onConfigUpdateReceivedCallback(const char* topic, const char* value);
|
||||
static void onKeypadCommandReceivedCallback(const char* command, const uint& id, const String& name, const String& code, const int& enabled);
|
||||
void onConfigUpdateReceived(const char* topic, const char* value);
|
||||
void onKeypadCommandReceived(const char* command, const uint& id, const String& name, const String& code, const int& enabled);
|
||||
|
||||
void updateKeyTurnerState();
|
||||
void updateBatteryState();
|
||||
void updateConfig();
|
||||
void updateAuthData();
|
||||
void updateKeypad();
|
||||
void postponeBleWatchdog();
|
||||
|
||||
void readConfig();
|
||||
@@ -56,6 +59,7 @@ private:
|
||||
int _intervalLockstate = 0; // seconds
|
||||
int _intervalBattery = 0; // seconds
|
||||
int _intervalConfig = 60 * 60; // seconds
|
||||
int _intervalKeypad = 0; // seconds
|
||||
int _restartBeaconTimeout = 0; // seconds
|
||||
bool _publishAuthData = false;
|
||||
bool _clearAuthData = false;
|
||||
@@ -63,6 +67,7 @@ private:
|
||||
int _retryDelay = 0;
|
||||
int _retryCount = 0;
|
||||
unsigned long _nextRetryTs = 0;
|
||||
std::vector<uint16_t> _keypadCodeIds;
|
||||
|
||||
NukiOpener::OpenerState _lastKeyTurnerState;
|
||||
NukiOpener::OpenerState _keyTurnerState;
|
||||
@@ -79,10 +84,15 @@ private:
|
||||
|
||||
bool _paired = false;
|
||||
bool _statusUpdated = false;
|
||||
bool _hasKeypad = false;
|
||||
bool _keypadEnabled = false;
|
||||
uint _maxKeypadCodeCount = 0;
|
||||
bool _configRead = false;
|
||||
long _rssiPublishInterval = 0;
|
||||
unsigned long _nextLockStateUpdateTs = 0;
|
||||
unsigned long _nextBatteryReportTs = 0;
|
||||
unsigned long _nextConfigUpdateTs = 0;
|
||||
unsigned long _nextKeypadUpdateTs = 0;
|
||||
unsigned long _nextPairTs = 0;
|
||||
long _nextRssiTs = 0;
|
||||
unsigned long _lastRssi = 0;
|
||||
|
||||
Reference in New Issue
Block a user