-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplatformio.ini
100 lines (92 loc) · 3.88 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
; PlatformIO Project Configuration File
;
; ESP32 Daly BMS / Victron VE.Direct Monitor and Controller
;===========================================================
; by juepi (https://github.com/juepi/)
; based on ESP32-Template (https://github.com/juepi/PIO-ESP32-Template)
; ---=== Project-wide Configuration ===---
; ========================================
[common_env_data]
; Host Name of board used for OTA flashing,
; WIFI-Hostname (DHCP Client name) and MQTT Client Name
ClientName = ug-bmsctrl-1
build_flags =
; Template Functions to enable/disable
-D ONBOARD_LED
; -D SERIAL_OUT
; -D E32_DEEP_SLEEP
; -D READVCC
; Firmware Action on network and/or MQTT broker outage
; 0 = reboot ESP endlessly until network / broker recovers (default behavior until v1.1.0)
; 1 = continue to run firmware and use local default values on firmware boot (after failing to connect to broker)
; ATTN: this is only valid if E32_DEEP_SLEEP is disabled!
-D NET_OUTAGE=1
; Define to wait for messages of all subscribed topics at firmware boot (default behavior until v1.1.0)
-D WAIT_FOR_SUBSCRIPTIONS
; Project specific optional features
-D ENA_ONEWIRE ; enable OneWire Support for DS18B20 temperature sensors
-D ENA_SS2 ; enable 2nd SmartSolar Charger support (RX on ESP Pin 39)
; NOTE: no temperature safety features for charger #2!
; Network / Service Configuration
; Set system Environment Variables according to your setup
; Take care when using special characters, might need escaping
; see https://docs.platformio.org/en/latest/projectconf/section_env_build.html#build-flags
-D WIFI_SSID=\"${sysenv.WIFI_SSID}\"
-D WIFI_PSK=\"${sysenv.WIFI_PSK}\"
-D CLTNAME="${common_env_data.ClientName}"
-D MQTT_BROKER=\"${sysenv.MQTT_BROKER}\"
-D OTA_PWD=\"${sysenv.OTA_PWD}\"
; Required Libraries
lib_deps =
knolleary/PubSubClient @ ^2.8
https://github.com/maland16/daly-bms-uart
plerup/EspSoftwareSerial @ ^8.2.0
https://github.com/juepi/VeDirectFrameHandler
milesburton/DallasTemperature @ ^3.11.0
; OTA Update settings
upload_protocol = espota
upload_port = ${common_env_data.ClientName}
upload_flags =
--port=3232
--auth=${sysenv.OTA_PWD}
; ---=== Board-specific Configuration ===---
; ==========================================
; Board Selection
[platformio]
default_envs = Wemos_S2MINI
[env:Wemos_LOLIN32]
platform = espressif32
board = lolin32
framework = arduino
monitor_speed = 115200
build_flags =
-D WEMOS_LOLIN32
${common_env_data.build_flags}
lib_deps =
${common_env_data.lib_deps}
; OTA - uncomment the following 3 lines to enable OTA Flashing
;upload_protocol = ${common_env_data.upload_protocol}
;upload_port = ${common_env_data.upload_port}
;upload_flags = ${common_env_data.upload_flags}
[env:Wemos_S2MINI]
; ATTENTION: Wired Programming for this board is a bit complicated, follow these instructions:
; - Connect the board to the PC, listen to the "new device connected" sound (COM port added to system)
; - Start the PlatformIO:Upload process
; - When you see the output "Waiting for the new upload port..." on the terminal, QUICKLY
; - Press and hold the "0" button on the board and then immediately press and hold the "RST" button until you hear the "device disconnected" sound from your OS, then QUICKLY
; - Release both buttons
; - if you got this timed correctly, the upload will start - if not, retry!
; - Upload will give you a WARNING the you have to reset the board manually -> do so using the RST button and your new sketch should be booted
platform = espressif32
board = lolin_s2_mini
framework = arduino
monitor_speed = 115200
build_flags =
-D WEMOS_S2MINI
${common_env_data.build_flags}
lib_deps =
${common_env_data.lib_deps}
; OTA - uncomment the following 3 lines to enable OTA Flashing
upload_protocol = ${common_env_data.upload_protocol}
upload_port = ${common_env_data.upload_port}
upload_flags = ${common_env_data.upload_flags}