Official MQTT - Nuki Hub coexistence, keypad/timecontrol sensor per code/entry, option not to publish config, authorization log improvements, various fixes (#389)
* Coexistence with official MQTT over Wifi and Thread * Coexistence with official MQTT over Wifi and Thread * Arduino Core 2.0.17 cmake and README * Coexistence with official MQTT over Wifi and Thread * Keep updating status until state is known * Coexistence with official MQTT over Wifi and Thread
This commit is contained in:
@@ -40,12 +40,12 @@ public:
|
||||
|
||||
void subscribe(const char* prefix, const char* path);
|
||||
void initTopic(const char* prefix, const char* path, const char* value);
|
||||
void publishFloat(const char* prefix, const char* topic, const float value, const uint8_t precision = 2);
|
||||
void publishInt(const char* prefix, const char* topic, const int value);
|
||||
void publishUInt(const char* prefix, const char* topic, const unsigned int value);
|
||||
void publishULong(const char* prefix, const char* topic, const unsigned long value);
|
||||
void publishBool(const char* prefix, const char* topic, const bool value);
|
||||
bool publishString(const char* prefix, const char* topic, const char* value);
|
||||
void publishFloat(const char* prefix, const char* topic, const float value, const uint8_t precision = 2, bool retain = false);
|
||||
void publishInt(const char* prefix, const char* topic, const int value, bool retain = false);
|
||||
void publishUInt(const char* prefix, const char* topic, const unsigned int value, bool retain = false);
|
||||
void publishULong(const char* prefix, const char* topic, const unsigned long value, bool retain = false);
|
||||
void publishBool(const char* prefix, const char* topic, const bool value, bool retain = false);
|
||||
bool publishString(const char* prefix, const char* topic, const char* value, bool retain = false);
|
||||
|
||||
void publishHASSConfig(char* deviceType, const char* baseTopic, char* name, char* uidString, const char *softwareVersion, const char *hardwareVersion, const char* availabilityTopic, const bool& hasKeypad, char* lockAction, char* unlockAction, char* openAction);
|
||||
void publishHASSConfigAdditionalLockEntities(char* deviceType, const char* baseTopic, char* name, char* uidString);
|
||||
@@ -56,6 +56,22 @@ public:
|
||||
void publishHASSWifiRssiConfig(char* deviceType, const char* baseTopic, char* name, char* uidString);
|
||||
void removeHASSConfig(char* uidString);
|
||||
void removeHASSConfigTopic(char* deviceType, char* name, char* uidString);
|
||||
void publishHassTopic(const String& mqttDeviceType,
|
||||
const String& mqttDeviceName,
|
||||
const String& uidString,
|
||||
const String& uidStringPostfix,
|
||||
const String& displayName,
|
||||
const String& name,
|
||||
const String& baseTopic,
|
||||
const String& stateTopic,
|
||||
const String& deviceType,
|
||||
const String& deviceClass,
|
||||
const String& stateClass = "",
|
||||
const String& entityCat = "",
|
||||
const String& commandTopic = "",
|
||||
std::vector<std::pair<char*, char*>> additionalEntries = {}
|
||||
);
|
||||
void removeHassTopic(const String& mqttDeviceType, const String& mqttDeviceName, const String& uidString);
|
||||
void removeTopic(const String& mqttPath, const String& mqttTopic);
|
||||
void batteryTypeToString(const Nuki::BatteryType battype, char* str);
|
||||
void advertisingModeToString(const Nuki::AdvertisingMode advmode, char* str);
|
||||
@@ -87,24 +103,7 @@ private:
|
||||
void setupDevice();
|
||||
bool reconnect();
|
||||
|
||||
void publishHassTopic(const String& mqttDeviceType,
|
||||
const String& mqttDeviceName,
|
||||
const String& uidString,
|
||||
const String& uidStringPostfix,
|
||||
const String& displayName,
|
||||
const String& name,
|
||||
const String& baseTopic,
|
||||
const String& stateTopic,
|
||||
const String& deviceType,
|
||||
const String& deviceClass,
|
||||
const String& stateClass = "",
|
||||
const String& entityCat = "",
|
||||
const String& commandTopic = "",
|
||||
std::vector<std::pair<char*, char*>> additionalEntries = {}
|
||||
);
|
||||
|
||||
String createHassTopicPath(const String& mqttDeviceType, const String& mqttDeviceName, const String& uidString);
|
||||
void removeHassTopic(const String& mqttDeviceType, const String& mqttDeviceName, const String& uidString);
|
||||
JsonDocument createHassJson(const String& uidString,
|
||||
const String& uidStringPostfix,
|
||||
const String& displayName,
|
||||
|
||||
Reference in New Issue
Block a user