-
Notifications
You must be signed in to change notification settings - Fork 15
/
Config.h
104 lines (90 loc) · 1.9 KB
/
Config.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
93
94
95
96
97
98
99
100
101
102
103
104
// Device Types
#define PRO 0
#define PRO_BRIDGE 1
#define PRO_ETH 2
#define PRO_H20_B 3
#define PRO_H20_2 4
#define APIURL "http://api.smart-stuff.nl/v1/register.php"
#define LED_ON LOW
#define LED_OFF HIGH
#define SETTINGS_FILE "/DSMRsettings.json"
#define HOST_DATA_FILES "cdn.jsdelivr.net"
#define PATH_DATA_FILES "https://cdn.jsdelivr.net/gh/mhendriks/P1-Dongel-ESP32@latest/data"
//LED STUFF
#define LED_BLUE 0x07
#define LED_RED 0x070000
#define LED_GREEN 0x0700
#define LED_BLACK 0x0
uint32_t R_value = 0, B_value = 0, G_value = 0;
//PROFILES
#ifdef ULTRA
#ifndef ETHERNET
#define ETHERNET
#endif
#define VIRTUAL_P1
#define MBUS
#define DEV_PAIRING
#include "hw_profile_ultra.h"
#else
#ifdef ETHERNET
#include "hw_profile_p1_eth.h"
#else
#include "hw_profile_p1_pro.h"
#endif
#endif
//FETAURES
#ifdef EID
bool bEID_enabled = true;
enum E_eid_states : uint8_t { EID_IDLE, EID_CLAIMING, EID_ENROLLED };
#ifndef VICTRON_GRID
#undef MQTT_DISABLE
#define MQTT_DISABLE
#endif
#endif //EID
#ifdef DEBUG
#define OPT1 "[DEBUG]"
#else
#define OPT1
#endif
#ifdef MBUS
#define OPT2 "[MODBUS]"
#else
#define OPT2
#endif
#ifdef DEV_PAIRING
#define OPT3 "[PAIR]"
#else
#define OPT3
#endif
#ifdef EID
#define OPT4 "[EID]"
#else
#define OPT4
#endif
#ifdef POST_TELEGRAM
#define OPT5 "[POST]"
#else
#define OPT5
#endif
#ifdef SMQTT
#define OPT6 "[SMQTT]"
#else
#define OPT6
#endif
#ifdef SE_VERSION
#define OPT7 "[SE]"
#else
#define OPT7
#endif
#ifdef VIRTUAL_P1
#define OPT8 "[VIRT_P1]"
#else
#define OPT8
#endif
#define ALL_OPTIONS PROFILE OPT1 OPT2 OPT3 OPT4 OPT5 OPT6 OPT7 OPT8
#define _DEFAULT_MQTT_TOPIC _DEFAULT_HOSTNAME "/"
#ifdef AP_ONLY
#define _DEFAULT_HOMEPAGE "/DSMRindexLOCAL.html"
#else
#define _DEFAULT_HOMEPAGE "/DSMRindexEDGE.html"
#endif