forked from syssi/esphome-jk-bms
-
Notifications
You must be signed in to change notification settings - Fork 8
/
esp32-example-jkpb-rs485_1master_6slaves.yaml
2949 lines (2883 loc) · 108 KB
/
esp32-example-jkpb-rs485_1master_6slaves.yaml
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
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
substitutions:
esp_name: esp-rs485-gw
bms0_name: rs485-bms0
bms1_name: rs485-bms1
bms2_name: rs485-bms2
bms3_name: rs485-bms3
bms4_name: rs485-bms4
bms5_name: rs485-bms5
bms6_name: rs485-bms6
device_description: "Monitor two JK-BMS via RS485 internal"
external_components_source: github://txubelaxu/esphome-jk-bms@main #github://syssi/esphome-jk-bms@main
tx_pin_uart_0: GPIO17 #GPIO1 #GPIO16
rx_pin_uart_0: GPIO16 #GPIO3 #GPIO17
talk_pin_rs485: GPIO4
esphome:
name: ${esp_name}
comment: ${device_description}
project:
name: "txubelaxu.esphome-jk-bms"
version: 1.0.0
#includes:
#- ./components/output/binary_output.h
#- ./components/jk_rs485_sniffer/gpio.h
esp32:
board: esp32dev #nodemcu-32s #wemos_d1_mini32
framework:
type: esp-idf
#esp8266:
# board: d1_mini
external_components:
- source: ${external_components_source}
refresh: 0s
# - source: ./components
# refresh: 0s
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ota:
platform: esphome
api:
logger:
level: DEBUG #VERBOSE #DEBUG #INFO #VERY_VERBOSE #VERBOSE #DEBUG #INFO #DEBUG
tx_buffer_size: 2048
# If you use Home Assistant please remove this `mqtt` section and uncomment the `api` component!
# The native API has many advantages over MQTT: https://esphome.io/components/api.html#advantages-over-mqtt
#mqtt:
# broker: !secret mqtt_host
# username: !secret mqtt_username
# password: !secret mqtt_password
# id: mqtt_client
# log_topic: null
#web_server:
# local: true
# port: 80
# auth:
# username: !secret web_server_user
# password: !secret web_server_password
uart:
- id: uart_0
baud_rate: 115200
rx_buffer_size: 500
tx_pin: ${tx_pin_uart_0}
rx_pin: ${rx_pin_uart_0}
jk_rs485_sniffer:
- id: sniffer0
protocol_version: "JK02_32S"
rx_timeout: 500ms
uart_id: uart_0
talk_pin: ${talk_pin_rs485}
jk_rs485_bms:
- id: bms0
rs485_address: 0x00
jk_rs485_sniffer_id: sniffer0
update_interval: 180s
- id: bms1
rs485_address: 0x01
jk_rs485_sniffer_id: sniffer0
update_interval: 180s
- id: bms2
rs485_address: 0x02
jk_rs485_sniffer_id: sniffer0
update_interval: 180s
- id: bms3
rs485_address: 0x03
jk_rs485_sniffer_id: sniffer0
update_interval: 180s
- id: bms4
rs485_address: 0x04
jk_rs485_sniffer_id: sniffer0
update_interval: 180s
- id: bms5
rs485_address: 0x05
jk_rs485_sniffer_id: sniffer0
update_interval: 180s
- id: bms6
rs485_address: 0x06
jk_rs485_sniffer_id: sniffer0
update_interval: 180s
binary_sensor:
- platform: jk_rs485_bms
jk_rs485_bms_id: bms0
status_balancing:
name: "${bms0_name} status balancing"
status_precharging:
name: "${bms0_name} status precharging"
status_charging:
name: "${bms0_name} status charging"
status_discharging:
name: "${bms0_name} status discharging"
status_online:
name: "${bms0_name} status online"
status_heating:
name: "${bms0_name} status heating"
alarm_wireres:
name: "${bms0_name} alarm WireRes"
alarm_mosotp:
name: "${bms0_name} alarm MosOTP"
alarm_cellquantity:
name: "${bms0_name} alarm CellQuantity"
alarm_cursensorerr:
name: "${bms0_name} alarm CurSensorErr"
alarm_cellovp:
name: "${bms0_name} alarm CellOVP"
alarm_batovp:
name: "${bms0_name} alarm BatOVP"
alarm_chocp:
name: "${bms0_name} alarm ChOCP"
alarm_chscp:
name: "${bms0_name} alarm ChSCP"
alarm_chotp:
name: "${bms0_name} alarm ChOTP"
alarm_chutp:
name: "${bms0_name} alarm ChUTP"
alarm_cpuauxcommuerr:
name: "${bms0_name} alarm CPUAuxCommuErr"
alarm_celluvp:
name: "${bms0_name} alarm CellUVP"
alarm_batuvp:
name: "${bms0_name} alarm BatUVP"
alarm_dchocp:
name: "${bms0_name} alarm DchOCP"
alarm_dchscp:
name: "${bms0_name} alarm DchSCP"
alarm_dchotp:
name: "${bms0_name} alarm DchOTP"
alarm_chargemos:
name: "${bms0_name} alarm ChargeMOS"
alarm_dischargemos:
name: "${bms0_name} alarm DischargeMOS"
alarm_gpsdisconneted:
name: "${bms0_name} alarm GPSDisconneted"
alarm_modifypwdintime:
name: "${bms0_name} alarm ModifyPWDinTime"
alarm_dischargeonfailed:
name: "${bms0_name} alarm DischargeOnFailed"
alarm_batteryovertemp:
name: "${bms0_name} alarm BatteryOverTemp"
alarm_temperaturesensoranomaly:
name: "${bms0_name} alarm TemperatureSensorAnomaly"
alarm_plcmoduleanomaly:
name: "${bms0_name} alarm PLCModuleAnomaly"
alarm_mostempsensorabsent:
name: "${bms0_name} alarm MOSTempSensorAbsent"
alarm_battempsensor1absent:
name: "${bms0_name} alarm BATTempSensor1Absent"
alarm_battempsensor2absent:
name: "${bms0_name} alarm BATTempSensor2Absent"
alarm_battempsensor3absent:
name: "${bms0_name} alarm BATTempSensor3Absent"
alarm_battempsensor4absent:
name: "${bms0_name} alarm BATTempSensor4Absent"
alarm_battempsensor5absent:
name: "${bms0_name} alarm BATTempSensor5Absent"
- platform: jk_rs485_bms
jk_rs485_bms_id: bms1
status_balancing:
name: "${bms1_name} status balancing"
status_precharging:
name: "${bms1_name} status precharging"
status_charging:
name: "${bms1_name} status charging"
status_discharging:
name: "${bms1_name} status discharging"
status_online:
name: "${bms1_name} status online"
status_heating:
name: "${bms1_name} status heating"
alarm_wireres:
name: "${bms1_name} alarm WireRes"
alarm_mosotp:
name: "${bms1_name} alarm MosOTP"
alarm_cellquantity:
name: "${bms1_name} alarm CellQuantity"
alarm_cursensorerr:
name: "${bms1_name} alarm CurSensorErr"
alarm_cellovp:
name: "${bms1_name} alarm CellOVP"
alarm_batovp:
name: "${bms1_name} alarm BatOVP"
alarm_chocp:
name: "${bms1_name} alarm ChOCP"
alarm_chscp:
name: "${bms1_name} alarm ChSCP"
alarm_chotp:
name: "${bms1_name} alarm ChOTP"
alarm_chutp:
name: "${bms1_name} alarm ChUTP"
alarm_cpuauxcommuerr:
name: "${bms1_name} alarm CPUAuxCommuErr"
alarm_celluvp:
name: "${bms1_name} alarm CellUVP"
alarm_batuvp:
name: "${bms1_name} alarm BatUVP"
alarm_dchocp:
name: "${bms1_name} alarm DchOCP"
alarm_dchscp:
name: "${bms1_name} alarm DchSCP"
alarm_dchotp:
name: "${bms1_name} alarm DchOTP"
alarm_chargemos:
name: "${bms1_name} alarm ChargeMOS"
alarm_dischargemos:
name: "${bms1_name} alarm DischargeMOS"
alarm_gpsdisconneted:
name: "${bms1_name} alarm GPSDisconneted"
alarm_modifypwdintime:
name: "${bms1_name} alarm ModifyPWDinTime"
alarm_dischargeonfailed:
name: "${bms1_name} alarm DischargeOnFailed"
alarm_batteryovertemp:
name: "${bms1_name} alarm BatteryOverTemp"
alarm_temperaturesensoranomaly:
name: "${bms1_name} alarm TemperatureSensorAnomaly"
alarm_plcmoduleanomaly:
name: "${bms1_name} alarm PLCModuleAnomaly"
alarm_mostempsensorabsent:
name: "${bms1_name} alarm MOSTempSensorAbsent"
alarm_battempsensor1absent:
name: "${bms1_name} alarm BATTempSensor1Absent"
alarm_battempsensor2absent:
name: "${bms1_name} alarm BATTempSensor2Absent"
alarm_battempsensor3absent:
name: "${bms1_name} alarm BATTempSensor3Absent"
alarm_battempsensor4absent:
name: "${bms1_name} alarm BATTempSensor4Absent"
alarm_battempsensor5absent:
name: "${bms1_name} alarm BATTempSensor5Absent"
- platform: jk_rs485_bms
jk_rs485_bms_id: bms2
status_balancing:
name: "${bms2_name} status balancing"
status_precharging:
name: "${bms2_name} status precharging"
status_charging:
name: "${bms2_name} status charging"
status_discharging:
name: "${bms2_name} status discharging"
status_online:
name: "${bms2_name} status online"
status_heating:
name: "${bms2_name} status heating"
alarm_wireres:
name: "${bms2_name} alarm WireRes"
alarm_mosotp:
name: "${bms2_name} alarm MosOTP"
alarm_cellquantity:
name: "${bms2_name} alarm CellQuantity"
alarm_cursensorerr:
name: "${bms2_name} alarm CurSensorErr"
alarm_cellovp:
name: "${bms2_name} alarm CellOVP"
alarm_batovp:
name: "${bms2_name} alarm BatOVP"
alarm_chocp:
name: "${bms2_name} alarm ChOCP"
alarm_chscp:
name: "${bms2_name} alarm ChSCP"
alarm_chotp:
name: "${bms2_name} alarm ChOTP"
alarm_chutp:
name: "${bms2_name} alarm ChUTP"
alarm_cpuauxcommuerr:
name: "${bms2_name} alarm CPUAuxCommuErr"
alarm_celluvp:
name: "${bms2_name} alarm CellUVP"
alarm_batuvp:
name: "${bms2_name} alarm BatUVP"
alarm_dchocp:
name: "${bms2_name} alarm DchOCP"
alarm_dchscp:
name: "${bms2_name} alarm DchSCP"
alarm_dchotp:
name: "${bms2_name} alarm DchOTP"
alarm_chargemos:
name: "${bms2_name} alarm ChargeMOS"
alarm_dischargemos:
name: "${bms2_name} alarm DischargeMOS"
alarm_gpsdisconneted:
name: "${bms2_name} alarm GPSDisconneted"
alarm_modifypwdintime:
name: "${bms2_name} alarm ModifyPWDinTime"
alarm_dischargeonfailed:
name: "${bms2_name} alarm DischargeOnFailed"
alarm_batteryovertemp:
name: "${bms2_name} alarm BatteryOverTemp"
alarm_temperaturesensoranomaly:
name: "${bms2_name} alarm TemperatureSensorAnomaly"
alarm_plcmoduleanomaly:
name: "${bms2_name} alarm PLCModuleAnomaly"
alarm_mostempsensorabsent:
name: "${bms2_name} alarm MOSTempSensorAbsent"
alarm_battempsensor1absent:
name: "${bms2_name} alarm BATTempSensor1Absent"
alarm_battempsensor2absent:
name: "${bms2_name} alarm BATTempSensor2Absent"
alarm_battempsensor3absent:
name: "${bms2_name} alarm BATTempSensor3Absent"
alarm_battempsensor4absent:
name: "${bms2_name} alarm BATTempSensor4Absent"
alarm_battempsensor5absent:
name: "${bms2_name} alarm BATTempSensor5Absent"
- platform: jk_rs485_bms
jk_rs485_bms_id: bms3
status_balancing:
name: "${bms3_name} status balancing"
status_precharging:
name: "${bms3_name} status precharging"
status_charging:
name: "${bms3_name} status charging"
status_discharging:
name: "${bms3_name} status discharging"
status_online:
name: "${bms3_name} status online"
status_heating:
name: "${bms3_name} status heating"
alarm_wireres:
name: "${bms3_name} alarm WireRes"
alarm_mosotp:
name: "${bms3_name} alarm MosOTP"
alarm_cellquantity:
name: "${bms3_name} alarm CellQuantity"
alarm_cursensorerr:
name: "${bms3_name} alarm CurSensorErr"
alarm_cellovp:
name: "${bms3_name} alarm CellOVP"
alarm_batovp:
name: "${bms3_name} alarm BatOVP"
alarm_chocp:
name: "${bms3_name} alarm ChOCP"
alarm_chscp:
name: "${bms3_name} alarm ChSCP"
alarm_chotp:
name: "${bms3_name} alarm ChOTP"
alarm_chutp:
name: "${bms3_name} alarm ChUTP"
alarm_cpuauxcommuerr:
name: "${bms3_name} alarm CPUAuxCommuErr"
alarm_celluvp:
name: "${bms3_name} alarm CellUVP"
alarm_batuvp:
name: "${bms3_name} alarm BatUVP"
alarm_dchocp:
name: "${bms3_name} alarm DchOCP"
alarm_dchscp:
name: "${bms3_name} alarm DchSCP"
alarm_dchotp:
name: "${bms3_name} alarm DchOTP"
alarm_chargemos:
name: "${bms3_name} alarm ChargeMOS"
alarm_dischargemos:
name: "${bms3_name} alarm DischargeMOS"
alarm_gpsdisconneted:
name: "${bms3_name} alarm GPSDisconneted"
alarm_modifypwdintime:
name: "${bms3_name} alarm ModifyPWDinTime"
alarm_dischargeonfailed:
name: "${bms3_name} alarm DischargeOnFailed"
alarm_batteryovertemp:
name: "${bms3_name} alarm BatteryOverTemp"
alarm_temperaturesensoranomaly:
name: "${bms3_name} alarm TemperatureSensorAnomaly"
alarm_plcmoduleanomaly:
name: "${bms3_name} alarm PLCModuleAnomaly"
alarm_mostempsensorabsent:
name: "${bms3_name} alarm MOSTempSensorAbsent"
alarm_battempsensor1absent:
name: "${bms3_name} alarm BATTempSensor1Absent"
alarm_battempsensor2absent:
name: "${bms3_name} alarm BATTempSensor2Absent"
alarm_battempsensor3absent:
name: "${bms3_name} alarm BATTempSensor3Absent"
alarm_battempsensor4absent:
name: "${bms3_name} alarm BATTempSensor4Absent"
alarm_battempsensor5absent:
name: "${bms3_name} alarm BATTempSensor5Absent"
- platform: jk_rs485_bms
jk_rs485_bms_id: bms4
status_balancing:
name: "${bms4_name} status balancing"
status_precharging:
name: "${bms4_name} status precharging"
status_charging:
name: "${bms4_name} status charging"
status_discharging:
name: "${bms4_name} status discharging"
status_online:
name: "${bms4_name} status online"
status_heating:
name: "${bms4_name} status heating"
alarm_wireres:
name: "${bms4_name} alarm WireRes"
alarm_mosotp:
name: "${bms4_name} alarm MosOTP"
alarm_cellquantity:
name: "${bms4_name} alarm CellQuantity"
alarm_cursensorerr:
name: "${bms4_name} alarm CurSensorErr"
alarm_cellovp:
name: "${bms4_name} alarm CellOVP"
alarm_batovp:
name: "${bms4_name} alarm BatOVP"
alarm_chocp:
name: "${bms4_name} alarm ChOCP"
alarm_chscp:
name: "${bms4_name} alarm ChSCP"
alarm_chotp:
name: "${bms4_name} alarm ChOTP"
alarm_chutp:
name: "${bms4_name} alarm ChUTP"
alarm_cpuauxcommuerr:
name: "${bms4_name} alarm CPUAuxCommuErr"
alarm_celluvp:
name: "${bms4_name} alarm CellUVP"
alarm_batuvp:
name: "${bms4_name} alarm BatUVP"
alarm_dchocp:
name: "${bms4_name} alarm DchOCP"
alarm_dchscp:
name: "${bms4_name} alarm DchSCP"
alarm_dchotp:
name: "${bms4_name} alarm DchOTP"
alarm_chargemos:
name: "${bms4_name} alarm ChargeMOS"
alarm_dischargemos:
name: "${bms4_name} alarm DischargeMOS"
alarm_gpsdisconneted:
name: "${bms4_name} alarm GPSDisconneted"
alarm_modifypwdintime:
name: "${bms4_name} alarm ModifyPWDinTime"
alarm_dischargeonfailed:
name: "${bms4_name} alarm DischargeOnFailed"
alarm_batteryovertemp:
name: "${bms4_name} alarm BatteryOverTemp"
alarm_temperaturesensoranomaly:
name: "${bms4_name} alarm TemperatureSensorAnomaly"
alarm_plcmoduleanomaly:
name: "${bms4_name} alarm PLCModuleAnomaly"
alarm_mostempsensorabsent:
name: "${bms4_name} alarm MOSTempSensorAbsent"
alarm_battempsensor1absent:
name: "${bms4_name} alarm BATTempSensor1Absent"
alarm_battempsensor2absent:
name: "${bms4_name} alarm BATTempSensor2Absent"
alarm_battempsensor3absent:
name: "${bms4_name} alarm BATTempSensor3Absent"
alarm_battempsensor4absent:
name: "${bms4_name} alarm BATTempSensor4Absent"
alarm_battempsensor5absent:
name: "${bms4_name} alarm BATTempSensor5Absent"
- platform: jk_rs485_bms
jk_rs485_bms_id: bms5
status_balancing:
name: "${bms5_name} status balancing"
status_precharging:
name: "${bms5_name} status precharging"
status_charging:
name: "${bms5_name} status charging"
status_discharging:
name: "${bms5_name} status discharging"
status_online:
name: "${bms5_name} status online"
status_heating:
name: "${bms5_name} status heating"
alarm_wireres:
name: "${bms5_name} alarm WireRes"
alarm_mosotp:
name: "${bms5_name} alarm MosOTP"
alarm_cellquantity:
name: "${bms5_name} alarm CellQuantity"
alarm_cursensorerr:
name: "${bms5_name} alarm CurSensorErr"
alarm_cellovp:
name: "${bms5_name} alarm CellOVP"
alarm_batovp:
name: "${bms5_name} alarm BatOVP"
alarm_chocp:
name: "${bms5_name} alarm ChOCP"
alarm_chscp:
name: "${bms5_name} alarm ChSCP"
alarm_chotp:
name: "${bms5_name} alarm ChOTP"
alarm_chutp:
name: "${bms5_name} alarm ChUTP"
alarm_cpuauxcommuerr:
name: "${bms5_name} alarm CPUAuxCommuErr"
alarm_celluvp:
name: "${bms5_name} alarm CellUVP"
alarm_batuvp:
name: "${bms5_name} alarm BatUVP"
alarm_dchocp:
name: "${bms5_name} alarm DchOCP"
alarm_dchscp:
name: "${bms5_name} alarm DchSCP"
alarm_dchotp:
name: "${bms5_name} alarm DchOTP"
alarm_chargemos:
name: "${bms5_name} alarm ChargeMOS"
alarm_dischargemos:
name: "${bms5_name} alarm DischargeMOS"
alarm_gpsdisconneted:
name: "${bms5_name} alarm GPSDisconneted"
alarm_modifypwdintime:
name: "${bms5_name} alarm ModifyPWDinTime"
alarm_dischargeonfailed:
name: "${bms5_name} alarm DischargeOnFailed"
alarm_batteryovertemp:
name: "${bms5_name} alarm BatteryOverTemp"
alarm_temperaturesensoranomaly:
name: "${bms5_name} alarm TemperatureSensorAnomaly"
alarm_plcmoduleanomaly:
name: "${bms5_name} alarm PLCModuleAnomaly"
alarm_mostempsensorabsent:
name: "${bms5_name} alarm MOSTempSensorAbsent"
alarm_battempsensor1absent:
name: "${bms5_name} alarm BATTempSensor1Absent"
alarm_battempsensor2absent:
name: "${bms5_name} alarm BATTempSensor2Absent"
alarm_battempsensor3absent:
name: "${bms5_name} alarm BATTempSensor3Absent"
alarm_battempsensor4absent:
name: "${bms5_name} alarm BATTempSensor4Absent"
alarm_battempsensor5absent:
name: "${bms5_name} alarm BATTempSensor5Absent"
- platform: jk_rs485_bms
jk_rs485_bms_id: bms6
status_balancing:
name: "${bms6_name} status balancing"
status_precharging:
name: "${bms6_name} status precharging"
status_charging:
name: "${bms6_name} status charging"
status_discharging:
name: "${bms6_name} status discharging"
status_online:
name: "${bms6_name} status online"
status_heating:
name: "${bms6_name} status heating"
alarm_wireres:
name: "${bms6_name} alarm WireRes"
alarm_mosotp:
name: "${bms6_name} alarm MosOTP"
alarm_cellquantity:
name: "${bms6_name} alarm CellQuantity"
alarm_cursensorerr:
name: "${bms6_name} alarm CurSensorErr"
alarm_cellovp:
name: "${bms6_name} alarm CellOVP"
alarm_batovp:
name: "${bms6_name} alarm BatOVP"
alarm_chocp:
name: "${bms6_name} alarm ChOCP"
alarm_chscp:
name: "${bms6_name} alarm ChSCP"
alarm_chotp:
name: "${bms6_name} alarm ChOTP"
alarm_chutp:
name: "${bms6_name} alarm ChUTP"
alarm_cpuauxcommuerr:
name: "${bms6_name} alarm CPUAuxCommuErr"
alarm_celluvp:
name: "${bms6_name} alarm CellUVP"
alarm_batuvp:
name: "${bms6_name} alarm BatUVP"
alarm_dchocp:
name: "${bms6_name} alarm DchOCP"
alarm_dchscp:
name: "${bms6_name} alarm DchSCP"
alarm_dchotp:
name: "${bms6_name} alarm DchOTP"
alarm_chargemos:
name: "${bms6_name} alarm ChargeMOS"
alarm_dischargemos:
name: "${bms6_name} alarm DischargeMOS"
alarm_gpsdisconneted:
name: "${bms6_name} alarm GPSDisconneted"
alarm_modifypwdintime:
name: "${bms6_name} alarm ModifyPWDinTime"
alarm_dischargeonfailed:
name: "${bms6_name} alarm DischargeOnFailed"
alarm_batteryovertemp:
name: "${bms6_name} alarm BatteryOverTemp"
alarm_temperaturesensoranomaly:
name: "${bms6_name} alarm TemperatureSensorAnomaly"
alarm_plcmoduleanomaly:
name: "${bms6_name} alarm PLCModuleAnomaly"
alarm_mostempsensorabsent:
name: "${bms6_name} alarm MOSTempSensorAbsent"
alarm_battempsensor1absent:
name: "${bms6_name} alarm BATTempSensor1Absent"
alarm_battempsensor2absent:
name: "${bms6_name} alarm BATTempSensor2Absent"
alarm_battempsensor3absent:
name: "${bms6_name} alarm BATTempSensor3Absent"
alarm_battempsensor4absent:
name: "${bms6_name} alarm BATTempSensor4Absent"
alarm_battempsensor5absent:
name: "${bms6_name} alarm BATTempSensor5Absent"
sensor:
- platform: uptime
id: uptime_sec
# +--------------------------------------+
# | Uptime sensor |
# +--------------------------------------+
- platform: uptime
name: ${esp_name} Uptime Sensor
id: uptime_sensor
update_interval: 5s
entity_category: diagnostic
on_raw_value:
then:
- text_sensor.template.publish:
id: uptime_human
state: !lambda |-
char buf[10];
int uptime_sec = round(id(uptime_sensor).raw_state);
int days = (int)(uptime_sec / 86400);
int hours = (int)((uptime_sec % 86400) / 3600);
int minutes = (int)((uptime_sec % 3600) / 60);
int seconds = (int)(uptime_sec % 60);
return(
(
(days ? sprintf(buf, "%02dd ", days), std::string(buf) : "") +
(hours ? sprintf(buf, "%02dh ", hours), std::string(buf) : "") +
(minutes ? sprintf(buf, "%02dm ", minutes), std::string(buf) : "") +
(sprintf(buf, "%02ds", seconds), std::string(buf))
).c_str()
);
- platform: jk_rs485_bms
jk_rs485_bms_id: bms0
balancing_direction:
name: "${bms0_name} balancing direction"
cell_voltage_min:
name: "${bms0_name} cell voltage min"
cell_voltage_max:
name: "${bms0_name} cell voltage max"
cell_voltage_min_cell_number:
name: "${bms0_name} cell voltage min cell number"
cell_voltage_max_cell_number:
name: "${bms0_name} cell voltage max cell number"
cell_delta_voltage:
name: "${bms0_name} cell delta voltage"
cell_average_voltage:
name: "${bms0_name} cell average voltage"
cell_resistance_min:
name: "${bms0_name} cell resistance min"
cell_resistance_max:
name: "${bms0_name} cell resistance max"
cell_resistance_min_cell_number:
name: "${bms0_name} cell resistance min cell number"
cell_resistance_max_cell_number:
name: "${bms0_name} cell resistance max cell number"
cell_voltage_01:
name: "${bms0_name} cell voltage 01"
cell_voltage_02:
name: "${bms0_name} cell voltage 02"
cell_voltage_03:
name: "${bms0_name} cell voltage 03"
cell_voltage_04:
name: "${bms0_name} cell voltage 04"
cell_voltage_05:
name: "${bms0_name} cell voltage 05"
cell_voltage_06:
name: "${bms0_name} cell voltage 06"
cell_voltage_07:
name: "${bms0_name} cell voltage 07"
cell_voltage_08:
name: "${bms0_name} cell voltage 08"
cell_voltage_09:
name: "${bms0_name} cell voltage 09"
cell_voltage_10:
name: "${bms0_name} cell voltage 10"
cell_voltage_11:
name: "${bms0_name} cell voltage 11"
cell_voltage_12:
name: "${bms0_name} cell voltage 12"
cell_voltage_13:
name: "${bms0_name} cell voltage 13"
cell_voltage_14:
name: "${bms0_name} cell voltage 14"
cell_voltage_15:
name: "${bms0_name} cell voltage 15"
cell_voltage_16:
name: "${bms0_name} cell voltage 16"
cell_voltage_17:
name: "${bms0_name} cell voltage 17"
cell_voltage_18:
name: "${bms0_name} cell voltage 18"
cell_voltage_19:
name: "${bms0_name} cell voltage 19"
cell_voltage_20:
name: "${bms0_name} cell voltage 20"
cell_voltage_21:
name: "${bms0_name} cell voltage 21"
cell_voltage_22:
name: "${bms0_name} cell voltage 22"
cell_voltage_23:
name: "${bms0_name} cell voltage 23"
cell_voltage_24:
name: "${bms0_name} cell voltage 24"
cell_resistance_01:
name: "${bms0_name} cell resistance 01"
cell_resistance_02:
name: "${bms0_name} cell resistance 02"
cell_resistance_03:
name: "${bms0_name} cell resistance 03"
cell_resistance_04:
name: "${bms0_name} cell resistance 04"
cell_resistance_05:
name: "${bms0_name} cell resistance 05"
cell_resistance_06:
name: "${bms0_name} cell resistance 06"
cell_resistance_07:
name: "${bms0_name} cell resistance 07"
cell_resistance_08:
name: "${bms0_name} cell resistance 08"
cell_resistance_09:
name: "${bms0_name} cell resistance 09"
cell_resistance_10:
name: "${bms0_name} cell resistance 10"
cell_resistance_11:
name: "${bms0_name} cell resistance 11"
cell_resistance_12:
name: "${bms0_name} cell resistance 12"
cell_resistance_13:
name: "${bms0_name} cell resistance 13"
cell_resistance_14:
name: "${bms0_name} cell resistance 14"
cell_resistance_15:
name: "${bms0_name} cell resistance 15"
cell_resistance_16:
name: "${bms0_name} cell resistance 16"
cell_resistance_17:
name: "${bms0_name} cell resistance 17"
cell_resistance_18:
name: "${bms0_name} cell resistance 18"
cell_resistance_19:
name: "${bms0_name} cell resistance 19"
cell_resistance_20:
name: "${bms0_name} cell resistance 20"
cell_resistance_21:
name: "${bms0_name} cell resistance 21"
cell_resistance_22:
name: "${bms0_name} cell resistance 22"
cell_resistance_23:
name: "${bms0_name} cell resistance 23"
cell_resistance_24:
name: "${bms0_name} cell resistance 24"
battery_voltage:
name: "${bms0_name} battery voltage"
battery_current:
name: "${bms0_name} battery current"
battery_power:
name: "${bms0_name} battery power"
battery_power_charging:
name: "${bms0_name} battery power charging"
battery_power_discharging:
name: "${bms0_name} battery power discharging"
temperature_sensor_1:
name: "${bms0_name} temperature sensor 1"
temperature_sensor_2:
name: "${bms0_name} temperature sensor 2"
temperature_sensor_3:
name: "${bms0_name} temperature sensor 3"
temperature_sensor_4:
name: "${bms0_name} temperature sensor 4"
temperature_sensor_5:
name: "${bms0_name} temperature sensor 5"
temperature_powertube:
name: "${bms0_name} temperature powertube"
battery_capacity_state_of_charge:
name: "${bms0_name} battery capacity state of charge"
battery_capacity_remaining:
name: "${bms0_name} battery capacity remaining"
charging_cycles:
name: "${bms0_name} charging cycles"
battery_capacity_total_charging_cycle:
name: "${bms0_name} battery capacity total charging cycle"
battery_total_runtime:
name: "${bms0_name} battery total runtime"
balancing_current:
name: "${bms0_name} balancing current"
errors_bitmask:
name: "${bms0_name} errors bitmask"
cell_count_real:
name: "${bms0_name} cell count real"
smart_sleep_time:
name: "${bms0_name} smart sleep time"
powertube_temperature_protection:
name: "${bms0_name} powertube temperature protection"
powertube_temperature_protection_recovery:
name: "${bms0_name} powertube temperature protection recovery"
battery_total_alarms_count:
name: "${bms0_name} battery total alarms count"
battery_total_alarms_active:
name: "${bms0_name} battery total alarms active"
emergency_time_countdown:
name: "${bms0_name} emergency time countdown"
uart1_protocol_number:
name: "${bms0_name} uart1 protocol number"
uart2_protocol_number:
name: "${bms0_name} uart2 protocol number"
battery_soh_valuation:
name: "${bms0_name} battery soh valuation"
discharging_overcurrent_protection_release_time:
name: "${bms0_name} discharging overcurrent protection release time"
discharging_short_circuit_protection_release_time:
name: "${bms0_name} discharging short circuit protection release time"
charging_overcurrent_protection_release_time:
name: "${bms0_name} charging overcurrent protection release time"
charging_short_circuit_protection_release_time:
name: "${bms0_name} charging short circuit protection release time"
cell_undervoltage_protection_release_time:
name: "${bms0_name} cell undervoltage protection release time"
cell_overvoltage_protection_release_time:
name: "${bms0_name} cell overvoltage protection release time"
- platform: jk_rs485_bms
jk_rs485_bms_id: bms1
balancing_direction:
name: "${bms1_name} balancing direction"
cell_voltage_min:
name: "${bms1_name} cell voltage min"
cell_voltage_max:
name: "${bms1_name} cell voltage max"
cell_voltage_min_cell_number:
name: "${bms1_name} cell voltage min cell number"
cell_voltage_max_cell_number:
name: "${bms1_name} cell voltage max cell number"
cell_delta_voltage:
name: "${bms1_name} cell delta voltage"
cell_average_voltage:
name: "${bms1_name} cell average voltage"
cell_resistance_min:
name: "${bms1_name} cell resistance min"
cell_resistance_max:
name: "${bms1_name} cell resistance max"
cell_resistance_min_cell_number:
name: "${bms1_name} cell resistance min cell number"
cell_resistance_max_cell_number:
name: "${bms1_name} cell resistance max cell number"
cell_voltage_01:
name: "${bms1_name} cell voltage 01"
cell_voltage_02:
name: "${bms1_name} cell voltage 02"
cell_voltage_03:
name: "${bms1_name} cell voltage 03"
cell_voltage_04:
name: "${bms1_name} cell voltage 04"
cell_voltage_05:
name: "${bms1_name} cell voltage 05"
cell_voltage_06:
name: "${bms1_name} cell voltage 06"
cell_voltage_07:
name: "${bms1_name} cell voltage 07"
cell_voltage_08:
name: "${bms1_name} cell voltage 08"
cell_voltage_09:
name: "${bms1_name} cell voltage 09"
cell_voltage_10:
name: "${bms1_name} cell voltage 10"
cell_voltage_11:
name: "${bms1_name} cell voltage 11"
cell_voltage_12:
name: "${bms1_name} cell voltage 12"
cell_voltage_13:
name: "${bms1_name} cell voltage 13"
cell_voltage_14:
name: "${bms1_name} cell voltage 14"
cell_voltage_15:
name: "${bms1_name} cell voltage 15"
cell_voltage_16:
name: "${bms1_name} cell voltage 16"
cell_voltage_17:
name: "${bms1_name} cell voltage 17"
cell_voltage_18:
name: "${bms1_name} cell voltage 18"
cell_voltage_19:
name: "${bms1_name} cell voltage 19"
cell_voltage_20:
name: "${bms1_name} cell voltage 20"
cell_voltage_21:
name: "${bms1_name} cell voltage 21"
cell_voltage_22:
name: "${bms1_name} cell voltage 22"
cell_voltage_23:
name: "${bms1_name} cell voltage 23"
cell_voltage_24:
name: "${bms1_name} cell voltage 24"
cell_resistance_01:
name: "${bms1_name} cell resistance 01"
cell_resistance_02:
name: "${bms1_name} cell resistance 02"
cell_resistance_03:
name: "${bms1_name} cell resistance 03"
cell_resistance_04:
name: "${bms1_name} cell resistance 04"
cell_resistance_05:
name: "${bms1_name} cell resistance 05"
cell_resistance_06:
name: "${bms1_name} cell resistance 06"
cell_resistance_07:
name: "${bms1_name} cell resistance 07"
cell_resistance_08:
name: "${bms1_name} cell resistance 08"
cell_resistance_09:
name: "${bms1_name} cell resistance 09"
cell_resistance_10:
name: "${bms1_name} cell resistance 10"
cell_resistance_11:
name: "${bms1_name} cell resistance 11"
cell_resistance_12:
name: "${bms1_name} cell resistance 12"
cell_resistance_13:
name: "${bms1_name} cell resistance 13"
cell_resistance_14:
name: "${bms1_name} cell resistance 14"
cell_resistance_15:
name: "${bms1_name} cell resistance 15"
cell_resistance_16:
name: "${bms1_name} cell resistance 16"
cell_resistance_17:
name: "${bms1_name} cell resistance 17"
cell_resistance_18:
name: "${bms1_name} cell resistance 18"
cell_resistance_19:
name: "${bms1_name} cell resistance 19"
cell_resistance_20:
name: "${bms1_name} cell resistance 20"
cell_resistance_21:
name: "${bms1_name} cell resistance 21"
cell_resistance_22:
name: "${bms1_name} cell resistance 22"
cell_resistance_23:
name: "${bms1_name} cell resistance 23"
cell_resistance_24:
name: "${bms1_name} cell resistance 24"
battery_voltage:
name: "${bms1_name} battery voltage"
battery_current:
name: "${bms1_name} battery current"
battery_power:
name: "${bms1_name} battery power"
battery_power_charging:
name: "${bms1_name} battery power charging"
battery_power_discharging:
name: "${bms1_name} battery power discharging"
temperature_sensor_1:
name: "${bms1_name} temperature sensor 1"
temperature_sensor_2:
name: "${bms1_name} temperature sensor 2"
temperature_sensor_3:
name: "${bms1_name} temperature sensor 3"
temperature_sensor_4:
name: "${bms1_name} temperature sensor 4"
temperature_sensor_5: