mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 11:02:12 +01:00
Initial commit
This commit is contained in:
commit
ee367e7111
28 changed files with 53359 additions and 0 deletions
25
MQTT.h
Normal file
25
MQTT.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef MQTT_H
|
||||
#define MQTT_H
|
||||
#include <Arduino.h>
|
||||
#include <PubSubClient.h>
|
||||
#include <ArduinoJson.h>
|
||||
class MQTTClass {
|
||||
public:
|
||||
char clientId[32] = {'\0'};
|
||||
bool begin();
|
||||
bool loop();
|
||||
bool end();
|
||||
bool connect();
|
||||
bool disconnect();
|
||||
bool connected();
|
||||
bool publish(const char *topic, const char *payload);
|
||||
bool publish(const char *topic, JsonDocument &doc);
|
||||
bool publish(const char *topic, JsonArray &arr);
|
||||
bool publish(const char *topic, JsonObject &obj);
|
||||
bool publish(const char *topic, uint8_t val);
|
||||
bool publish(const char *topic, int8_t val);
|
||||
bool publish(const char *topic, uint32_t val);
|
||||
bool publish(const char *topic, uint16_t val);
|
||||
|
||||
};
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue