-
Notifications
You must be signed in to change notification settings - Fork 0
/
modbus_sungrow.yaml
3176 lines (2965 loc) · 107 KB
/
modbus_sungrow.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
# Home Assistant Sungrow inverter integration
# https://github.com/mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant
# by Martin Kaiser
# last update: 2024-10-15
#
# Note: This YAML file will only work with Home Assistant >= 2023.10
modbus:
- name: SungrowSHx
type: tcp
host: !secret sungrow_modbus_host_ip
port: !secret sungrow_modbus_port
delay: 5
timeout: 10
sensors:
- name: Sungrow inverter serial
unique_id: sg_inverter_serial
device_address: !secret sungrow_modbus_slave
address: 4989 # reg 4990
input_type: input
data_type: string
count: 10
scan_interval: 600
# for Sungrow batteries only
# - name: Sungrow battery serial
# unique_id: sg_battery_serial
# device_address: !secret sbr_modbus_slave # Usually 200, only modbus-port, not via Winet-S
# address: 10710 # reg 10711
# input_type: input
# data_type: string
# count: 10
# scan_interval: 86400
- name: Sungrow device type code
unique_id: sg_dev_code
device_address: !secret sungrow_modbus_slave
address: 4999 # reg 5000
input_type: input
data_type: uint16
scan_interval: 600
- name: Daily PV generation & battery discharge
unique_id: sg_daily_pv_gen_battery_discharge
device_address: !secret sungrow_modbus_slave
address: 5002 # reg 5003
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Total PV generation & battery discharge
unique_id: sg_total_pv_gen_battery_discharge
device_address: !secret sungrow_modbus_slave
address: 5003 # reg 5004
input_type: input
data_type: uint32
swap: word
unit_of_measurement: kWh
precision: 1
device_class: energy
state_class: total
scale: 0.1
scan_interval: 600
- name: Inverter temperature
unique_id: sg_inverter_temperature
device_address: !secret sungrow_modbus_slave
address: 5007 # reg 5008
input_type: input
data_type: int16
precision: 1
unit_of_measurement: °C
device_class: Temperature
state_class: measurement
scale: 0.1
scan_interval: 10
- name: MPPT1 voltage
unique_id: sg_mppt1_voltage
device_address: !secret sungrow_modbus_slave
address: 5010 # reg 5011
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: V
device_class: Voltage
state_class: measurement
scale: 0.1
scan_interval: 10
- name: MPPT1 current
unique_id: sg_mppt1_current
device_address: !secret sungrow_modbus_slave
address: 5011 # reg 5012
input_type: input
data_type: uint16
precision: 2
unit_of_measurement: A
device_class: Current
state_class: measurement
scale: 0.1
scan_interval: 10
- name: MPPT2 voltage
unique_id: sg_mppt2_voltage
device_address: !secret sungrow_modbus_slave
address: 5012 # reg 5013
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: V
device_class: Voltage
state_class: measurement
scale: 0.1
scan_interval: 10
- name: MPPT2 current
unique_id: sg_mppt2_current
device_address: !secret sungrow_modbus_slave
address: 5013 # reg 5014
input_type: input
data_type: uint16
precision: 2
unit_of_measurement: A
device_class: Current
state_class: measurement
scale: 0.1
scan_interval: 10
- name: Total DC power
unique_id: sg_total_dc_power
device_address: !secret sungrow_modbus_slave
address: 5016 # reg 5017
input_type: input
data_type: uint32
swap: word
precision: 0
unit_of_measurement: W
device_class: power
state_class: measurement
scale: 1
scan_interval: 10
- name: Phase A voltage
unique_id: sg_phase_a_voltage
device_address: !secret sungrow_modbus_slave
address: 5018 # reg: 5019
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: V
device_class: Voltage
state_class: measurement
scale: 0.1
scan_interval: 10
- name: Phase B voltage
unique_id: sg_phase_b_voltage
device_address: !secret sungrow_modbus_slave
address: 5019 # reg: 5020
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: V
device_class: Voltage
state_class: measurement
scale: 0.1
scan_interval: 10
- name: Phase C voltage
unique_id: sg_phase_c_voltage
device_address: !secret sungrow_modbus_slave
address: 5020 # reg: 5021
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: V
device_class: Voltage
state_class: measurement
scale: 0.1
scan_interval: 10
- name: Reactive power
unique_id: sg_reactive_power
device_address: !secret sungrow_modbus_slave
address: 5032 # reg 5033
input_type: input
data_type: int32
swap: word
precision: 0
unit_of_measurement: W
device_class: power
state_class: measurement
scale: 1
scan_interval: 10
- name: Power factor
unique_id: sg_power_factor
device_address: !secret sungrow_modbus_slave
address: 5034 # reg 5035
input_type: input
data_type: int16
precision: 3
unit_of_measurement: "%"
device_class: power_factor
state_class: measurement
scale: 0.001
scan_interval: 10
- name: Grid frequency
unique_id: sg_grid_frequency
device_address: !secret sungrow_modbus_slave
address: 5241 # reg 5242
input_type: input
data_type: uint16
precision: 2
unit_of_measurement: "Hz"
device_class: frequency
state_class: measurement
scale: 0.01
scan_interval: 10
#https://www.photovoltaikforum.com/thread/166134-daten-lesen-vom-sungrow-wechselrichtern-modbus/?pageNo=13
#Meter Active Power: 5601-5602 S32 W (Energiezähler Wirkleistung)
#Meter Phase A Active Power: 5603-5604 S32 W (Stromzähler Phase A Wirkleistung)
#Meter Phase B Active Power: 5605-5606 S32 W (Stromzähler Phase B Wirkleistung)
#Meter Phase C Active Power: 5607-5608 S32 W (Stromzähler Phase C Wirkleistung)
- name: Meter active power raw
unique_id: sg_meter_active_power_raw
device_address: !secret sungrow_modbus_slave
address: 5600 # reg 5601
input_type: input
data_type: int32
swap: word
precision: 0
unit_of_measurement: W
device_class: power
state_class: measurement
scale: 1
scan_interval: 10
- name: Meter phase A active power raw
unique_id: sg_meter_phase_a_active_power_raw
device_address: !secret sungrow_modbus_slave
address: 5602 # reg 5603
input_type: input
data_type: int32
swap: word
precision: 0
unit_of_measurement: W
device_class: power
state_class: measurement
scale: 1
scan_interval: 10
- name: Meter phase B active power raw
unique_id: sg_meter_phase_b_active_power_raw
device_address: !secret sungrow_modbus_slave
address: 5604 # reg 5605
input_type: input
data_type: int32
swap: word
precision: 0
unit_of_measurement: W
device_class: power
state_class: measurement
scale: 1
scan_interval: 10
- name: Meter phase C active power raw
unique_id: sg_meter_phase_c_active_power_raw
device_address: !secret sungrow_modbus_slave
address: 5606 # reg 5607
input_type: input
data_type: int32
swap: word
precision: 0
unit_of_measurement: W
device_class: power
state_class: measurement
scale: 1
scan_interval: 10
- name: BDC rated power
unique_id: sg_bdc_rated_power
device_address: !secret sungrow_modbus_slave
address: 5627 # reg 5628
input_type: input
data_type: uint16
unit_of_measurement: "W"
device_class: power
state_class: measurement
scale: 100
scan_interval: 600
- name: BMS max. charging current
unique_id: sg_bms_max_charging_current
device_address: !secret sungrow_modbus_slave
address: 5634 # reg 5635
input_type: input
data_type: uint16
precision: 0
unit_of_measurement: A
device_class: Current
state_class: measurement
scale: 1
scan_interval: 60
- name: BMS max. discharging current
unique_id: sg_bms_max_discharging_current
device_address: !secret sungrow_modbus_slave
address: 5635 # reg 5636
input_type: input
data_type: uint16
precision: 0
unit_of_measurement: A
device_class: Current
state_class: measurement
scale: 1
scan_interval: 60
- name: Battery capacity # as in TI_20240924_Communication Protocol of Residential Hybrid Inverter-V1.1.5
unique_id: sg_battery_capacity
device_address: !secret sungrow_modbus_slave
address: 5638 # reg 5639
input_type: input
data_type: uint16
precision: 2
unit_of_measurement: kWh
device_class: energy_storage
scale: 0.01
scan_interval: 600
#https://www.photovoltaikforum.com/thread/166134-daten-lesen-vom-sungrow-wechselrichtern-modbus/?pageNo=13
#Phase A Backup Power: 5723 S16 W (Backup Leistung Phase A)
#Phase B Backup Power: 5724 S16 W (Backup Leistung Phase B)
#Phase C Backup Power: 5725 S16 W (Backup Leistung Phase C)
- name: Total backup power
device_address: !secret sungrow_modbus_slave
unique_id: sg_total_backup_power
address: 5725 # reg 5726
input_type: input
data_type: int32
swap: word
precision: 0
unit_of_measurement: W
device_class: power
state_class: measurement
scale: 1
scan_interval: 10
- name: Backup phase A power
unique_id: sg_backup_phase_a_power
device_address: !secret sungrow_modbus_slave
address: 5722 # reg 5723
input_type: input
data_type: int16
precision: 0
unit_of_measurement: W
device_class: power
state_class: measurement
scale: 1
scan_interval: 10
- name: Backup phase B power
unique_id: sg_backup_phase_b_power
device_address: !secret sungrow_modbus_slave
address: 5723 # reg 5724
input_type: input
data_type: int16
precision: 0
unit_of_measurement: W
device_class: power
state_class: measurement
scale: 1
scan_interval: 10
- name: Backup phase C power
unique_id: sg_backup_phase_c_power
device_address: !secret sungrow_modbus_slave
address: 5724 # reg 5725
input_type: input
data_type: int16
precision: 0
unit_of_measurement: W
device_class: power
state_class: measurement
scale: 1
scan_interval: 10
# https://www.photovoltaikforum.com/thread/166134-daten-lesen-vom-sungrow-wechselrichtern-modbus/?postID=3324464#post3324464
- name: Meter phase A voltage
unique_id: sg_meter_phase_a_voltage
device_address: !secret sungrow_modbus_slave
address: 5740 # reg 5741
input_type: input
data_type: int16
precision: 1
unit_of_measurement: V
device_class: voltage
state_class: measurement
scale: 0.1
scan_interval: 10
- name: Meter phase B voltage
unique_id: sg_meter_phase_b_voltage
device_address: !secret sungrow_modbus_slave
address: 5741 # reg 5742
input_type: input
data_type: int16
precision: 1
unit_of_measurement: V
device_class: voltage
state_class: measurement
scale: 0.1
scan_interval: 10
- name: Meter phase C voltage
unique_id: sg_meter_phase_c_voltage
device_address: !secret sungrow_modbus_slave
address: 5742 # reg 5743
input_type: input
data_type: int16
precision: 1
unit_of_measurement: V
device_class: voltage
state_class: measurement
scale: 0.1
scan_interval: 10
- name: Meter phase A current
unique_id: sg_meter_phase_a_current
device_address: !secret sungrow_modbus_slave
address: 5743 # reg 5744
input_type: input
data_type: uint16
precision: 2
unit_of_measurement: A
device_class: current
state_class: measurement
scale: 0.01
scan_interval: 10
- name: Meter phase B current
unique_id: sg_meter_phase_b_current
device_address: !secret sungrow_modbus_slave
address: 5744 # reg 5745
input_type: input
data_type: uint16
precision: 2
unit_of_measurement: A
device_class: current
state_class: measurement
scale: 0.01
scan_interval: 10
- name: Meter phase C current
unique_id: sg_meter_phase_c_current
device_address: !secret sungrow_modbus_slave
address: 5745 # reg 5746
input_type: input
data_type: uint16
precision: 2
unit_of_measurement: A
device_class: current
state_class: measurement
scale: 0.01
scan_interval: 10
# Start monthly PV generation
- name: Monthly PV generation (01 January)
unique_id: sg_monthly_pv_generation_01_january
device_address: !secret sungrow_modbus_slave
address: 6226 # reg 6227
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly PV generation (02 February)
unique_id: sg_monthly_pv_generation_02_february
device_address: !secret sungrow_modbus_slave
address: 6227 # reg 6228
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly PV generation (03 March)
unique_id: sg_monthly_pv_generation_03_march
device_address: !secret sungrow_modbus_slave
address: 6228 # reg 6229
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly PV generation (04 April)
unique_id: sg_monthly_pv_generation_04_april
device_address: !secret sungrow_modbus_slave
address: 6229 # reg 6230
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly PV generation (05 May)
unique_id: sg_monthly_pv_generation_05_may
device_address: !secret sungrow_modbus_slave
address: 6230 # reg 6231
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly PV generation (06 June)
unique_id: sg_monthly_pv_generation_06_june
device_address: !secret sungrow_modbus_slave
address: 6231 # reg 6232
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly PV generation (07 July)
unique_id: sg_monthly_pv_generation_07_july
device_address: !secret sungrow_modbus_slave
address: 6232 # reg 6233
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly PV generation (08 August)
unique_id: sg_monthly_pv_generation_08_august
device_address: !secret sungrow_modbus_slave
address: 6233 # reg 6234
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly PV generation (09 September)
unique_id: sg_monthly_pv_generation_09_september
device_address: !secret sungrow_modbus_slave
address: 6234 # reg 6235
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly PV generation (10 October)
unique_id: sg_monthly_pv_generation_10_october
device_address: !secret sungrow_modbus_slave
address: 6235 # reg 6236
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly PV generation (11 November)
unique_id: sg_monthly_pv_generation_11_november
device_address: !secret sungrow_modbus_slave
address: 6236 # reg 6237
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly PV generation (12 December)
unique_id: sg_monthly_pv_generation_12_december
device_address: !secret sungrow_modbus_slave
address: 6237 # reg 6238
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
# End monthly PV generation
# Start yearly pv generation
- name: Yearly PV generation (2019)
unique_id: sg_yearly_pv_generation_2019
device_address: !secret sungrow_modbus_slave
address: 6257 # reg 6258
input_type: input
data_type: uint32
swap: word
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Yearly PV generation (2020)
unique_id: sg_yearly_pv_generation_2020
device_address: !secret sungrow_modbus_slave
address: 6259 # reg 6260
input_type: input
data_type: uint32
swap: word
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Yearly PV generation (2021)
unique_id: sg_yearly_pv_generation_2021
device_address: !secret sungrow_modbus_slave
address: 6261 # reg 6262
input_type: input
data_type: uint32
swap: word
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Yearly PV generation (2022)
unique_id: sg_yearly_pv_generation_2022
device_address: !secret sungrow_modbus_slave
address: 6263 # reg 6264
input_type: input
data_type: uint32
swap: word
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Yearly PV generation (2023)
unique_id: sg_yearly_pv_generation_2023
device_address: !secret sungrow_modbus_slave
address: 6265 # reg 6266
input_type: input
data_type: uint32
swap: word
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Yearly PV generation (2024)
unique_id: sg_yearly_pv_generation_2024
device_address: !secret sungrow_modbus_slave
address: 6267 # reg 6268
input_type: input
data_type: uint32
swap: word
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Yearly PV generation (2025)
unique_id: sg_yearly_pv_generation_2025
device_address: !secret sungrow_modbus_slave
address: 6269 # reg 6270
input_type: input
data_type: uint32
swap: word
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Yearly PV generation (2026)
unique_id: sg_yearly_pv_generation_2026
device_address: !secret sungrow_modbus_slave
address: 6271 # reg 6272
input_type: input
data_type: uint32
swap: word
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Yearly PV generation (2027)
unique_id: sg_yearly_pv_generation_2027
device_address: !secret sungrow_modbus_slave
address: 6273 # reg 6274
input_type: input
data_type: uint32
swap: word
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Yearly PV generation (2028)
unique_id: sg_yearly_pv_generation_2028
device_address: !secret sungrow_modbus_slave
address: 6275 # reg 6276
input_type: input
data_type: uint32
swap: word
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Yearly PV generation (2029)
unique_id: sg_yearly_pv_generation_2029
device_address: !secret sungrow_modbus_slave
address: 6277 # reg 6278
input_type: input
data_type: uint32
swap: word
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
# End yearly pv generation
# Start monthly export
- name: Monthly export (01 January)
unique_id: sg_monthly_export_01_january
device_address: !secret sungrow_modbus_slave
address: 6595 # reg 6596
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly export (02 February)
unique_id: sg_monthly_export_02_february
device_address: !secret sungrow_modbus_slave
address: 6596 # reg 6597
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly export (03 March)
unique_id: sg_monthly_export_03_march
device_address: !secret sungrow_modbus_slave
address: 6597 # reg 6598
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly export (04 April)
unique_id: sg_monthly_export_04_april
device_address: !secret sungrow_modbus_slave
address: 6598 # reg 6599
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly export (05 May)
unique_id: sg_monthly_export_05_may
device_address: !secret sungrow_modbus_slave
address: 6599 # reg 6600
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly export (06 June)
unique_id: sg_monthly_export_06_june
device_address: !secret sungrow_modbus_slave
address: 6600 # reg 6601
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly export (07 July)
unique_id: sg_monthly_export_07_july
device_address: !secret sungrow_modbus_slave
address: 6601 # reg 6602
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly export (08 August)
unique_id: sg_monthly_export_08_august
device_address: !secret sungrow_modbus_slave
address: 6602 # reg 6603
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly export (09 September)
unique_id: sg_monthly_export_09_september
device_address: !secret sungrow_modbus_slave
address: 6603 # reg 6604
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly export (10 October)
unique_id: sg_monthly_export_10_october
device_address: !secret sungrow_modbus_slave
address: 6604 # reg 6605
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly export (11 November)
unique_id: sg_monthly_export_11_november
device_address: !secret sungrow_modbus_slave
address: 6605 # reg 6606
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
- name: Monthly export (12 December)
unique_id: sg_monthly_export_12_december
device_address: !secret sungrow_modbus_slave
address: 6606 # reg 6607
input_type: input
data_type: uint16
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total_increasing
scale: 0.1
scan_interval: 600
# End monthly export
# Start yearly export energy from PV
- name: Yearly Export (2019)
unique_id: sg_yearly_export_2019
device_address: !secret sungrow_modbus_slave
address: 6615 # reg 6616
input_type: input
data_type: uint32
swap: word
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total
scale: 0.1
scan_interval: 600
- name: Yearly Export (2020)
unique_id: sg_yearly_export_2020
device_address: !secret sungrow_modbus_slave
address: 6617 # reg 6618
input_type: input
data_type: uint32
swap: word
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total
scale: 0.1
scan_interval: 600
- name: Yearly Export (2021)
unique_id: sg_yearly_export_2021
device_address: !secret sungrow_modbus_slave
address: 6619 # reg 6620
input_type: input
data_type: uint32
swap: word
precision: 1
unit_of_measurement: kWh
device_class: energy
state_class: total
scale: 0.1
scan_interval: 600
- name: Yearly Export (2022)
unique_id: sg_yearly_export_2022
device_address: !secret sungrow_modbus_slave
address: 6621 # reg 6622
input_type: input
data_type: uint32
swap: word
precision: 1
unit_of_measurement: kWh
device_class: energy