-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmy-inverter 6_2kW.yaml
1325 lines (1195 loc) · 31.2 KB
/
my-inverter 6_2kW.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:
device_name: "my-inverter"
friendly_name: My Inverter
node_name: "My Inverter"
node_id: powmr_inverter
inverter_tx_pin: GPIO17
#GPIO5
inverter_rx_pin: GPIO16
#GPIO4
inverter_voltage_offset: "0"
pzem_tx_pin: GPIO1
pzem_rx_pin: GPIO3
pzem_voltage_offset: "1"
pzem_current_offset: "0.04"
update_interval: 10s # Minimum 10s recommended to avoid duplicate command errors
select_skip_updates: "6"
read_skip_updates: "6"
pzem_update_interval: 10s # Needs to be 1/5 of update interval because of smoothing filter on pzem readings
esphome:
name: "${device_name}"
friendly_name: "${node_name}"
comment: "Monitor and control a solar inverter"
includes:
- "helpers"
project:
name: "esphome.powmr-hybrid-inverter"
version: 1.3.3
esp32:
board: esp32dev
framework:
type: arduino
# Enable Home Assistant API
api:
encryption:
key: !secret api_encryption_key
ota:
- platform: esphome
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "My-Inverter Fallback Hotspot"
password: !secret ap_password
captive_portal:
packages:
# You can replace next 2 lines with your common configs for all devices
# common_system: !include includes/common_system.yaml
common_sensors: !include includes/common_sensors.yaml
#For debug:
#debug:
# update_interval: 10s
#sensor:
# - platform: debug
# free:
# name: "Heap Free"
logger:
id: uart_logger
baud_rate: 0
level: DEBUG #VERBOSE
# logs:
# component: ERROR # Fix for issue #4717 "Component xxxxxx took a long time for an operation"
time:
- platform: homeassistant
id: hass_time
web_server:
port: 80
local: true
# ota: false
uart:
- id: uart_pzem
baud_rate: 9600
tx_pin: ${pzem_tx_pin}
rx_pin: ${pzem_rx_pin}
debug:
direction: BOTH
dummy_receiver: false
after:
delimiter: "\n"
sequence:
- lambda: UARTDebug::log_string(direction, bytes);
- id: uart_inverter
baud_rate: 2400
tx_pin: ${inverter_tx_pin}
rx_pin: ${inverter_rx_pin}
debug:
direction: BOTH
dummy_receiver: false
after:
delimiter: "\n"
sequence:
- lambda: UARTDebug::log_string(direction, bytes);
modbus:
- id: modbus_inverter
uart_id: uart_inverter
send_wait_time: 500ms
- id: modbus_pzem
uart_id: uart_pzem
send_wait_time: 250ms
modbus_controller:
- id: smg_inverter
address: 0x05
modbus_id: modbus_inverter
setup_priority: -10
offline_skip_updates: 100
#command_throttle: 1s
update_interval: ${update_interval}
- id: pzem
# The current device address.
address: 0x02
# The special address 0xF8 is a broadcast address accepted by any pzem device,
# so if you use this address, make sure there is only one pzem device connected
# to the uart bus.
# address: 0xF8
modbus_id: modbus_pzem
command_throttle: 0ms
setup_priority: -10
offline_skip_updates: 100
update_interval: ${pzem_update_interval}
sensor:
- platform: pzemac
modbus_id: modbus_pzem
voltage:
name: "Grid Voltage PZEM"
id: pzem_grid_voltage
#internal: true
#filters:
# - &mafilter quantile:
# window_size: 5
# send_every: 1
# send_first_at: 1
# quantile: .9
# - offset: ${pzem_voltage_offset}
current:
name: "Grid Current PZEM"
id: pzem_grid_current
#filters:
# - *mafilter
# - offset: ${pzem_current_offset}
power:
name: "Grid Power PZEM"
id: pzem_grid_power
#filters:
# - *mafilter
power_factor:
name: "Grid Power Factor PZEM"
id: pzem_grid_power_factor
#filters:
# - *mafilter
energy:
name: "Grid Energy PZEM"
id: pzem_grid_energy
#filters:
# - *mafilter
- platform: template
name: "Grid Power VA PZEM"
unit_of_measurement: "W"
device_class: power
state_class: measurement
accuracy_decimals: 0
update_interval: ${pzem_update_interval}
lambda: |-
return id(pzem_grid_current).state * id(pzem_grid_voltage).state;
- platform: template
name: "Grid Power VA*PF PZEM"
unit_of_measurement: "W"
device_class: power
state_class: measurement
accuracy_decimals: 0
update_interval: ${pzem_update_interval}
lambda: |-
return id(pzem_grid_current).state * id(pzem_grid_voltage).state * id(pzem_grid_power_factor).state;
###################################
# Read first group (14 registers) #
###################################
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Grid Voltage"
address: 4502
register_type: holding
register_count: 14
force_new_range: true
value_type: U_WORD
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
accuracy_decimals: 1
lambda: |-
if (!id(grid_active).state) {
return 0.0;
}
return swapBytes(x);
filters:
- multiply: 0.1
- offset: ${inverter_voltage_offset}
# - heartbeat: 10s
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Grid Frequency"
address: 4503
register_type: holding
value_type: U_WORD
unit_of_measurement: "Hz"
device_class: frequency
state_class: measurement
accuracy_decimals: 1
lambda: |-
return swapBytes(x);
filters:
- multiply: 0.1
- platform: modbus_controller
modbus_controller_id: smg_inverter
id: PV_Voltage
name: "PV Voltage"
address: 4504
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
accuracy_decimals: 1
lambda: |-
return swapBytes(x);
filters:
- multiply: 0.1
- platform: modbus_controller
modbus_controller_id: smg_inverter
id: PV_Power
name: "PV Power"
address: 4505
register_type: holding
value_type: U_WORD
unit_of_measurement: "W"
device_class: power
state_class: measurement
accuracy_decimals: 1
lambda: |-
return swapBytes(x);
- platform: template
id: PV_Current
name: "PV Current"
unit_of_measurement: "A"
device_class: current
state_class: measurement
accuracy_decimals: 1
update_interval: ${update_interval}
lambda: |-
if (id(PV_Voltage).state == 0) {
return 0;
}
return id(PV_Power).state / id(PV_Voltage).state;
# filters:
# - heartbeat: 10s
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Battery Voltage"
id: battery_voltage
address: 4506
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
accuracy_decimals: 2
lambda: |-
return swapBytes(x);
filters:
- multiply: 0.1
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Battery SoC"
accuracy_decimals: 0
unit_of_measurement: "%"
device_class: battery
address: 4507
register_type: holding
value_type: U_WORD
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Battery Charge Current"
id: battery_charge_current
address: 4508
register_type: holding
value_type: U_WORD
unit_of_measurement: "A"
device_class: current
state_class: measurement
accuracy_decimals: 1
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Battery Discharge Current"
id: battery_discharge_current
address: 4509
register_type: holding
value_type: U_WORD
unit_of_measurement: "A"
device_class: current
state_class: measurement
accuracy_decimals: 1
lambda: |-
return swapBytes(x);
- platform: template
name: "Battery Current"
id: battery_current
unit_of_measurement: "A"
device_class: current
state_class: measurement
accuracy_decimals: 1
update_interval: ${update_interval}
lambda: |-
return id(battery_charge_current).state - id(battery_discharge_current).state;
# filters:
# - heartbeat: 10s
- platform: template
name: "Battery Power"
unit_of_measurement: "W"
device_class: power
state_class: measurement
accuracy_decimals: 0
update_interval: ${update_interval}
lambda: |-
return id(battery_current).state * id(battery_voltage).state;
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Load Voltage"
id: load_voltage
address: 4510
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
device_class: voltage
state_class: measurement
accuracy_decimals: 1
lambda: |-
return swapBytes(x);
filters:
- multiply: 0.1
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Load Frequency"
address: 4511
register_type: holding
value_type: U_WORD
unit_of_measurement: "Hz"
device_class: frequency
state_class: measurement
accuracy_decimals: 1
lambda: |-
return swapBytes(x);
filters:
- multiply: 0.1
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Load Power VA"
id: load_Power_VA
address: 4512
register_type: holding
value_type: U_WORD
unit_of_measurement: "VA"
device_class: apparent_power
state_class: measurement
accuracy_decimals: 0
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Load Power"
id: load_power
address: 4513
register_type: holding
value_type: U_WORD
unit_of_measurement: "W"
device_class: power
state_class: measurement
accuracy_decimals: 0
lambda: |-
return swapBytes(x);
- platform: template
name: "Load Current"
id: load_current
unit_of_measurement: "A"
device_class: current
state_class: measurement
accuracy_decimals: 3
update_interval: ${update_interval}
lambda: |-
if (id(load_voltage).state == 0) {
return 0;
}
return id(load_Power_VA).state / id(load_voltage).state;
- platform: template
name: "Load Power Factor"
id: load_power_factor
device_class: power_factor
state_class: measurement
accuracy_decimals: 2
update_interval: ${update_interval}
lambda: |-
if (id(load_power).state == 0) {
return 0;
}
return id(load_power).state / id(load_Power_VA).state;
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Load Percent"
address: 4514
register_count: 21
register_type: holding
value_type: U_WORD
unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Load Percent2"
address: 4515
register_type: holding
value_type: U_WORD
unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
# ####################################
# # Read second group (19 registers) #
# ####################################
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4516"
address: 4516
skip_updates: ${read_skip_updates}
register_count: 19
force_new_range: true
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4517"
address: 4517
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4518"
address: 4518
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4519"
address: 4519
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4520"
address: 4520
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4521"
address: 4521
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4522"
address: 4522
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4523"
address: 4523
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4524"
address: 4524
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4525"
address: 4525
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4526"
address: 4526
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4527"
address: 4527
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4528"
address: 4528
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4529"
address: 4529
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4530"
address: 4530
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4531"
address: 4531
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4532"
address: 4532
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4533"
address: 4533
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4534"
address: 4534
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
# 4535 -> binary
# 4536 -> text
# 4537 -> text
# 4538 -> text
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Charger Source Priority"
address: 4536
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Output Source Priority"
address: 4537
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "AC Input Voltage Range"
address: 4538
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
# ####################################
# # Read third group (19 registers) #
# ####################################
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Unknown4539"
address: 4539
skip_updates: ${read_skip_updates}
force_new_range: true
register_count: 14
register_type: holding
value_type: U_WORD
# unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Target Output Frequency"
accuracy_decimals: 0
entity_category: diagnostic
address: 4540
register_type: holding
value_type: U_WORD
unit_of_measurement: "Hz"
lambda: |-
uint16_t value = swapBytes(x);
switch (value) {
case 0: return std::uint16_t(50);
case 1: return std::uint16_t(60);
default: return x;
}
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Max Total Charging Current"
accuracy_decimals: 0
entity_category: diagnostic
address: 4541
register_type: holding
value_type: U_WORD
unit_of_measurement: "A"
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Target Output Voltage"
accuracy_decimals: 0
entity_category: diagnostic
address: 4542
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Max Utility Charging Current"
accuracy_decimals: 0
entity_category: diagnostic
address: 4543
register_type: holding
value_type: U_WORD
unit_of_measurement: "A"
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Back To Utility Source Voltage"
filters:
- multiply: 0.1
accuracy_decimals: 1
entity_category: diagnostic
address: 4544
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Back To Battery Source Voltage"
filters:
- multiply: 0.1
accuracy_decimals: 1
entity_category: diagnostic
address: 4545
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
lambda: |-
return swapBytes(x);
# ####################################
# # Read second group (16 registers) #
# ####################################
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Bulk Charging Voltage"
filters:
- multiply: 0.1
accuracy_decimals: 1
entity_category: diagnostic
address: 4546
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Floating Charging Voltage"
filters:
- multiply: 0.1
accuracy_decimals: 1
entity_category: diagnostic
address: 4547
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Low CutOff Voltage"
filters:
- multiply: 0.1
accuracy_decimals: 1
entity_category: diagnostic
address: 4548
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Battery Equalization Voltage"
filters:
- multiply: 0.1
accuracy_decimals: 1
entity_category: diagnostic
address: 4549
register_type: holding
value_type: U_WORD
unit_of_measurement: "V"
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Battery Equalized Time"
accuracy_decimals: 0
entity_category: diagnostic
address: 4550
register_type: holding
value_type: U_WORD
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Battery Equalized Timeout"
accuracy_decimals: 0
entity_category: diagnostic
address: 4551
register_type: holding
value_type: U_WORD
lambda: |-
return swapBytes(x);
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Equalization Interval"
accuracy_decimals: 0
entity_category: diagnostic
address: 4552
register_type: holding
value_type: U_WORD
lambda: |-
return swapBytes(x);
# 4553 -> binary
# 4554 -> binary
# 4555 -> text
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Charger Status"
accuracy_decimals: 0
entity_category: diagnostic
address: 4555
register_type: holding
value_type: U_WORD
lambda: |-
return swapBytes(x);
binary_sensor:
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Record Fault Code"
entity_category: diagnostic
address: 4535
register_type: holding
bitmask: 0x1
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Battery Equalization"
entity_category: diagnostic
address: 4535
register_type: holding
bitmask: 0x2
# - platform: modbus_controller
# modbus_controller_id: smg_inverter
# name: "Equalization Activated Immediately"
# entity_category: diagnostic
# address: 4535
# register_type: holding
# bitmask: 0x4
- platform: modbus_controller
modbus_controller_id: smg_inverter
name: "Alarm"