19 lines
333 B
C
19 lines
333 B
C
|
#pragma once
|
||
|
|
||
|
#include "config.h"
|
||
|
#include <PubSubClient.h>
|
||
|
#include <ESP8266WiFi.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);
|
||
|
};
|