-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject.h
73 lines (57 loc) · 1.63 KB
/
project.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#ifndef PROJECT_H
#define PROJECT_H
#define NAMELEN 20
#define LABELLEN 50
#define POSTURLLEN 50
#define AWSIOTLEN 60
char name[NAMELEN];
char label[LABELLEN];
StaticJsonDocument<1024> doc;
JsonObject config;
ESP8266WebServer httpServer(80);
void httpServerSetup();
ESP8266HTTPUpdateServer httpUpdater;
const char *update_path = "/upload";
WiFiManager wifiManager;
void configLoad();
boolean tcpServerEnabled;
#define MAX_SRV_CLIENTS 4
WiFiServer *tcpServer;
WiFiClient tcpServerClients[MAX_SRV_CLIENTS];
void tcpServerSetup();
void tcpServerLoop();
boolean heartbeatEnabled;
uint32_t heartbeatTimeout;
uint8_t heartbeatPin;
uint32_t heartbeatInterval; // this is heartbeat interval in mS
void heartbeatSetup();
boolean websocketserverEnabled;
uint32_t websocketTimeout;
uint32_t websocketInterval;
WebSocketsServer *webSocketServer;
void websocketServerSetup();
void websocketEvent(uint8_t num, WStype_t type, uint8_t *payload, size_t length);
boolean alexaEnabled;
fauxmoESP *alexa;
void alexaSetup();
void alexaLoop();
uint32_t ncTimeout;
void ncLoop();
boolean ntpEnabled;
long ntpOffset;
uint32_t ntpTimeout;
uint16_t ntpInterval;
String getTimestampString();
boolean loggingEnabled;
uint32_t loggingTimeout;
uint16_t loggingInterval;
void loggingPost();
char loggingPostURL[POSTURLLEN];
boolean displayEnabled;
uint32_t displayTimeout;
uint16_t displayInterval;
boolean awsiotEnabled;
void awsiotSetup();
void awsiotLoop();
char awsiotEndpoint[AWSIOTLEN];
#endif