forked from 1technophile/OpenMQTTGateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
platformio.ini
380 lines (354 loc) · 9.89 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
; 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]
src_dir = main
extra_configs =
tests/*_env.ini
*_env.ini
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ENVIRONMENT CHOICE ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Uncomment the env line corresponding to your board and modules required, ;
;you can also adapt the modules by removing the corresponding lines in the env detail ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;default_envs = sonoff-basic-rfr3
;default_envs = rfbridge
;default_envs = esp32dev-all
;default_envs = esp32dev-rf
;default_envs = esp32dev-ir
;default_envs = esp32dev-ble
;default_envs = ttgo-lora32-v1
;default_envs = nodemcuv2-rf
;default_envs = nodemcuv2-ir
;default_envs = nodemcuv2-ble
;default_envs = nodemcuv2-all
;default_envs = uno-rf
;default_envs = uno-fastled
;default_envs = atmega-all
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ENVIRONMENTS PARAMETERS ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Libraries and parameters shared accross environements ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[libraries]
arduinojson = [email protected]
pubsubclient = [email protected]
rc-switch = 1technophile/rc-switch#90adb34
newremoteswitch = 1technophile/NewRemoteSwitch#8eb980e
ble = eos1d3/ESP32_BLE#9d6c1ed
irremoteesp = [email protected]
irremote = IRremote
lora = sandeepmistry/arduino-LoRa#f4a1d27
esppilight = [email protected]
rfm69 = RFM69@4a6f77ad47
dht = DHT sensor [email protected]
unifiedsensor = Adafruit Unified [email protected]
tsl2561 = Adafruit [email protected]
bme280 = SparkFun [email protected]
bmp180 = BMP180@efac46bd8d
ina226 = jarzebski/Arduino-INA226#968a684
a6lib = 1technophile/A6lib
wifimanager = tzapu/WiFiManager#c3ff582
ethernet = Ethernet
esp8266_mdns = esp8266_mdns
wire = Wire
fastled = FastLED
[env]
framework = arduino
lib_deps =
${libraries.pubsubclient}
${libraries.arduinojson}
build_flags =
-w ; supress all warnings
'-DjsonPublishing=true'
'-DjsonReceiving=true'
monitor_speed = 115200
[com]
esp8266_platform = [email protected] ; 2.4.2
esp32_platform = [email protected]
atmelavr_platform = [email protected]
[com-esp]
lib_deps =
${env.lib_deps}
${libraries.wifimanager}
build_flags =
${env.build_flags}
-DMQTT_MAX_PACKET_SIZE=1024
'-DsimpleReceiving=true'
'-DsimplePublishing=true'
'-DZmqttDiscovery="HADiscovery"'
'-DTRACE=1'
[com-arduino]
lib_deps =
${env.lib_deps}
${libraries.ethernet}
build_flags =
${env.build_flags}
-DMQTT_MAX_PACKET_SIZE=1024
'-DsimpleReceiving=true'
'-DsimplePublishing=true'
'-DZmqttDiscovery="HADiscovery"'
'-DTRACE=1'
[com-arduino-low-memory]
lib_deps =
${env.lib_deps}
${libraries.ethernet}
build_flags =
${env.build_flags}
-DMQTT_MAX_PACKET_SIZE=128
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ENVIRONMENTS LIST ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;List of environments that can be build ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[env:rfbridge]
platform = ${com.esp8266_platform}
board = esp8285
lib_deps =
${com-esp.lib_deps}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewaySRFB="SRFB"'
'-DGateway_Name="OpenMQTTGateway_SRFB"'
board_build.flash_mode = dout
[env:esp32dev-all]
platform = ${com.esp32_platform}
board = esp32dev
board_build.partitions = min_spiffs.csv
lib_deps =
${com-esp.lib_deps}
${libraries.ble}
${libraries.irremoteesp}
${libraries.lora}
${libraries.rfm69}
${libraries.rc-switch}
${libraries.newremoteswitch}
${libraries.bme280}
${libraries.bmp180}
${libraries.unifiedsensor}
${libraries.dht}
${libraries.tsl2561}
${libraries.ina226}
${libraries.fastled}
build_flags =
${com-esp.build_flags}
'-DZgatewayRF="RF"'
'-DZgatewayLORA="LORA"'
'-DZgatewayRF2="RF2"'
'-DZgatewayIR="IR"'
'-DZgatewayBT="BT"'
'-DZactuatorONOFF="ONOFF"'
'-DZactuatorFASTLED="FASTLED"'
'-DZsensorINA226="INA226"'
'-DZsensorHCSR501="HCSR501"'
'-DZsensorADC="ADC"'
'-DZsensorBH1750="BH1750"'
'-DZsensorBME280="BME280"'
'-DZsensorTSL2561="TSL2561"'
'-DZsensorDHT="DHT"'
'-DZgatewayRFM69="RFM69"'
'-DZsensorGPIOInput="GPIOInput"'
'-DZsensorGPIOKeyCode="GPIOKeyCode"'
'-DGateway_Name="OpenMQTTGateway_ESP32_ALL"'
[env:esp32dev-rf]
platform = ${com.esp32_platform}
board = esp32dev
lib_deps =
${com-esp.lib_deps}
${libraries.rc-switch}
build_flags =
${com-esp.build_flags}
'-DZgatewayRF="RF"'
'-DGateway_Name="OpenMQTTGateway_ESP32_RF"'
[env:esp32dev-ir]
platform = ${com.esp32_platform}
board = esp32dev
lib_deps =
${com-esp.lib_deps}
${libraries.irremoteesp}
build_flags =
${com-esp.build_flags}
'-DZgatewayIR="IR"'
'-DGateway_Name="OpenMQTTGateway_ESP32_IR"'
[env:esp32dev-ble]
platform = ${com.esp32_platform}
board = esp32dev
board_build.partitions = min_spiffs.csv
lib_deps =
${com-esp.lib_deps}
${libraries.ble}
build_flags =
${com-esp.build_flags}
'-DZgatewayBT="BT"'
'-DGateway_Name="OpenMQTTGateway_ESP32_BLE"'
[env:ttgo-lora32-v1]
platform = ${com.esp32_platform}
board = ttgo-lora32-v1
lib_deps =
${com-esp.lib_deps}
${libraries.lora}
build_flags =
${com-esp.build_flags}
'-DZgatewayLORA="LORA"'
'-DGateway_Name="OpenMQTTGateway_ESP32_LORA"'
[env:nodemcuv2-all]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
${com-esp.lib_deps}
${libraries.esppilight}
${libraries.irremoteesp}
${libraries.rfm69}
${libraries.rc-switch}
${libraries.a6lib}
${libraries.newremoteswitch}
${libraries.bme280}
${libraries.bmp180}
${libraries.unifiedsensor}
${libraries.dht}
${libraries.tsl2561}
${libraries.ina226}
${libraries.esp8266_mdns}
${libraries.wire}
${libraries.fastled}
build_flags =
${com-esp.build_flags}
'-DZgatewayRF="RF"'
'-DZgatewayRF2="RF2"'
'-DZgatewayIR="IR"'
'-DZgatewayBT="BT"'
'-DZgateway2G="2G"'
'-DZgatewayPilight="Pilight"'
'-DZactuatorONOFF="ONOFF"'
'-DZactuatorFASTLED="FASTLED"'
'-DZsensorINA226="INA226"'
'-DZsensorHCSR501="HCSR501"'
'-DZsensorADC="ADC"'
'-DZsensorBH1750="BH1750"'
'-DZsensorBME280="BME280"'
'-DZsensorTSL2561="TSL2561"'
'-DZsensorDHT="DHT"'
'-DZgatewayRFM69="RFM69"'
'-DZsensorGPIOInput="GPIOInput"'
'-DZsensorGPIOKeyCode="GPIOKeyCode"'
'-DGateway_Name="OpenMQTTGateway_ESP8266_ALL"'
board_build.flash_mode = dout
[env:nodemcuv2-ble]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
${com-esp.lib_deps}
${libraries.wire}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewayBT="BT"'
'-DGateway_Name="OpenMQTTGateway_ESP8266_BLE"'
board_build.flash_mode = dout
[env:nodemcuv2-ir]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
${com-esp.lib_deps}
${libraries.irremoteesp}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewayIR="IR"'
'-DGateway_Name="OpenMQTTGateway_ESP8266_IR"'
board_build.flash_mode = dout
[env:nodemcuv2-rf]
platform = ${com.esp8266_platform}
board = nodemcuv2
lib_deps =
${com-esp.lib_deps}
${libraries.rc-switch}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewayRF="RF"'
'-DGateway_Name="OpenMQTTGateway_ESP8266_RF"'
board_build.flash_mode = dout
[env:sonoff-basic-rfr3]
platform = ${com.esp8266_platform}
board = esp8285
lib_deps =
${com-esp.lib_deps}
${libraries.rc-switch}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZactuatorONOFF="ONOFF"'
'-DZsensorGPIOInput="GPIOInput"'
'-DACTUATOR_ONOFF_PIN=12'
'-DGPIOInput_PIN=0'
'-DRF_RECEIVER_PIN=4'
'-DZgatewayRF="RF"'
'-DGateway_Name="OpenMQTTGateway_SONOFF_BASIC_RFR3"'
board_build.flash_mode = dout
[env:atmega-all]
platform = ${com.atmelavr_platform}
board = megaatmega2560
lib_deps =
${com-arduino.lib_deps}
${libraries.irremote}
${libraries.rfm69}
${libraries.rc-switch}
${libraries.newremoteswitch}
${libraries.bme280}
${libraries.bmp180}
${libraries.unifiedsensor}
${libraries.dht}
${libraries.tsl2561}
${libraries.a6lib}
${libraries.ina226}
${libraries.fastled}
build_flags =
${com-arduino.build_flags}
'-DZgatewayRF="RF"'
'-DZgatewayRF="RF315"'
'-DZgatewayRF2="RF2"'
'-DZgatewayIR="IR"'
;'-DZgatewayBT="BT"'
'-DZactuatorONOFF="ONOFF"'
'-DZactuatorFASTLED="FASTLED"'
'-DZsensorINA226="INA226"'
'-DZsensorHCSR501="HCSR501"'
'-DZsensorADC="ADC"'
'-DZsensorBH1750="BH1750"'
'-DZsensorBME280="BME280"'
'-DZsensorTSL2561="TSL2561"'
'-DZsensorDHT="DHT"'
'-DZgatewayRFM69="RFM69"'
'-DZsensorGPIOInput="GPIOInput"'
;'-DZsensorGPIOKeyCode="GPIOKeyCode"'
'-DZmqttDiscovery="HADiscovery"'
'-DGateway_Name="OpenMQTTGateway_ATMEGA_ALL"'
[env:uno-rf]
platform = ${com.atmelavr_platform}
board = uno
lib_deps =
${com-arduino.lib_deps}
${libraries.rc-switch}
build_flags =
${com-arduino-low-memory.build_flags}
'-DZgatewayRF="RF"'
'-DGateway_Name="OpenMQTTGateway_UNO_RF"'
[env:uno-fastled]
platform = ${com.atmelavr_platform}
board = uno
lib_deps =
${com-arduino.lib_deps}
${libraries.fastled}
build_flags =
${com-arduino-low-memory.build_flags}
'-DGateway_Name="OpenMQTTGateway_UNO_RF"'
'-DZactuatorFASTLED="FASTLED"'