add auto discovery for keypad result

This commit is contained in:
technyon
2023-03-22 22:54:35 +01:00
parent 3c967c745a
commit ff4bd2618f
13 changed files with 158 additions and 118 deletions

View File

@@ -11,10 +11,12 @@
#include "Network.h"
#include "QueryCommand.h"
#define LOCK_LOG_JSON_BUFFER_SIZE 2048
class NetworkLock : public MqttReceiver
{
public:
explicit NetworkLock(Network* network, Preferences* preferences);
explicit NetworkLock(Network* network, Preferences* preferences, char* buffer, size_t bufferSize);
virtual ~NetworkLock();
void initialize();
@@ -79,6 +81,9 @@ private:
int _keypadCommandEnabled = 1;
uint8_t _queryCommands = 0;
char* _buffer;
size_t _bufferSize;
bool (*_lockActionReceivedCallback)(const char* value) = nullptr;
void (*_configUpdateReceivedCallback)(const char* path, const char* value) = nullptr;
void (*_keypadCommandReceivedReceivedCallback)(const char* command, const uint& id, const String& name, const String& code, const int& enabled) = nullptr;