forked from marecl/motor-on-roller-blind-ws
-
Notifications
You must be signed in to change notification settings - Fork 9
/
NidayandHelper.h
36 lines (28 loc) · 961 Bytes
/
NidayandHelper.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef NidayandHelper_h
#define NidayandHelper_h
#include "Arduino.h"
#include <ArduinoJson.h>
#include "FS.h"
#include <PubSubClient.h>
#include <WiFiClient.h>
#include <WiFiManager.h>
#include <list>
class NidayandHelper {
public:
NidayandHelper();
boolean loadconfig();
JsonVariant getconfig();
boolean saveconfig(JsonVariant json);
String mqtt_gettopic(String type);
void mqtt_reconnect(PubSubClient& psclient);
void mqtt_reconnect(PubSubClient& psclient, std::list<const char*> topics);
void mqtt_reconnect(PubSubClient& psclient, String uid, String pwd);
void mqtt_reconnect(PubSubClient& psclient, String uid, String pwd, std::list<const char*> topics);
void mqtt_publish(PubSubClient& psclient, String topic, String payload);
void resetsettings(WiFiManager& wifim);
private:
JsonVariant _config;
String _configfile;
String _mqttclientid;
};
#endif