forked from irekzielinski/Pylontech-Battery-Monitoring
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathPylontechMonitoring.h
More file actions
56 lines (42 loc) · 1.54 KB
/
PylontechMonitoring.h
File metadata and controls
56 lines (42 loc) · 1.54 KB
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
#ifndef PYLONTECH_H
#define PYLONTECH_H
// +++ START CONFIGURATION +++
// Firmware Version
// 1 old firmware
// 2 new firmware
const int FW_VERSION=1;
// IMPORTANT: Specify your WiFi network credentials
#define WIFI_SSID "*** your ssid ***"
#define WIFI_PASS "*** your wifi pass ***"
#define WIFI_HOSTNAME "PylontechBattery"
// Uncomment to enable static IP configuration
//#define STATIC_IP
// Static IP address
IPAddress ip(192, 168, 11, 10);
IPAddress subnet(255, 255, 255, 0);
IPAddress gateway(192, 168, 11, 1);
IPAddress dns(192, 168, 11, 1);
// Uncomment to enable web-based authentication
//#define AUTHENTICATION
// HTTP Authentication credentials
const char* www_username = "admin";
const char* www_password = "password";
// IMPORTANT: Uncomment this line if you want to enable MQTT
// #define ENABLE_MQTT
// Set your time offset in seconds (e.g., GMT +1 = 3600, GMT +2 = 7200, etc.)
#define GMT 7200
// MQTT broker settings
#define MQTT_SERVER "*** your MQTT server ***"
#define MQTT_PORT 1883
#define MQTT_USER "*** your MQTT username ***"
#define MQTT_PASSWORD "*** your MQTT password ***"
// MQTT topic root
// For example, if "soc" is published, it becomes: pylontech/sensor/grid_battery/soc
#define MQTT_TOPIC_ROOT "pylontech/sensor/grid_battery/"
// Frequency (in seconds) for pushing data to the MQTT broker
#define MQTT_PUSH_FREQ_SEC 2
// Max Batteries
#define MAX_PYLON_BATTERIES 2
static const char HA_DISCOVERY_SENSOR_PREFIX[] = "homeassistant/sensor/";
// +++ END CONFIGURATION +++
#endif // PYLONTECH_H