esmp3/include/mqtt_client.h
2019-11-11 05:32:41 +01:00

19 lines
332 B
C++

#pragma once
#include "config.h"
#include <PubSubClient.h>
#include <WiFiClient.h>
class MQTTClient {
private:
WiFiClient* _wifi_client;
PubSubClient* _mqtt;
unsigned long _last_reconnect_attempt;
void _reconnect();
public:
MQTTClient();
void loop();
void publish_status(String s);
void publish_rfid_uid(uint32_t uid);
};