-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplatformio.ini
79 lines (72 loc) · 2.28 KB
/
platformio.ini
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
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[platformio]
# copy inverter_template.ini to inverter.ini and modify to match your inverter serial number
extra_configs = inverter.ini
[program]
name = power
version = 6.9
# adapt these to your environment
instance = 3
serial_speed = 9600
syslog_server = job4
syslog_port = 514
influx_server = job4
influx_port = 8086
ntp_server = fritz.box
wled_leds = 60
wled_host = wled1
wled_port = 21324
wled_brightness = 100
mqtt_broker = job4
mqtt_port = 1883
dtu_topic = OpenDTU1
inverter_limit = 600
backfeed_min = 200
backfeed_max = 500
[extra]
build_flags =
-Wall
-DVERSION='"${program.version}"'
-DPROGNAME='"${program.name}"'
-DHOSTNAME='"${program.name}${program.instance}"'
-DINFLUX_DB='"${program.name}"'
-DINFLUX_SERVER='"${program.influx_server}"'
-DINFLUX_PORT=${program.influx_port}
-DSYSLOG_SERVER='"${program.syslog_server}"'
-DSYSLOG_PORT=${program.syslog_port}
# remove if not using WLED as indicator
-DWLED_LEDS=${program.wled_leds}
-DWLED_BRIGHTNESS=${program.wled_brightness}
-DWLED_HOST='"${program.wled_host}"'
-DWLED_PORT=${program.wled_port}
-DMQTT_BROKER='"${program.mqtt_broker}"'
-DMQTT_PORT=${program.mqtt_port}
# remove to not adjust the inverter limit
-DDTU_TOPIC='"${program.dtu_topic}"'
-DINVERTER_SERIAL='"${inverter.serial}"'
-DINVERTER_LIMIT=${program.inverter_limit}
-DBACKFEED_MIN=${program.backfeed_min}
-DBACKFEED_MAX=${program.backfeed_max}
-DNTP_SERVER='"${program.ntp_server}"'
-DSERIAL_SPEED=${program.serial_speed}
[env:d1_mini]
platform = espressif8266
board = d1_mini
framework = arduino
lib_deps = Syslog, WiFiManager, NTPClient, PubSubClient
build_flags = ${extra.build_flags}
monitor_port = /dev/ttyUSB1
monitor_speed = ${program.serial_speed}
#upload_port = /dev/ttyUSB2
#upload_speed = 115200
extra_scripts = upload_script.py
upload_protocol = custom
upload_port = ${program.name}${program.instance}/update