-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.h
42 lines (28 loc) · 971 Bytes
/
settings.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
#define BAUD_RATE 115200
#define P1_SERIAL_RX D5
#define P1_MAXLINELENGTH 1024
#define HOSTNAME "p1meter"
#define OTA_PASSWORD "admin"
#define WIFI_TIMEOUT 30000
#define MQTT_MAX_RECONNECT_TRIES 100
#define MQTT_ROOT_TOPIC "sensors/power/p1meter"
long LAST_RECONNECT_ATTEMPT = 0;
char WIFI_SSID[32] = "CHANGE_WITH_YOUR_WIFI_SSID";
char WIFI_PASS[32] = "CHANGE_WITH_YOUR_WIFI_PASSWORD";
char MQTT_HOST[64] = "CHANGE_WITH_YOUR_MQTT_BROKER_HOST";
char MQTT_PORT[6] = "CHANGE_WITH_YOUR_MQTT_BROKER_PORT(USUALLY_1883)";
char MQTT_USER[32] = "CHANGE_WITH_YOUR_MQTT_USER";
char MQTT_PASS[32] = "CHANGE_WITH_YOUR_MQTT_PASSWORD";
char telegram[P1_MAXLINELENGTH];
long CONSUMPTION_LOW_TARIF;
long CONSUMPTION_HIGH_TARIF;
long ACTUAL_CONSUMPTION;
long INSTANT_POWER_CURRENT;
long INSTANT_POWER_USAGE;
long GAS_METER_M3;
long ACTUAL_TARIF;
long SHORT_POWER_OUTAGES;
long LONG_POWER_OUTAGES;
long SHORT_POWER_DROPS;
long SHORT_POWER_PEAKS;
unsigned int currentCRC = 0;