forked from hoylabs/OpenDTU-OnBattery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
platformio_huawei.ini
600 lines (583 loc) · 19.4 KB
/
platformio_huawei.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
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
[env:generic_esp32_4mb_huawei]
board = esp32dev
board_build.partitions = partitions_custom_4mb.csv
build_flags = ${env.build_flags}
-DUSE_RADIO_NRF=1
; CAN BUS Controller provider
-DUSE_CHARGER_CAN0=1
-DUSE_CHARGER_MCP2515=1
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_GOBEL_RS485_RECEIVER=1 ; not implemented yet
; -DUSE_PYTES_CAN_RECEIVER=1
[env:generic_esp32_4mb_no_ota_huawei]
board = esp32dev
board_build.partitions = partitions_custom_4mb_no_ota.csv
build_flags = ${env.build_flags}
-DUSE_RADIO_NRF=1
-DUSE_RADIO_CMT=1
; CAN BUS Controller provider
-DUSE_CHARGER_CAN0=1 ; integrate internal CAN0 Bus Controller for CAN Bus controlled charger
-DUSE_CHARGER_MCP2515=1 ; integrate MCP2515 CAN Bus Controller for CAN Bus controlled charger
-DUSE_CHARGER_I2C=1 ; integrate I2C to MCP2515 CAN Bus Controller for CAN Bus controlled charger
-DUSE_BATTERY_CAN0=1 ; integrate internal CAN0 Bus Controller for CAN Bus controlled battery
-DUSE_BATTERY_MCP2515=1 ; integrate MCP2515 CAN Bus Controller for CAN Bus controlled battery
-DUSE_BATTERY_I2C=1 ; integrate I2C to MCP2515 CAN Bus Controller for CAN Bus controlled battery
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1 ; not yet tested
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_GOBEL_RS485_RECEIVER=1 ; not implemented yet
-DUSE_JKBMS_CONTROLLER=1
-DUSE_JBDBMS_CONTROLLER=1
-DUSE_DALYBMS_CONTROLLER=1
-DUSE_VICTRON_SMART_SHUNT=1
-DUSE_MQTT_BATTERY=1
; -DUSE_MQTT_ZENDURE_BATTERY=1 ; not fully implemented and tested
-DUSE_PYTES_CAN_RECEIVER=1
; -DUSE_SBS_CAN_RECEIVER=1
; LED and RGB LED module
-DUSE_LED_SINGLE=1
; additional options
-DUSE_PROMETHEUS=1
-DUSE_HASS=1
[env:generic_esp32_8mb_huawei]
board = esp32dev
build_flags = ${env.build_flags}
-DUSE_RADIO_NRF=1
-DUSE_RADIO_CMT=1
; CAN BUS Controller provider
-DUSE_CHARGER_CAN0=1 ; integrate internal CAN0 Bus Controller for CAN Bus controlled charger
-DUSE_CHARGER_MCP2515=1 ; integrate MCP2515 CAN Bus Controller for CAN Bus controlled charger
-DUSE_CHARGER_I2C=1 ; integrate I2C to MCP2515 CAN Bus Controller for CAN Bus controlled charger
-DUSE_BATTERY_CAN0=1 ; integrate internal CAN0 Bus Controller for CAN Bus controlled battery
-DUSE_BATTERY_MCP2515=1 ; integrate MCP2515 CAN Bus Controller for CAN Bus controlled battery
-DUSE_BATTERY_I2C=1 ; integrate I2C to MCP2515 CAN Bus Controller for CAN Bus controlled battery
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1 ; not yet tested
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_GOBEL_RS485_RECEIVER=1 ; not implemented yet
-DUSE_JKBMS_CONTROLLER=1
-DUSE_JBDBMS_CONTROLLER=1
-DUSE_DALYBMS_CONTROLLER=1
-DUSE_VICTRON_SMART_SHUNT=1
-DUSE_MQTT_BATTERY=1
; -DUSE_MQTT_ZENDURE_BATTERY=1 ; not fully implemented and tested
-DUSE_PYTES_CAN_RECEIVER=1
; -DUSE_SBS_CAN_RECEIVER=1
; LED and RGB LED module
-DUSE_LED_SINGLE=1
; -DUSE_LED_STRIP=1
; Display
-DUSE_DISPLAY_GRAPHIC=1
; additional options
-DUSE_PROMETHEUS=1
-DUSE_HASS=1
[env:generic_esp32_16mb_psram_huawei]
board = esp32dev
board_build.flash_mode = qio
board_build.partitions = partitions_custom_16mb.csv
board_upload.flash_size = 16MB
build_flags = ${env.build_flags}
-DUSE_SURPLUSPOWER=1
-DUSE_RADIO_NRF=1
-DUSE_RADIO_CMT=1
; CAN BUS Controller provider
-DUSE_CHARGER_CAN0=1 ; integrate internal CAN0 Bus Controller for CAN Bus controlled charger
-DUSE_CHARGER_MCP2515=1 ; integrate MCP2515 CAN Bus Controller for CAN Bus controlled charger
-DUSE_CHARGER_I2C=1 ; integrate I2C to MCP2515 CAN Bus Controller for CAN Bus controlled charger
-DUSE_BATTERY_CAN0=1 ; integrate internal CAN0 Bus Controller for CAN Bus controlled battery
-DUSE_BATTERY_MCP2515=1 ; integrate MCP2515 CAN Bus Controller for CAN Bus controlled battery
-DUSE_BATTERY_I2C=1 ; integrate I2C to MCP2515 CAN Bus Controller for CAN Bus controlled battery
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1 ; not yet tested
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_GOBEL_RS485_RECEIVER=1 ; not implemented yet
-DUSE_MQTT_BATTERY=1
; -DUSE_MQTT_ZENDURE_BATTERY=1 ; not fully implemented and tested
-DUSE_JKBMS_CONTROLLER=1
-DUSE_JBDBMS_CONTROLLER=1
-DUSE_DALYBMS_CONTROLLER=1
-DUSE_VICTRON_SMART_SHUNT=1
-DUSE_PYTES_CAN_RECEIVER=1
; -DUSE_SBS_CAN_RECEIVER=1
; LED and RGB LED module
-DUSE_LED_SINGLE=1
; -DUSE_LED_STRIP=1
; Display
-DUSE_DISPLAY_GRAPHIC=1
; additional options
-DUSE_PROMETHEUS=1
-DUSE_HASS=1
-DUSE_ModbusDTU=1
-DSIMULATE_HOYMILES_DTU=1
-DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
[env:generic_esp32c3_huawei]
board = esp32-c3-devkitc-02
board_build.partitions = partitions_custom_4mb_no_ota.csv
custom_patches = ${env.custom_patches}
build_flags = ${env.build_flags}
-DUSE_RADIO_NRF=1
; CAN BUS Controller provider
-DUSE_CHARGER_CAN0=1
-DUSE_CHARGER_MCP2515=1
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_GOBEL_RS485_RECEIVER=1 ; not implemented yet
-DUSE_MQTT_BATTERY=1
; -DUSE_MQTT_ZENDURE_BATTERY=1 ; not fully implemented and tested
-DUSE_JKBMS_CONTROLLER=1
-DUSE_JBDBMS_CONTROLLER=1
-DUSE_DALYBMS_CONTROLLER=1
-DUSE_VICTRON_SMART_SHUNT=1
; -DUSE_PYTES_CAN_RECEIVER=1
; -DUSE_SBS_CAN_RECEIVER=1
; LED and RGB LED module
-DUSE_LED_SINGLE=1
; -DUSE_LED_STRIP=1
; Display
-DUSE_DISPLAY_GRAPHIC=1
; additional options
-DUSE_PROMETHEUS=1
-DUSE_HASS=1
[env:generic_esp32c3_usb_huawei]
board = esp32-c3-devkitc-02
board_build.partitions = partitions_custom_4mb_no_ota.csv
custom_patches = ${env.custom_patches}
build_flags = ${env.build_flags}
-DUSE_RADIO_NRF=1
; CAN BUS Controller provider
-DUSE_CHARGER_CAN0=1
-DUSE_CHARGER_MCP2515=1
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_GOBEL_RS485_RECEIVER=1 ; not implemented yet
-DUSE_MQTT_BATTERY=1
; -DUSE_MQTT_ZENDURE_BATTERY=1 ; not fully implemented and tested
-DUSE_JKBMS_CONTROLLER=1
-DUSE_JBDBMS_CONTROLLER=1
-DUSE_DALYBMS_CONTROLLER=1
-DUSE_VICTRON_SMART_SHUNT=1
; -DUSE_PYTES_CAN_RECEIVER=1
; -DUSE_SBS_CAN_RECEIVER=1
; LED and RGB LED module
-DUSE_LED_SINGLE=1
; -DUSE_LED_STRIP=1
; Display
-DUSE_DISPLAY_GRAPHIC=1
-DUSE_PROMETHEUS=1
;additional options
-DUSE_HASS=1
; USB
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
[env:generic_esp32s3_huawei]
board = esp32-s3-devkitc-1
build_flags = ${env.build_flags}
-DUSE_RADIO_NRF=1
-DUSE_RADIO_CMT=1
; CAN BUS Controller provider
-DUSE_CHARGER_CAN0=1 ; integrate internal CAN0 Bus Controller for CAN Bus controlled charger
-DUSE_CHARGER_MCP2515=1 ; integrate MCP2515 CAN Bus Controller for CAN Bus controlled charger
-DUSE_CHARGER_I2C=1 ; integrate I2C to MCP2515 CAN Bus Controller for CAN Bus controlled charger
-DUSE_BATTERY_CAN0=1 ; integrate internal CAN0 Bus Controller for CAN Bus controlled battery
-DUSE_BATTERY_MCP2515=1 ; integrate MCP2515 CAN Bus Controller for CAN Bus controlled battery
-DUSE_BATTERY_I2C=1 ; integrate I2C to MCP2515 CAN Bus Controller for CAN Bus controlled battery
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_GOBEL_RS485_RECEIVER=1 ; not implemented yet
-DUSE_MQTT_BATTERY=1
; -DUSE_MQTT_ZENDURE_BATTERY=1 ; not fully implemented and tested
-DUSE_JKBMS_CONTROLLER=1
-DUSE_JBDBMS_CONTROLLER=1
-DUSE_DALYBMS_CONTROLLER=1
-DUSE_VICTRON_SMART_SHUNT=1
-DUSE_PYTES_CAN_RECEIVER=1
; -DUSE_SBS_CAN_RECEIVER=1
; LED and RGB LED module
-DUSE_LED_SINGLE=1
; -DUSE_LED_STRIP=1
; Display
-DUSE_DISPLAY_GRAPHIC=1
; Surplus Power Mode in Dynamic Powerlimiter
-DUSE_SURPLUSPOWER=1
; additional options
-DUSE_PROMETHEUS=1
-DUSE_HASS=1
[env:generic_esp32s3_usb_huawei]
board = esp32-s3-devkitc-1
board_build.partitions = partitions_custom_16mb.csv
upload_protocol = esp-builtin
monitor_port = COM6
;upload_port = COM5
build_flags = ${env.build_flags}
-DUSE_RADIO_NRF=1
-DUSE_RADIO_CMT=1
; CAN BUS Controller provider
-DUSE_CHARGER_CAN0=1 ; integrate internal CAN0 Bus Controller for CAN Bus controlled charger
-DUSE_CHARGER_MCP2515=1 ; integrate MCP2515 CAN Bus Controller for CAN Bus controlled charger
-DUSE_CHARGER_I2C=1 ; integrate I2C to MCP2515 CAN Bus Controller for CAN Bus controlled charger
-DUSE_BATTERY_CAN0=1 ; integrate internal CAN0 Bus Controller for CAN Bus controlled battery
-DUSE_BATTERY_MCP2515=1 ; integrate MCP2515 CAN Bus Controller for CAN Bus controlled battery
-DUSE_BATTERY_I2C=1 ; integrate I2C to MCP2515 CAN Bus Controller for CAN Bus controlled battery
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_GOBEL_RS485_RECEIVER=1 ; not implemented yet
-DUSE_MQTT_BATTERY=1
; -DUSE_MQTT_ZENDURE_BATTERY=1 ; not fully implemented and tested
-DUSE_JKBMS_CONTROLLER=1
-DUSE_JBDBMS_CONTROLLER=1
-DUSE_DALYBMS_CONTROLLER=1
-DUSE_VICTRON_SMART_SHUNT=1
-DUSE_PYTES_CAN_RECEIVER=1
; -DUSE_SBS_CAN_RECEIVER=1
; LED and RGB LED module
-DUSE_LED_SINGLE=1
-DLED0=-1 ; blue LED
-DLED1=-1 ; white LED
; -DUSE_LED_STRIP=1
; -DLED_RGB=-1
; Display
-DUSE_DISPLAY_GRAPHIC=1
; Surplus Power Mode in Dynamic Powerlimiter
-DUSE_SURPLUSPOWER=1
; additional options
-DUSE_PROMETHEUS=1
-DUSE_HASS=1
; USB
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
[env:generic_esp32s3_16mb_psram_usb_huawei]
board = esp32-s3-devkitc-1
;board = esp32-s3-devkitc-1-n16r8v
board_build.arduino.memory_type = qio_opi
board_build.flash_mode = qio
board_build.psram_type = opi
board_upload.flash_size = 16MB
board_build.maximum_size = 16777216
board_build.partitions = partitions_custom_16mb.csv
;board_build.arduino.memory_type = qio_opi ; NEEDED FOR PSRAM also dio_qspi/qsi_qspi for other configs
upload_protocol = esp-builtin
monitor_port = COM6
;upload_port = COM5
build_flags = ${env.build_flags}
; -DUSE_REFUsol_INVERTER=1
-DUSE_RADIO_NRF=1
-DUSE_RADIO_CMT=1
; CAN BUS Controller provider
-DUSE_CHARGER_CAN0=1 ; integrate internal CAN0 Bus Controller for CAN Bus controlled charger
-DUSE_CHARGER_MCP2515=1 ; integrate MCP2515 CAN Bus Controller for CAN Bus controlled charger
-DUSE_CHARGER_I2C=1 ; integrate I2C to MCP2515 CAN Bus Controller for CAN Bus controlled charger
-DUSE_BATTERY_CAN0=1 ; integrate internal CAN0 Bus Controller for CAN Bus controlled battery
-DUSE_BATTERY_MCP2515=1 ; integrate MCP2515 CAN Bus Controller for CAN Bus controlled battery
-DUSE_BATTERY_I2C=1 ; integrate I2C to MCP2515 CAN Bus Controller for CAN Bus controlled battery
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_GOBEL_RS485_RECEIVER=1 ; not implemented yet
-DUSE_MQTT_BATTERY=1
; -DUSE_MQTT_ZENDURE_BATTERY=1 ; not fully implemented and tested
-DUSE_JKBMS_CONTROLLER=1
-DUSE_JBDBMS_CONTROLLER=1
-DUSE_DALYBMS_CONTROLLER=1
-DUSE_VICTRON_SMART_SHUNT=1
-DUSE_PYTES_CAN_RECEIVER=1
-DUSE_SBS_CAN_RECEIVER=1
; LED and RGB LED module
; -DUSE_LED_SINGLE=1
-DUSE_LED_STRIP=1
; Display
-DUSE_DISPLAY_GRAPHIC=1
-DDISPLAY_TYPE=0 ; SSD1306 I2C
; Surplus Power Mode in Dynamic Powerlimiter
-DUSE_SURPLUSPOWER=1
; additional options
-DUSE_PROMETHEUS=1
-DUSE_HASS=1
-DUSE_SYSLOG=1
; USB
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
; enable PSRAM
-DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
[env:olimex_esp32_poe_huawei]
; https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware
board = esp32-poe
build_flags = ${env.build_flags}
-DUSE_RADIO_NRF=1
-DNRF24_PIN_MISO=15
-DNRF24_PIN_MOSI=2
-DNRF24_PIN_SCLK=14
-DNRF24_PIN_IRQ=13
-DNRF24_PIN_CE=16
-DNRF24_PIN_CS=5
; CAN BUS Controller provider
-DUSE_CHARGER_CAN0=1
-DUSE_CHARGER_MCP2515=1
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_GOBEL_RS485_RECEIVER=1 ; not implemented yet
; -DUSE_PYTES_CAN_RECEIVER=1
; -DUSE_SBS_CAN_RECEIVER=1
; additional options
-DUSE_PROMETHEUS=1
-DCONFIG_ETH_USE_ESP32_EMAC
-DUSE_EMAC
[env:olimex_esp32_evb_huawei]
; https://www.olimex.com/Products/IoT/ESP32/ESP32-EVB/open-source-hardware
board = esp32-evb
board_build.partitions = partitions_custom_4mb_no_ota.csv
build_flags = ${env.build_flags}
-DUSE_RADIO_NRF=1
-DNRF24_PIN_MISO=15
-DNRF24_PIN_MOSI=2
-DNRF24_PIN_SCLK=14
-DNRF24_PIN_IRQ=13
-DNRF24_PIN_CE=16
-DNRF24_PIN_CS=17
; CAN BUS Controller provider
-DUSE_CHARGER_CAN0=1
-DUSE_CHARGER_MCP2515=1
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_GOBEL_RS485_RECEIVER=1 ; not implemented yet
; -DUSE_PYTES_CAN_RECEIVER=1
; -DUSE_SBS_CAN_RECEIVER=1
-DUSE_PROMETHEUS=1
-DCONFIG_ETH_USE_ESP32_EMAC
-DUSE_EMAC
[env:d1_mini_esp32_huawei]
board = wemos_d1_mini32
board_build.partitions = partitions_custom_4mb_no_ota.csv
build_flags =
${env.build_flags}
-DUSE_RADIO_NRF=1
; CAN BUS Controller provider
-DUSE_CHARGER_CAN0=1
-DUSE_CHARGER_MCP2515=1
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_PYTES_CAN_RECEIVER=1
; additional options
-DUSE_PROMETHEUS=1
[env:wt32_eth01_huawei]
; http://www.wireless-tag.com/portfolio/wt32-eth01/
board = wt32-eth01
board_build.partitions = partitions_custom_4mb_no_ota.csv
build_flags = ${env.build_flags}
-DUSE_RADIO_NRF=1
; CAN BUS Controller provider
-DUSE_CHARGER_CAN0=1
-DUSE_CHARGER_MCP2515=1
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_GOBEL_RS485_RECEIVER=1 ; not implemented yet
; -DUSE_PYTES_CAN_RECEIVER=1
; -DUSE_SBS_CAN_RECEIVER=1
; additional options
-DUSE_PROMETHEUS=1
-DUSE_HASS=1
; Ethernet
-DCONFIG_ETH_USE_ESP32_EMAC
-DUSE_EMAC
[env:esp_s3_12k_kit_huawei]
; https://www.waveshare.com/wiki/NodeMCU-ESP-S3-12K-Kit
board = esp32-s3-devkitc-1
build_flags = ${env.build_flags}
-DUSE_RADIO_NRF=1
-DNRF24_PIN_MISO=16
-DNRF24_PIN_MOSI=17
-DNRF24_PIN_SCLK=18
-DNRF24_PIN_IRQ=3
-DNRF24_PIN_CE=4
-DNRF24_PIN_CS=5
; CAN BUS Controller provider
-DUSE_CHARGER_CAN0=1
-DUSE_CHARGER_MCP2515=1
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_GOBEL_RS485_RECEIVER=1 ; not implemented yet
; -DUSE_PYTES_CAN_RECEIVER=1
; -DUSE_SBS_CAN_RECEIVER=1
; additional options
-DUSE_PROMETHEUS=1
-DUSE_HASS=1
[env:lolin32_lite_huawei]
; https://www.makershop.de/plattformen/esp8266/wemos-lolin32/
; https://www.az-delivery.de/products/esp32-lolin-lolin32
board = lolin32_lite
board_build.partitions = partitions_custom_4mb_no_ota.csv
build_flags = ${env.build_flags}
-DUSE_RADIO_NRF=1
-DNRF24_PIN_MISO=19
-DNRF24_PIN_MOSI=23
-DNRF24_PIN_SCLK=18
-DNRF24_PIN_IRQ=16
-DNRF24_PIN_CE=17
-DNRF24_PIN_CS=5
; CAN BUS Controlle rprovider
-DUSE_CHARGER_CAN0=1
-DUSE_CHARGER_MCP2515=1
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_GOBEL_RS485_RECEIVER=1 ; not implemented yet
; -DUSE_PYTES_CAN_RECEIVER=1
; -DUSE_SBS_CAN_RECEIVER=1
; additional options
-DUSE_PROMETHEUS=1
-DUSE_HASS=1
[env:lolin_s2_mini_huawei]
board = lolin_s2_mini
board_build.partitions = partitions_custom_4mb_no_ota.csv
build_flags = ${env.build_flags}
-DUSE_RADIO_NRF=1
-DNRF24_PIN_MISO=13
-DNRF24_PIN_MOSI=11
-DNRF24_PIN_SCLK=12
-DNRF24_PIN_CS=10
-DNRF24_PIN_IRQ=4
-DNRF24_PIN_CE=5
; CAN BUS Controlle rprovider
-DUSE_CHARGER_CAN0=1
-DUSE_CHARGER_MCP2515=1
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_GOBEL_RS485_RECEIVER=1 ; not implemented yet
; -DUSE_PYTES_CAN_RECEIVER=1
; -DUSE_SBS_CAN_RECEIVER=1
-DUSE_PROMETHEUS=1
-DUSE_HASS=1
[env:opendtufusionv1_huawei]
board = esp32-s3-devkitc-1
upload_protocol = esp-builtin
debug_tool = esp-builtin
debug_speed = 12000
build_flags = ${env.build_flags}
-DUSE_RADIO_NRF=1
-DNRF24_PIN_MISO=48
-DNRF24_PIN_MOSI=35
-DNRF24_PIN_SCLK=36
-DNRF24_PIN_IRQ=47
-DNRF24_PIN_CE=38
-DNRF24_PIN_CS=37
; CAN BUS Controlle rprovider
-DUSE_CHARGER_CAN0=1
-DUSE_CHARGER_MCP2515=1
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_GOBEL_RS485_RECEIVER=1 ; not implemented yet
; -DUSE_PYTES_CAN_RECEIVER=1
; -DUSE_SBS_CAN_RECEIVER=1
; LED and RGB LED module
-DUSE_LED_SINGLE=1
-DLED0=17
-DLED1=18
; additional options
-DUSE_PROMETHEUS=1
-DUSE_HASS=1
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1
[env:opendtufusionv2_huawei]
board = esp32-s3-devkitc-1
upload_protocol = esp-builtin
debug_tool = esp-builtin
debug_speed = 12000
build_flags = ${env.build_flags}
-DUSE_RADIO_NRF=1
-DNRF24_PIN_MISO=48
-DNRF24_PIN_MOSI=35
-DNRF24_PIN_SCLK=36
-DNRF24_PIN_IRQ=47
-DNRF24_PIN_CE=38
-DNRF24_PIN_CS=37
-DUSE_RADIO_CMT=1
-DCMT_CLK=6
-DCMT_CS=4
-DCMT_FCS=21
-DCMT_GPIO2=3
-DCMT_GPIO3=8
-DCMT_SDIO=5
; CAN BUS Controlle rprovider
-DUSE_CHARGER_CAN0=1
-DCAN0_PIN_RX=13 ; CAN0 (internal CAN/Iso: CAN RX) connected to Huawei Charger
-DCAN0_PIN_TX=14 ; CAN0 (internal CAN/Iso: CAN TX) connected to Huawei Charger
-DUSE_CHARGER_MCP2515=1
; HUAWEI charger
-DUSE_CHARGER_HUAWEI=1
; battery provider
-DUSE_PYLONTECH_RS485_RECEIVER=1
; -DUSE_GOBEL_RS485_RECEIVER=1 ; not implemented yet
-DBATTERY_PIN_RX=16 ; RS485 HW Serial (Pylontech Battery via RS485, Daly BMS via RS485/RS232 or JK BMS via RS485/RS232)
; GPIO15 is unused and configured to input mode (standard after CPU reset).
-DBATTERY_PIN_TX=45
-DBATTERY_PIN_RTS=46 ; hard wired to DE of ISL3178E chip, DE and RE pin of ISL3178E must be connected.
-DBATTERY_PIN_WAKEUP=-1
-DUSE_MQTT_BATTERY=1
; -DUSE_MQTT_ZENDURE_BATTERY=1 ; not fully implemented and tested
-DUSE_JKBMS_CONTROLLER=1
-DUSE_JBDBMS_CONTROLLER=1
-DUSE_DALYBMS_CONTROLLER=1
-DUSE_VICTRON_SMART_SHUNT=1
; -DUSE_PYTES_CAN_RECEIVER=1
; -DUSE_SBS_CAN_RECEIVER=1
; Victron MPPT GPIO pins
-DVICTRON_PIN_TX=43
-DVICTRON_PIN_RX=44
-DVICTRON_PIN_TX2=9 ; (CAN/Iso: Iso1 Ext RX / ESP TX)
-DVICTRON_PIN_RX2=10 ; (CAN/Iso: Iso1 Ext TX / ESP RX)
-DVICTRON_PIN_TX3=12 ; (CAN/Iso: Iso2 Ext RX / ESP TX)
-DVICTRON_PIN_RX3=11 ; (CAN/Iso: Iso2 Ext TX / ESP RX)
; LED and RGB LED module
-DUSE_LED_SINGLE=1
-DLED0=17 ; blue LED
-DLED1=18 ; white LED
; Display
-DUSE_DISPLAY_GRAPHIC=1
-DDISPLAY_TYPE=4 ; SSD1306 I2C
-DDISPLAY_DATA=2
-DDISPLAY_CLK=1
; Powermeter
; -DUSE_POWERMETER_HWSERIAL ; if not enabled, Powermeter RS485 connected uses SoftwareSerial
-DPOWERMETER_PIN_RX=39 ; RS485 SoftwareSerial (SDM630 via RS485 or SML Reader)
-DPOWERMETER_PIN_TX=40
-DPOWERMETER_PIN_RTS=-1
; MosFET switches to connect battery with inverter
-DPRE_CHARGE_PIN=41 ; MosFET Transitor
-DFULL_POWER_PIN=42 ; MosFET Transitor
; additional options
-DUSE_PROMETHEUS=1
-DUSE_HASS=1
; USB
-DARDUINO_USB_MODE=1
-DARDUINO_USB_CDC_ON_BOOT=1