-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrv-batt-sg5k.yaml
1638 lines (1511 loc) · 40.6 KB
/
rv-batt-sg5k.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:
updates: 5s
name: "rvbattsg5k"
bms0: "${name} bms0"
bms1: "${name} bms1"
device_description: "Integrated SRNE and JBD BMS Monitor/Control"
external_components_source: github://syssi/esphome-jbd-bms@main
bms0_mac_address: A4:C1:37:11:2C:14
bms1_mac_address: 70:3e:97:07:c0:3f
esphome:
name: ${name}
project:
name: "syssi.esphome-jbd-bms"
version: 2.0.0
on_boot:
priority: -10
then:
- lambda: |-
auto time = id(sntp_time).now();
ESP_LOGD("Time Update", "Current time: %04d-%02d-%02d %02d:%02d:%02d",
time.year, time.month, time.day_of_month, time.hour, time.minute, time.second);
uint16_t year_month = ((time.year % 100) << 8) | time.month;
uint16_t day_hour = (time.day_of_month << 8) | time.hour;
uint16_t minute_second = (time.minute << 8) | time.second;
ESP_LOGD("Time Update", "Year/Month: 0x%04X, Day/Hour: 0x%04X, Minute/Second: 0x%04X",
year_month, day_hour, minute_second);
id(srne)->send(0x06, 0x020C, year_month);
id(srne)->send(0x06, 0x020D, day_hour);
id(srne)->send(0x06, 0x020E, minute_second);
esp32:
board: esp32dev
framework:
type: esp-idf
sdkconfig_options:
CONFIG_FREERTOS_UNICORE: y
partitions: "/config/esphome/no_fs.csv"
external_components:
- source: ${external_components_source}
refresh: 0s
# Enable logging
logger:
level: INFO
# Enable Home Assistant API
api:
encryption:
key: "88888888"
ota:
- platform: esphome
password: "888888"
wifi:
networks:
- ssid: !secret wifi_ssid2
password: !secret wifi_password2
- ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${name} Fallback Hotspot"
password: "KosRJpr7nlJf"
captive_portal:
time:
- platform: sntp
id: sntp_time
timezone: "CST6CDT,M3.2.0,M11.1.0" #https://sites.google.com/a/usapiens.com/opnode/time-zones
servers:
- "0.pool.ntp.org"
- "1.pool.ntp.org"
- "2.pool.ntp.org"
# on_time:
# - seconds: 59
# minutes: 59
# hours: 23
esp32_ble_server:
manufacturer: "ARV LLC"
model: "ESP2SRNE-JBD"
esp32_ble_tracker:
scan_parameters:
active: false
ble_client:
- mac_address: ${bms0_mac_address}
id: client0
- mac_address: ${bms1_mac_address}
id: client1
jbd_bms_ble:
- id: bms0
ble_client_id: client0
update_interval: 5s
# - id: bms1
# ble_client_id: client1
# update_interval: 5s
web_server:
port: 80
version: 3 # Version 3 allows for better organization of entities
local: true # Serve assets locally to not require internet access
sorting_groups:
- id: cb
name: "Control Board"
sorting_weight: -10
- id: iset
name: "Inverter Settings"
sorting_weight: -9
- id: istats
name: "Inverter Stats"
sorting_weight: -7
- id: bsum
name: "BMS Summary"
sorting_weight: -8
- id: bcell
name: "BMS Cell Stats"
sorting_weight: -6
uart:
- id: mod_bus
tx_pin: 19
rx_pin: 18
baud_rate: 9600
data_bits: 8
stop_bits: 1
rx_buffer_size: 1024
modbus:
uart_id: mod_bus
id: tdt1_modbus
send_wait_time: 200ms
flow_control_pin: 4
# disable_crc: true
modbus_controller:
- id: srne
address: '1'
modbus_id: tdt1_modbus
command_throttle: 200ms
setup_priority: -10
update_interval: 5s #data refresh rate
offline_skip_updates: 15
binary_sensor:
- platform: status
name: ${name}_status
- platform: jbd_bms_ble
jbd_bms_ble_id: bms0
balancing:
name: "${bms0} balancing"
web_server:
sorting_group_id: bsum
charging:
name: "${bms0} charging"
web_server:
sorting_group_id: bsum
discharging:
name: "${bms0} discharging"
web_server:
sorting_group_id: bsum
online_status:
name: "${bms0} online status"
web_server:
sorting_group_id: bsum
# - platform: jbd_bms_ble
# jbd_bms_ble_id: bms1
# balancing:
# name: "${bms1} balancing"
# web_server:
# sorting_group_id: bsum
# charging:
# name: "${bms1} charging"
# web_server:
# sorting_group_id: bsum
# discharging:
# name: "${bms1} discharging"
# web_server:
# sorting_group_id: bsum
# online_status:
# name: "${bms1} online status"
# web_server:
# sorting_group_id: bsum
##### Update Inverter time once a year ######
interval:
- interval: 365d # Update every year
then:
- lambda: |-
auto time = id(sntp_time).now();
ESP_LOGD("Time Update", "Current time: %04d-%02d-%02d %02d:%02d:%02d",
time.year, time.month, time.day_of_month, time.hour, time.minute, time.second);
uint16_t year_month = ((time.year % 100) << 8) | time.month;
uint16_t day_hour = (time.day_of_month << 8) | time.hour;
uint16_t minute_second = (time.minute << 8) | time.second;
ESP_LOGD("Time Update", "Year/Month: 0x%04X, Day/Hour: 0x%04X, Minute/Second: 0x%04X",
year_month, day_hour, minute_second);
id(srne)->send(0x06, 0x020C, year_month);
id(srne)->send(0x06, 0x020D, day_hour);
id(srne)->send(0x06, 0x020E, minute_second);
sensor:
# JBD BMS0
- platform: jbd_bms_ble
jbd_bms_ble_id: bms0
battery_strings:
name: "${bms0} battery strings"
current:
name: "${bms0} current"
web_server:
sorting_group_id: bsum
power:
name: "${bms0} power"
web_server:
sorting_group_id: bsum
charging_power:
name: "${bms0} charging power"
discharging_power:
name: "${bms0} discharging power"
state_of_charge:
name: "${bms0} state of charge"
web_server:
sorting_group_id: bsum
nominal_capacity:
name: "${bms0} nominal capacity"
web_server:
sorting_group_id: bsum
charging_cycles:
name: "${bms0} charging cycles"
web_server:
sorting_group_id: bsum
capacity_remaining:
name: "${bms0} capacity remaining"
web_server:
sorting_group_id: bsum
battery_cycle_capacity:
name: "${bms0} battery cycle capacity"
web_server:
sorting_group_id: bsum
total_voltage:
name: "${bms0} total voltage"
web_server:
sorting_group_id: bsum
average_cell_voltage:
name: "${bms0} average cell voltage"
web_server:
sorting_group_id: bsum
delta_cell_voltage:
name: "${bms0} delta cell voltage"
min_cell_voltage:
name: "${bms0} min cell voltage"
web_server:
sorting_group_id: bsum
max_cell_voltage:
name: "${bms0} max cell voltage"
web_server:
sorting_group_id: bsum
min_voltage_cell:
name: "${bms0} min voltage cell"
max_voltage_cell:
name: "${bms0} max voltage cell"
temperature_1:
name: "${bms0} temperature 1"
web_server:
sorting_group_id: bsum
temperature_2:
name: "${bms0} temperature 2"
web_server:
sorting_group_id: bsum
temperature_3:
name: "${bms0} temperature 3"
web_server:
sorting_group_id: bsum
# temperature_4:
# name: "${bms0} temperature 4"
# temperature_5:
# name: "${bms0} temperature 5"
# temperature_6:
# name: "${bms0} temperature 6"
cell_voltage_1:
name: "${bms0} cell voltage 1"
web_server:
sorting_group_id: bcell
cell_voltage_2:
name: "${bms0} cell voltage 2"
web_server:
sorting_group_id: bcell
cell_voltage_3:
name: "${bms0} cell voltage 3"
web_server:
sorting_group_id: bcell
cell_voltage_4:
name: "${bms0} cell voltage 4"
web_server:
sorting_group_id: bcell
cell_voltage_5:
name: "${bms0} cell voltage 5"
web_server:
sorting_group_id: bcell
cell_voltage_6:
name: "${bms0} cell voltage 6"
web_server:
sorting_group_id: bcell
cell_voltage_7:
name: "${bms0} cell voltage 7"
web_server:
sorting_group_id: bcell
cell_voltage_8:
name: "${bms0} cell voltage 8"
web_server:
sorting_group_id: bcell
cell_voltage_9:
name: "${bms0} cell voltage 9"
web_server:
sorting_group_id: bcell
cell_voltage_10:
name: "${bms0} cell voltage 10"
web_server:
sorting_group_id: bcell
cell_voltage_11:
name: "${bms0} cell voltage 11"
web_server:
sorting_group_id: bcell
cell_voltage_12:
name: "${bms0} cell voltage 12"
web_server:
sorting_group_id: bcell
cell_voltage_13:
name: "${bms0} cell voltage 13"
web_server:
sorting_group_id: bcell
cell_voltage_14:
name: "${bms0} cell voltage 14"
web_server:
sorting_group_id: bcell
cell_voltage_15:
name: "${bms0} cell voltage 15"
web_server:
sorting_group_id: bcell
cell_voltage_16:
name: "${bms0} cell voltage 16"
web_server:
sorting_group_id: bcell
operation_status_bitmask:
name: "${bms0} operation status bitmask"
errors_bitmask:
name: "${bms0} errors bitmask"
balancer_status_bitmask:
name: "${bms0} balancer status bitmask"
software_version:
name: "${bms0} software version"
# #JBD BMS1
# - platform: jbd_bms_ble
# jbd_bms_ble_id: bms1
# battery_strings:
# name: "${bms1} battery strings"
# current:
# name: "${bms1} current"
# power:
# name: "${bms1} power"
# charging_power:
# name: "${bms1} charging power"
# discharging_power:
# name: "${bms1} discharging power"
# state_of_charge:
# name: "${bms1} state of charge"
# nominal_capacity:
# name: "${bms1} nominal capacity"
# charging_cycles:
# name: "${bms1} charging cycles"
# capacity_remaining:
# name: "${bms1} capacity remaining"
# battery_cycle_capacity:
# name: "${bms1} battery cycle capacity"
# total_voltage:
# name: "${bms1} total voltage"
# average_cell_voltage:
# name: "${bms1} average cell voltage"
# delta_cell_voltage:
# name: "${bms1} delta cell voltage"
# min_cell_voltage:
# name: "${bms1} min cell voltage"
# max_cell_voltage:
# name: "${bms1} max cell voltage"
# min_voltage_cell:
# name: "${bms1} min voltage cell"
# max_voltage_cell:
# name: "${bms1} max voltage cell"
# temperature_1:
# name: "${bms1} temperature 1"
# temperature_2:
# name: "${bms1} temperature 2"
# temperature_3:
# name: "${bms1} temperature 3"
# temperature_4:
# name: "${bms1} temperature 4"
# temperature_5:
# name: "${bms1} temperature 5"
# temperature_6:
# name: "${bms1} temperature 6"
# cell_voltage_1:
# name: "${bms1} cell voltage 1"
# cell_voltage_2:
# name: "${bms1} cell voltage 2"
# cell_voltage_3:
# name: "${bms1} cell voltage 3"
# cell_voltage_4:
# name: "${bms1} cell voltage 4"
# cell_voltage_5:
# name: "${bms1} cell voltage 5"
# cell_voltage_6:
# name: "${bms1} cell voltage 6"
# cell_voltage_7:
# name: "${bms1} cell voltage 7"
# cell_voltage_8:
# name: "${bms1} cell voltage 8"
# cell_voltage_9:
# name: "${bms1} cell voltage 9"
# cell_voltage_10:
# name: "${bms1} cell voltage 10"
# cell_voltage_11:
# name: "${bms1} cell voltage 11"
# cell_voltage_12:
# name: "${bms1} cell voltage 12"
# cell_voltage_13:
# name: "${bms1} cell voltage 13"
# cell_voltage_14:
# name: "${bms1} cell voltage 14"
# cell_voltage_15:
# name: "${bms1} cell voltage 15"
# cell_voltage_16:
# name: "${bms1} cell voltage 16"
# operation_status_bitmask:
# name: "${bms1} operation status bitmask"
# errors_bitmask:
# name: "${bms1} errors bitmask"
# balancer_status_bitmask:
# name: "${bms1} balancer status bitmask"
# software_version:
# name: "${bms1} software version"
# - platform: modbus_controller
# modbus_controller_id: srne
# name: "Example Sensor"
# address: 0x100
# register_type: holding
# value_type: U_WORD
# on_value_range:
# - above: -999999 # Trigger for any read attempt
# then:
# - lambda: |-
# if (x == -1) { // Assuming -1 indicates an error
# id(modbus_error_count) += 1;
# } else {
# id(modbus_error_count) = 0; // Reset on success
# }
# if (id(modbus_error_count) > 3) {
# id(modbus_update_interval) = "60s"; // Slow down updates
# } else {
# id(modbus_update_interval) = "5s"; // Normal update rate
# }
- platform: uptime
name: "${name} Uptime"
id: ${name}_uptime_sec
filters:
- lambda: |-
if ((uint64_t) x > 31536000U) {
return (uint64_t) x % 31536000U; // Limit uptime to 1 year
}
return (uint64_t) x;
- platform: modbus_controller
modbus_controller_id: srne
name: "${name} Time Year Month"
address: 0x020C
register_type: holding
value_type: U_WORD
#update_interval: 60s
id: ${name}_time_year_month
- platform: modbus_controller
modbus_controller_id: srne
name: "${name} Time Day Hour"
address: 0x020D
value_type: U_WORD
register_type: holding
#update_interval: 60s
id: ${name}_time_day_hour
- platform: modbus_controller
modbus_controller_id: srne
name: "${name} Time Minute Second"
address: 0x020E
value_type: U_WORD
register_type: holding
#update_interval: 60s
id: ${name}_time_minute_second
# - platform: modbus_controller
# modbus_controller_id: srne
# name: "Software Version"
# id: ${name}_swver
# address: 0x014
# register_type: holding
# register_count: 2
# value_type: U_WORD
# accuracy_decimals: 3
# #skip_updates: 1000
# - platform: modbus_controller
# modbus_controller_id: srne
# name: "CB HW Version"
# id: ${name}_CBhwver
# address: 0x016
# register_type: holding
# register_count: 2
# value_type: U_WORD
# accuracy_decimals: 3
# skip_updates: 1000
# - platform: modbus_controller
# modbus_controller_id: srne
# name: "PB HW Version"
# id: ${name}_PBhwver
# address: 0x017
# register_type: holding
# register_count: 2
# value_type: U_WORD
# accuracy_decimals: 3
# skip_updates: 1000
# - platform: modbus_controller
# modbus_controller_id: srne
# id: ${name}_product_serial_number
# name: "Serial Number"
# register_type: holding
# address: 0x018
# value_type: U_DWORD
# #response_size: 4
# register_count: 2
# #response_size: 4
# #raw_encode: NONE
- platform: modbus_controller
modbus_controller_id: srne
name: "Total Running Days"
id: ${name}_total_running_days
address: 0x0F031
register_type: holding
value_type: U_WORD
accuracy_decimals: 1
skip_updates: 1000
# - platform: modbus_controller
# modbus_controller_id: srne
# name: "BMS Protocol"
# id: ${name}_bmsproto
# address: 0x0E21B
# register_type: holding
# value_type: U_WORD
# skip_updates: 1000
- platform: modbus_controller
modbus_controller_id: srne
name: "Battery Voltage"
id: ${name}_battery_voltage
address: 0x101
unit_of_measurement: "V"
register_type: holding
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
web_server:
sorting_group_id: istats
- platform: modbus_controller
modbus_controller_id: srne
name: "Battery Current"
id: ${name}_battery_current
address: 0x102
unit_of_measurement: "A"
register_type: holding
value_type: S_WORD
accuracy_decimals: 1
filters:
- multiply: -0.1
web_server:
sorting_group_id: istats
- platform: template
name: "Battery Power"
id: ${name}_battery_power
unit_of_measurement: "W"
lambda: |-
return (id(${name}_battery_voltage).state * id(${name}_battery_current).state);
accuracy_decimals: 1
device_class: power
update_interval: 1s
web_server:
sorting_group_id: istats
- platform: modbus_controller
modbus_controller_id: srne
name: "MPPT 1 Voltage"
id: ${name}_mppt1_voltage
address: 0x107
unit_of_measurement: "V"
register_type: holding
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
web_server:
sorting_group_id: istats
- platform: modbus_controller
modbus_controller_id: srne
name: "MPPT 1 Current"
id: ${name}_mppt1_current
address: 0x108
unit_of_measurement: "A"
register_type: holding
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
web_server:
sorting_group_id: istats
- platform: modbus_controller
modbus_controller_id: srne
name: "MPPT 1 Power"
id: ${name}_mppt1_power
address: 0x109
unit_of_measurement: "W"
register_type: holding
value_type: U_WORD
device_class: Power
accuracy_decimals: 1
web_server:
sorting_group_id: istats
- platform: modbus_controller
modbus_controller_id: srne
name: "Charge Power"
id: ${name}_charge_power
address: 0x10E
unit_of_measurement: "W"
register_type: holding
value_type: U_WORD
accuracy_decimals: 1
web_server:
sorting_group_id: istats
# - platform: modbus_controller
# modbus_controller_id: srne
# name: "MPPT 2 Voltage"
# id: ${name}_mppt2_voltage
# address: 0x10F
# unit_of_measurement: "V"
# register_type: holding
# value_type: U_WORD
# accuracy_decimals: 1
# filters:
# - multiply: 0.1
# web_server:
# sorting_group_id: istats
# - platform: modbus_controller
# modbus_controller_id: srne
# name: "MPPT 2 Current"
# id: ${name}_mppt2_current
# address: 0x110
# unit_of_measurement: "A"
# register_type: holding
# value_type: U_WORD
# accuracy_decimals: 1
# filters:
# - multiply: 0.1
# - platform: modbus_controller
# modbus_controller_id: srne
# name: "MPPT 2 Power"
# id: ${name}_mppt2_power
# address: 0x111
# unit_of_measurement: "W"
# register_type: holding
# value_type: U_WORD
# device_class: Power
# accuracy_decimals: 1
- platform: template
name: "Solar Power"
id: ${name}_solar_power
unit_of_measurement: "W"
lambda: |-
return (id(${name}_mppt1_power).state);
accuracy_decimals: 0
device_class: Power
update_interval: 1s
#Inverter Data
- platform: modbus_controller
modbus_controller_id: srne
id: ${name}_battery_rated_voltage
name: "Rated Voltage"
address: 0x204
unit_of_measurement: "V"
register_type: holding
value_type: U_WORD
accuracy_decimals: 1
skip_updates: 1000
filters:
- multiply: 0.01
web_server:
sorting_group_id: istats
# - platform: modbus_controller
# modbus_controller_id: srne
# id: ${name}_time_year
# name: "Time Year"
# address: 0x020C
# register_type: holding
# bitmask: 0xFF00
# value_type: U_WORD
- platform: modbus_controller
modbus_controller_id: srne
id: ${name}_grid_voltage
name: "Grid Voltage"
address: 0x213
unit_of_measurement: "V"
register_type: holding
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
web_server:
sorting_group_id: istats
# - platform: modbus_controller
# modbus_controller_id: srne
# id: ${name}_grid_voltage_b
# name: "Grid Voltage B"
# address: 0x022A
# unit_of_measurement: "V"
# register_type: holding
# value_type: U_WORD
# accuracy_decimals: 1
# filters:
# - multiply: 0.1
# web_server:
# sorting_group_id: istats
- platform: modbus_controller
modbus_controller_id: srne
id: ${name}_grid_current_a
name: "Grid Current"
address: 0x214
unit_of_measurement: "A"
register_type: holding
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.1
web_server:
sorting_group_id: istats
# - platform: modbus_controller
# modbus_controller_id: srne
# id: ${name}_grid_current_b
# name: "Grid Current B"
# address: 0x0238
# unit_of_measurement: "A"
# register_type: holding
# value_type: U_WORD
# accuracy_decimals: 1
# filters:
# - multiply: 0.1
- platform: modbus_controller
modbus_controller_id: srne
id: ${name}_grid_frequency
name: "Grid Frequency"
address: 0x215
unit_of_measurement: "Hz"
register_type: holding
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.01
web_server:
sorting_group_id: istats
- platform: modbus_controller
modbus_controller_id: srne
id: ${name}_inverter_frequency
name: "Inverter Frequency"
address: 0x218
unit_of_measurement: "Hz"
register_type: holding
value_type: U_WORD
accuracy_decimals: 1
filters:
- multiply: 0.01
web_server:
sorting_group_id: istats
- platform: modbus_controller
modbus_controller_id: srne
id: ${name}_inverter_load_a
name: "Inverter Power"
address: 0x021B
unit_of_measurement: "W"
register_type: holding
value_type: U_WORD
accuracy_decimals: 0
filters:
- multiply: 1
web_server:
sorting_group_id: istats
- platform: template
name: "Grid Power"
id: ${name}_grid_power
unit_of_measurement: "W"
lambda: |-
return (id(${name}_grid_voltage).state * (id(${name}_grid_current_a).state));
accuracy_decimals: 0
update_interval: 1s
# ################# Battery voltage sensors ##########
#
# ######## 1 ########
#
- platform: modbus_controller
modbus_controller_id: srne
id: ${name}_over_voltage_threshold
name: "Over voltage threshold"
address: 0xE005
register_type: holding
value_type: U_WORD
accuracy_decimals: 1
unit_of_measurement: "V"
skip_updates: 100
#filters:
# - multiply: 0.1
lambda: |-
return x*0.4;
web_server:
sorting_group_id: iset
# ######## 2 ########
#
- platform: modbus_controller
modbus_controller_id: srne
id: ${name}_charging_voltage_limit
name: "Charging voltage limit"
address: 0xE006
register_type: holding
value_type: U_WORD
accuracy_decimals: 1
unit_of_measurement: "V"
skip_updates: 100
#filters:
# - multiply: 0.1
lambda: |-
return x*0.4;
web_server:
sorting_group_id: iset
# ######## 3 ########
#
# - platform: modbus_controller
# modbus_controller_id: srne
# id: ${name}_equalizing_charge_voltage
# name: ${name}_equalizing_charge_voltage
# address: 0xE007
# register_type: holding
# value_type: U_WORD
# accuracy_decimals: 1
# unit_of_measurement: "V"
# skip_updates: 1
# # filters:
# # - multiply: 0.1
# lambda: |-
# return x*0.4;
#
# ######## 4 ########
#
- platform: modbus_controller
modbus_controller_id: srne
id: ${name}_boost_voltage
name: "Boost voltage"
address: 0xE008
register_type: holding
value_type: U_WORD
accuracy_decimals: 1
unit_of_measurement: "V"
skip_updates: 100
#filters:
# - multiply: 0.1
lambda: |-
return x*0.4;
web_server:
sorting_group_id: iset
# ######## 5 ########
#
# - platform: modbus_controller
# modbus_controller_id: srne
# id: ${name}_float_voltage
# name: ${name}_float_voltage
# address: 0xE009
# register_type: holding
# value_type: U_WORD
# accuracy_decimals: 1
# unit_of_measurement: "V"
# skip_updates: 1
# # filters:
# # - multiply: 0.1
# lambda: |-
# return x*0.4;
#
# ######## 6 ########
#
- platform: modbus_controller
modbus_controller_id: srne
id: ${name}_boost_charging_recovery_voltage
name: "Boost charging recovery voltage"
address: 0xE00A
register_type: holding
value_type: U_WORD
accuracy_decimals: 1
unit_of_measurement: "V"
skip_updates: 100
#filters:
# - multiply: 0.1
lambda: |-
return x*0.4;
web_server:
sorting_group_id: iset
# ######## 7 ########
- platform: modbus_controller
modbus_controller_id: srne
id: ${name}_over_discharge_recovery_voltage
name: "Over discharge recovery voltage"
address: 0xE00B
register_type: holding
value_type: U_WORD
accuracy_decimals: 1
unit_of_measurement: "V"
skip_updates: 100
#filters:
# - multiply: 0.1
lambda: |-
return x*0.4;
web_server:
sorting_group_id: iset
# ######## 8 ########
- platform: modbus_controller
modbus_controller_id: srne
id: ${name}_under_voltage_warning
name: "Under voltage warning"
address: 0xE00C
register_type: holding
value_type: U_WORD
accuracy_decimals: 1
unit_of_measurement: "V"
skip_updates: 100
#filters:
# - multiply: 0.1