Merge branch 'master' into pio

This commit is contained in:
Luca Oliano
2024-05-11 11:25:41 +02:00
29 changed files with 5245 additions and 1121 deletions

View File

@@ -35,15 +35,16 @@ public:
void removeHASSConfig(char* uidString);
void publishKeypad(const std::list<NukiLock::KeypadEntry>& entries, uint maxKeypadCodeCount);
void publishTimeControl(const std::list<NukiOpener::TimeControlEntry>& timeControlEntries);
void publishConfigCommandResult(const char* result);
void publishKeypadCommandResult(const char* result);
void publishKeypadJsonCommandResult(const char* result);
void publishTimeControlCommandResult(const char* result);
void setLockActionReceivedCallback(LockActionResult (*lockActionReceivedCallback)(const char* value));
void setConfigUpdateReceivedCallback(void (*configUpdateReceivedCallback)(const char* path, const char* value));
void setConfigUpdateReceivedCallback(void (*configUpdateReceivedCallback)(const char* value));
void setKeypadCommandReceivedCallback(void (*keypadCommandReceivedReceivedCallback)(const char* command, const uint& id, const String& name, const String& code, const int& enabled));
void setKeypadJsonCommandReceivedCallback(void (*keypadJsonCommandReceivedReceivedCallback)(const char* value));
void setTimeControlCommandReceivedCallback(void (*timeControlCommandReceivedReceivedCallback)(const char* value));
void setTimeControlCommandReceivedCallback(void (*timeControlCommandReceivedReceivedCallback)(const char* value));
void onMqttDataReceived(const char* topic, byte* payload, const unsigned int length) override;
bool reconnected();
@@ -64,6 +65,12 @@ private:
void buildMqttPath(const char* path, char* outPath);
void subscribe(const char* path);
void logactionCompletionStatusToString(uint8_t value, char* out);
void buttonPressActionToString(const NukiOpener::ButtonPressAction btnPressAction, char* str);
void fobActionToString(const int fobact, char* str);
void operatingModeToString(const int opmode, char* str);
void doorbellSuppressionToString(const int dbsupr, char* str);
void soundToString(const int sound, char* str);
void capabilitiesToString(const int capabilities, char* str);
String concat(String a, String b);
@@ -74,8 +81,6 @@ private:
char _mqttPath[181] = {0};
bool _isConnected = false;
std::vector<char*> _configTopics;
bool _firstTunerStatePublish = true;
bool _haEnabled= false;
bool _reconnected = false;
@@ -86,8 +91,9 @@ private:
int _keypadCommandEnabled = 1;
unsigned long _resetRingStateTs = 0;
uint8_t _queryCommands = 0;
uint32_t authId = 0;
char authName[33];
uint32_t _authId = 0;
char _authName[33];
bool _authFound = false;
NukiOpener::LockState _currentLockState = NukiOpener::LockState::Undefined;
@@ -95,7 +101,7 @@ private:
const size_t _bufferSize;
LockActionResult (*_lockActionReceivedCallback)(const char* value) = nullptr;
void (*_configUpdateReceivedCallback)(const char* path, const char* value) = nullptr;
void (*_configUpdateReceivedCallback)(const char* value) = nullptr;
void (*_keypadCommandReceivedReceivedCallback)(const char* command, const uint& id, const String& name, const String& code, const int& enabled) = nullptr;
void (*_keypadJsonCommandReceivedReceivedCallback)(const char* value) = nullptr;
void (*_timeControlCommandReceivedReceivedCallback)(const char* value) = nullptr;