Added MQTT auto discovery #180

This commit is contained in:
Robert Strouse 2023-10-28 11:39:42 -07:00
parent f3e3553dad
commit 79c7ecccac
10 changed files with 156 additions and 9 deletions

2
MQTT.h
View file

@ -24,6 +24,8 @@ class MQTTClass {
bool publish(const char *topic, uint32_t val, bool retain = false);
bool publish(const char *topic, uint16_t val, bool retain = false);
bool publish(const char *topic, bool val, bool retain = false);
bool publishBuffer(const char *topic, uint8_t *data, uint16_t len, bool retain = false);
bool publishDisco(const char *topic, JsonObject &obj, bool retain = false);
bool subscribe(const char *topic);
bool unsubscribe(const char *topic);
static void receive(const char *topic, byte *payload, uint32_t length);