-
-
Notifications
You must be signed in to change notification settings - Fork 230
/
Copy pathpubMqttDefs.h
92 lines (79 loc) · 1.6 KB
/
pubMqttDefs.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//-----------------------------------------------------------------------------
// 2023 Ahoy, https://ahoydtu.de
// Creative Commons - https://creativecommons.org/licenses/by-nc-sa/4.0/deed
//-----------------------------------------------------------------------------
#ifndef __PUB_MQTT_DEFS_H__
#define __PUB_MQTT_DEFS_H__
#include <Arduino.h>
enum { QOS_0 = 0, QOS_1, QOS_2 };
enum {
STR_TRUE,
STR_FALSE
};
const char* const dict[] PROGMEM = {
"true",
"false"
};
enum {
MQTT_STR_LWT_CONN,
MQTT_STR_LWT_NOT_CONN,
MQTT_STR_AVAILABLE,
MQTT_STR_LAST_SUCCESS,
MQTT_STR_TOTAL,
MQTT_STR_GOT_TOPIC
};
const char* const mqttStr[] PROGMEM = {
"connected",
"not connected",
"available",
"last_success",
"total",
"MQTT got topic: "
};
enum {
MQTT_UPTIME = 0,
MQTT_RSSI,
MQTT_FREE_HEAP,
MQTT_HEAP_FRAG,
MQTT_SUNRISE,
MQTT_SUNSET,
MQTT_COMM_START,
MQTT_COMM_STOP,
MQTT_COMM_DISABLED,
MQTT_COMM_DIS_TS,
MQTT_VERSION,
MQTT_DEVICE,
MQTT_IP_ADDR,
MQTT_STATUS,
MQTT_LWT_ONLINE,
MQTT_LWT_OFFLINE,
MQTT_ACK_PWR_LMT,
MQTT_TEMP_SENS_C
};
const char* const subtopics[] PROGMEM = {
"uptime",
"wifi_rssi",
"free_heap",
"heap_frag",
"sunrise",
"sunset",
"comm_start",
"comm_stop",
"comm_disabled",
"comm_dis_ts",
"version",
"device",
"ip_addr",
"status",
"connected",
"not_connected",
"ack_pwr_limit",
"cpu_temp"
};
enum {
MQTT_SUBS_SET_TIME
};
const char* const subscr[] PROGMEM = {
"setup/set_time"
};
#endif /*__PUB_MQTT_DEFS_H__*/