-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
esp32-example.yaml
1809 lines (1664 loc) · 50.6 KB
/
esp32-example.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:
name: pace-bms
device_description: "Monitor and control a PACE BMS via RS485 (Modbus)"
tx_pin: GPIO16
rx_pin: GPIO17
flow_control_pin: GPIO18
esphome:
name: ${name}
comment: ${device_description}
min_version: 2024.6.0
project:
name: "syssi.esphome-pace-bms"
version: 2.0.0
esp32:
board: wemos_d1_mini32
framework:
type: esp-idf
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ota:
platform: esphome
logger:
level: DEBUG
# 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
# api:
uart:
- id: uart_0
baud_rate: 9600
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
debug:
direction: BOTH
dummy_receiver: false
modbus:
- id: modbus0
uart_id: uart_0
flow_control_pin: ${flow_control_pin}
send_wait_time: 200ms
modbus_controller:
- id: bms0
# Slave address 0x01
address: 0x01
modbus_id: modbus0
command_throttle: 200ms
update_interval: 10s
binary_sensor:
# 11 Status/Fault flag 2 byte R uint16 Hex See ^3
# Bit 8: Status: Charging operation
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} charging operation"
address: 11
register_type: holding
bitmask: 0x0100
# Bit 9: Status: Discharging operation
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} discharging operation"
address: 11
register_type: holding
bitmask: 0x0200
# Bit 10: Status: Charging enabled/disabled
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} charging"
address: 11
register_type: holding
bitmask: 0x0400
# Bit 11: Status: Discharging enabled/disabled
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} discharging"
address: 11
register_type: holding
bitmask: 0x0800
# 12 Balance status-bits per cell (1-16) 2 byte R uint16 Hex
# Bit 1: Status: Balancing cell 1
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell balancing 1"
address: 12
register_type: holding
bitmask: 0x0001
# Bit 2: Status: Balancing cell 2
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell balancing 2"
address: 12
register_type: holding
bitmask: 0x0002
# Bit 3: Status: Balancing cell 3
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell balancing 3"
address: 12
register_type: holding
bitmask: 0x0004
# Bit 4: Status: Balancing cell 4
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell balancing 4"
address: 12
register_type: holding
bitmask: 0x0008
# Bit 5: Status: Balancing cell 5
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell balancing 5"
address: 12
register_type: holding
bitmask: 0x0010
# Bit 6: Status: Balancing cell 6
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell balancing 6"
address: 12
register_type: holding
bitmask: 0x0020
# Bit 7: Status: Balancing cell 7
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell balancing 7"
address: 12
register_type: holding
bitmask: 0x0040
# Bit 8: Status: Balancing cell 8
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell balancing 8"
address: 12
register_type: holding
bitmask: 0x0080
# Bit 9: Status: Balancing cell 9
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell balancing 9"
address: 12
register_type: holding
bitmask: 0x0100
# Bit 10: Status: Balancing cell 10
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell balancing 10"
address: 12
register_type: holding
bitmask: 0x0200
# Bit 11: Status: Balancing cell 11
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell balancing 11"
address: 12
register_type: holding
bitmask: 0x0400
# Bit 12: Status: Balancing cell 12
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell balancing 12"
address: 12
register_type: holding
bitmask: 0x0800
# Bit 13: Status: Balancing cell 13
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell balancing 13"
address: 12
register_type: holding
bitmask: 0x1000
# Bit 14: Status: Balancing cell 14
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell balancing 14"
address: 12
register_type: holding
bitmask: 0x2000
# Bit 15: Status: Balancing cell 15
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell balancing 15"
address: 12
register_type: holding
bitmask: 0x4000
# Bit 16: Status: Balancing cell 16
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell balancing 16"
address: 12
register_type: holding
bitmask: 0x8000
sensor:
# 0 Current 2 byte R int16 10mA (Positive: chargingm Negative: discharging)
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} current"
address: 0
register_type: holding
value_type: S_WORD
unit_of_measurement: "A"
device_class: current
state_class: measurement
accuracy_decimals: 2
filters:
- multiply: 0.01
# 1 Voltage of pack 2 byte R uint16 10mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} total voltage"
address: 1
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
accuracy_decimals: 2
filters:
- multiply: 0.01
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} power"
address: 0
register_type: holding
value_type: U_WORD
register_count: 2
response_size: 4
unit_of_measurement: "W"
device_class: power
state_class: measurement
accuracy_decimals: 2
lambda: |-
if (data.size() < 4) {
return NAN;
}
float current = (int16_t)(data[0] << 8 | data[1] << 0);
float total_voltage = (uint16_t)(data[2] << 8 | data[3] << 0);
return current * total_voltage * 0.0001f;
# 2 State of charge 2 byte R uint8 % (0-100%)
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} state of charge"
address: 2
register_type: holding
value_type: U_WORD
unit_of_measurement: "%"
device_class: battery
state_class: measurement
accuracy_decimals: 0
# 3 SOH 2 byte R uint8 % (0-100%)
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} state of health"
address: 3
register_type: holding
value_type: U_WORD
unit_of_measurement: "%"
state_class: measurement
accuracy_decimals: 0
# 4 Remain capacity 2 byte R uint16 10mAH
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} remaining capacity"
address: 4
register_type: holding
value_type: U_WORD
unit_of_measurement: "Ah"
state_class: measurement
accuracy_decimals: 2
filters:
- multiply: 0.01
# 5 Full capacity 2 byte R uint16 10mAH
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} full capacity"
address: 5
register_type: holding
value_type: U_WORD
unit_of_measurement: "Ah"
state_class: measurement
accuracy_decimals: 2
filters:
- multiply: 0.01
# 6 Design capacity 2 byte R uint16 10mAH
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} design capacity"
address: 6
register_type: holding
value_type: U_WORD
unit_of_measurement: "Ah"
state_class: measurement
accuracy_decimals: 2
filters:
- multiply: 0.01
# 7 Charging cycles count 2 byte R uint16 Cyc.
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} charging cycles"
address: 7
register_type: holding
value_type: U_WORD
unit_of_measurement: ""
state_class: measurement
accuracy_decimals: 0
# 8 Reserved
# 9 Warning flag 2 byte R uint16 Hex See ^1
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} warnings bitmask"
address: 9
register_type: holding
value_type: U_WORD
unit_of_measurement: ""
state_class: measurement
accuracy_decimals: 0
# 10 Protection flag 2 byte R uint16 Hex See ^2
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} protections bitmask"
address: 10
register_type: holding
value_type: U_WORD
unit_of_measurement: ""
state_class: measurement
accuracy_decimals: 0
# 11 Status/Fault flag 2 byte R uint16 Hex See ^3
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} fault status bitmask"
address: 11
register_type: holding
value_type: U_WORD
unit_of_measurement: ""
state_class: measurement
accuracy_decimals: 0
# 12 Balance status-bits per cell (1-16) 2 byte R uint16 Hex
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} balancer status"
address: 12
register_type: holding
value_type: U_WORD
unit_of_measurement: ""
state_class: measurement
accuracy_decimals: 0
# 13 Reserved
# 14 Reserved
# 15 Cell voltage 1 2 byte R uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell voltage 1"
address: 15
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
state_class: measurement
accuracy_decimals: 3
filters:
- multiply: 0.001
# 16 Cell voltage 2 2 byte R uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell voltage 2"
address: 16
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
state_class: measurement
accuracy_decimals: 3
filters:
- multiply: 0.001
# 17 Cell voltage 3 2 byte R uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell voltage 3"
address: 17
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
state_class: measurement
accuracy_decimals: 3
filters:
- multiply: 0.001
# 18 Cell voltage 4 2 byte R uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell voltage 4"
address: 18
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
state_class: measurement
accuracy_decimals: 3
filters:
- multiply: 0.001
# 19 Cell voltage 5 2 byte R uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell voltage 5"
address: 19
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
state_class: measurement
accuracy_decimals: 3
filters:
- multiply: 0.001
# 20 Cell voltage 6 2 byte R uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell voltage 6"
address: 20
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
state_class: measurement
accuracy_decimals: 3
filters:
- multiply: 0.001
# 21 Cell voltage 7 2 byte R uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell voltage 7"
address: 21
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
state_class: measurement
accuracy_decimals: 3
filters:
- multiply: 0.001
# 22 Cell voltage 8 2 byte R uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell voltage 8"
address: 22
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
state_class: measurement
accuracy_decimals: 3
filters:
- multiply: 0.001
# 23 Cell voltage 9 2 byte R uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell voltage 9"
address: 23
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
state_class: measurement
accuracy_decimals: 3
filters:
- multiply: 0.001
# 24 Cell voltage 10 2 byte R uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell voltage 10"
address: 24
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
state_class: measurement
accuracy_decimals: 3
filters:
- multiply: 0.001
# 25 Cell voltage 11 2 byte R uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell voltage 11"
address: 25
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
state_class: measurement
accuracy_decimals: 3
filters:
- multiply: 0.001
# 26 Cell voltage 12 2 byte R uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell voltage 12"
address: 26
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
state_class: measurement
accuracy_decimals: 3
filters:
- multiply: 0.001
# 27 Cell voltage 13 2 byte R uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell voltage 13"
address: 27
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
state_class: measurement
accuracy_decimals: 3
filters:
- multiply: 0.001
# 28 Cell voltage 14 2 byte R uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell voltage 14"
address: 28
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
state_class: measurement
accuracy_decimals: 3
filters:
- multiply: 0.001
# 29 Cell voltage 15 2 byte R uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell voltage 15"
address: 29
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
state_class: measurement
accuracy_decimals: 3
filters:
- multiply: 0.001
# 30 Cell voltage 16 2 byte R uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell voltage 16"
address: 30
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
state_class: measurement
accuracy_decimals: 3
filters:
- multiply: 0.001
### Calculated sensors
# Delta cell voltage
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} delta cell voltage"
address: 15
register_type: holding
value_type: U_WORD
register_count: 16
response_size: 32
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
accuracy_decimals: 3
lambda: |-
uint8_t cells = 16;
if (data.size() < cells * 2) {
return NAN;
}
float min_cell_voltage = 100.0f;
float max_cell_voltage = -100.0f;
float average_cell_voltage = 0.0f;
uint8_t min_voltage_cell = 0;
uint8_t max_voltage_cell = 0;
for (uint8_t i = 0; i < cells; i++) {
float cell_voltage = (uint16_t)(data[item->offset + (i * 2)] << 8 | data[item->offset + (i * 2) + 1] << 0) * 0.001f;
average_cell_voltage = average_cell_voltage + cell_voltage;
if (cell_voltage < min_cell_voltage) {
min_cell_voltage = cell_voltage;
min_voltage_cell = i + 1;
}
if (cell_voltage > max_cell_voltage) {
max_cell_voltage = cell_voltage;
max_voltage_cell = i + 1;
}
}
average_cell_voltage = average_cell_voltage / cells;
id(bms0_average_cell_voltage).publish_state(average_cell_voltage);
id(bms0_min_cell_voltage).publish_state(min_cell_voltage);
id(bms0_max_cell_voltage).publish_state(max_cell_voltage);
id(bms0_min_voltage_cell).publish_state(min_voltage_cell);
id(bms0_max_voltage_cell).publish_state(max_voltage_cell);
return max_cell_voltage - min_cell_voltage;
- platform: template
id: bms0_average_cell_voltage
name: "${name} average cell voltage"
update_interval: never
unit_of_measurement: V
device_class: voltage
state_class: measurement
accuracy_decimals: 3
- platform: template
id: bms0_min_cell_voltage
name: "${name} min cell voltage"
update_interval: never
unit_of_measurement: V
device_class: voltage
state_class: measurement
accuracy_decimals: 3
- platform: template
id: bms0_max_cell_voltage
name: "${name} max cell voltage"
update_interval: never
unit_of_measurement: V
device_class: voltage
state_class: measurement
accuracy_decimals: 3
- platform: template
id: bms0_min_voltage_cell
name: "${name} min voltage cell"
update_interval: never
unit_of_measurement: ""
state_class: measurement
accuracy_decimals: 0
- platform: template
id: bms0_max_voltage_cell
name: "${name} max voltage cell"
update_interval: never
unit_of_measurement: ""
state_class: measurement
accuracy_decimals: 0
####
# 31 Battery temperature 1 2 byte R int16 0.1 ℃
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} battery temperature 1"
address: 31
register_type: holding
value_type: S_WORD
unit_of_measurement: "˚C"
device_class: temperature
state_class: measurement
accuracy_decimals: 1
filters:
- multiply: 0.1
# 32 Battery temperature 2 2 byte R int16 0.1 ℃
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} battery temperature 2"
address: 32
register_type: holding
value_type: S_WORD
unit_of_measurement: "˚C"
device_class: temperature
state_class: measurement
accuracy_decimals: 1
filters:
- multiply: 0.1
# 33 Battery temperature 3 2 byte R int16 0.1 ℃
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} battery temperature 3"
address: 33
register_type: holding
value_type: S_WORD
unit_of_measurement: "˚C"
device_class: temperature
state_class: measurement
accuracy_decimals: 1
filters:
- multiply: 0.1
# 34 Battery temperature 4 2 byte R int16 0.1 ℃
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} battery temperature 4"
address: 34
register_type: holding
value_type: S_WORD
unit_of_measurement: "˚C"
device_class: temperature
state_class: measurement
accuracy_decimals: 1
filters:
- multiply: 0.1
# 35 MOSFET temperature 2 byte R int16 0.1 ℃ or invalid
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} mosfet temperature"
address: 35
register_type: holding
value_type: S_WORD
unit_of_measurement: "˚C"
device_class: temperature
state_class: measurement
accuracy_decimals: 1
filters:
- multiply: 0.1
# 36 Environment temperature 2 byte R int16 0.1 ℃ or invalid
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} environment temperature"
address: 36
register_type: holding
value_type: S_WORD
unit_of_measurement: "˚C"
device_class: temperature
state_class: measurement
accuracy_decimals: 1
filters:
- multiply: 0.1
# 37-59 Reserved
number:
# 60 Pack OV alarm 2 byte RW uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} pack overvoltage alarm"
use_write_multiple: true
address: 60
register_type: holding
value_type: U_WORD
min_value: 0.0
max_value: 65535.0
step: 1
mode: box
unit_of_measurement: "mV"
# 61 Pack OV protection 2 byte RW uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} pack overvoltage protection"
use_write_multiple: true
address: 61
register_type: holding
value_type: U_WORD
min_value: 0.0
max_value: 65535.0
step: 1
mode: box
unit_of_measurement: "mV"
# 62 Pack OV release protection 2 byte RW uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} pack overvoltage protection release"
use_write_multiple: true
address: 62
register_type: holding
value_type: U_WORD
min_value: 0.0
max_value: 65535.0
step: 1
mode: box
unit_of_measurement: "mV"
# 63 Pack OV protection delay time 2 byte RW uint8 0.1S 1~255
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} pack overvoltage protection delay time"
use_write_multiple: true
address: 63
register_type: holding
value_type: U_WORD
lambda: "return x * 0.1f; "
write_lambda: "return x * 10.0f;"
min_value: 0.1
max_value: 25.5
step: 0.1
mode: box
unit_of_measurement: "s"
# 64 Cell OV alarm 2 byte RW uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell overvoltage alarm"
use_write_multiple: true
address: 64
register_type: holding
value_type: U_WORD
min_value: 0.0
max_value: 65535.0
step: 1
mode: box
unit_of_measurement: "mV"
# 65 Cell OV protection 2 byte RW uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell overvoltage protection"
use_write_multiple: true
address: 65
register_type: holding
value_type: U_WORD
min_value: 0.0
max_value: 65535.0
step: 1
mode: box
unit_of_measurement: "mV"
# 66 Cell OV release protection 2 byte RW uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell overvoltage protection release"
use_write_multiple: true
address: 66
register_type: holding
value_type: U_WORD
min_value: 0.0
max_value: 65535.0
step: 1
mode: box
unit_of_measurement: "mV"
# 67 Cell OV protection delay time 2 byte RW uint8 0.1S 1~255
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell overvoltage protection delay time"
use_write_multiple: true
address: 67
register_type: holding
value_type: U_WORD
lambda: "return x * 0.1f; "
write_lambda: "return x * 10.0f;"
min_value: 0.1
max_value: 25.5
step: 0.1
mode: box
unit_of_measurement: "s"
# 68 Pack UV alarm 2 byte RW uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} pack undervoltage alarm"
use_write_multiple: true
address: 68
register_type: holding
value_type: U_WORD
min_value: 0.0
max_value: 65535.0
step: 1
mode: box
unit_of_measurement: "mV"
# 69 Pack UV protection 2 byte RW uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} pack undervoltage protection"
use_write_multiple: true
address: 69
register_type: holding
value_type: U_WORD
min_value: 0.0
max_value: 65535.0
step: 1
mode: box
unit_of_measurement: "mV"
# 70 Pack UV release protection 2 byte RW uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} pack undervoltage protection release"
use_write_multiple: true
address: 70
register_type: holding
value_type: U_WORD
min_value: 0.0
max_value: 65535.0
step: 1
mode: box
unit_of_measurement: "mV"
# 71 Pack UV protection delay time 2 byte RW uint8 0.1S 1~255
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} pack undervoltage protection delay time"
use_write_multiple: true
address: 71
register_type: holding
value_type: U_WORD
lambda: "return x * 0.1f; "
write_lambda: "return x * 10.0f;"
min_value: 0.1
max_value: 25.5
step: 0.1
mode: box
unit_of_measurement: "s"
# 72 Cell UV alarm 2 byte RW uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell undervoltage alarm"
use_write_multiple: true
address: 72
register_type: holding
value_type: U_WORD
min_value: 0.0
max_value: 65535.0
step: 1
mode: box
unit_of_measurement: "mV"
# 73 Cell UV protection 2 byte RW uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell undervoltage protection"
use_write_multiple: true
address: 73
register_type: holding
value_type: U_WORD
min_value: 0.0
max_value: 65535.0
step: 1
mode: box
unit_of_measurement: "mV"
# 74 Cell UV release protection 2 byte RW uint16 mV
- platform: modbus_controller
modbus_controller_id: bms0
name: "${name} cell undervoltage protection release"
use_write_multiple: true
address: 74
register_type: holding
value_type: U_WORD
min_value: 0.0
max_value: 65535.0
step: 1
mode: box
unit_of_measurement: "mV"