/
registers.yaml
721 lines (595 loc) · 10.9 KB
/
registers.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
- name: R001_protocol_number
type: u32
address: 4950
- name: R002_protocol_version
type: u32
address: 4952
- name: R003_arm_software_version
type: string
address: 4954
length: 15
- name: R004_dsp_software_version
type: string
address: 4969
length: 15
# R005: reserved
- name: R006_serial_number
type: string
address: 4990
length: 10
- name: R007_device_type_code
type: u16
address: 5000
mapValue:
0xe00: SH5.0RT
0xe01: SH6.0RT
0xe02: SH8.0RT
0xe03: SH10RT
- name: R008_nominal_output_power
type: u16
address: 5001
unit: watt
mapValue:
x: 100*x
- name: R009_output_type
type: u16
address: 5002
mapValue:
0: single
1: 3P4L
2: 3P3L
- name: R010_daily_output_energy
type: u16
address: 5003
unit: watthour
mapValue:
x: 100*x
- name: R011_total_output_energy
type: u32
address: 5004
unit: watthour
mapValue:
x: 100*x
# R012: reserved
- name: R013_inside_temperature
type: s16
address: 5008
unit: celsius
mapValue:
x: x/10
# R014: reserved
- name: R015_mppt1_voltage
type: u16
address: 5011
unit: volt
mapValue:
x: x/10
- name: R016_mppt1_current
type: u16
address: 5012
unit: ampere
mapValue:
x: x/10
- name: R017_mppt2_voltage
type: u16
address: 5013
unit: volt
mapValue:
x: x/10
- name: R018_mppt2_current
type: u16
address: 5014
unit: ampere
mapValue:
x: x/10
# R019: reserved
- name: R020_total_dc_power
type: u32
address: 5017
unit: watt
- name: R021_phase_a_voltage
type: u16
address: 5019
unit: volt
mapValue:
x: x/10
- name: R022_phase_b_voltage
type: u16
address: 5020
unit: volt
mapValue:
x: x/10
- name: R023_phase_c_voltage
type: u16
address: 5021
unit: volt
mapValue:
x: x/10
# R024: reserved
- name: R025_reactive_power
type: s32
address: 5033
unit: var # VA reactive = VA = Watt
- name: R026_power_factor
type: s16
address: 5035
mapValue:
x: x/1000
- name: R027_grid_frequency
type: u16
address: 5036
unit: hertz
mapValue:
x: x/10
- name: R028_export_limit_min
type: u16
address: 5622
unit: watt
mapValue:
x: 10*x
- name: R029_export_limit_max
type: u16
address: 5623
unit: watt
mapValue:
x: 10*x
- name: R030_bdc_rated_power
type: u16
address: 5628
unit: watt
mapValue:
x: 100*x
- name: R031_max_charging_current_bms
type: u16
address: 5635
unit: ampere
- name: R032_max_discharging_current_bms
type: u16
address: 5636
unit: ampere
- name: R033_pv_power_of_today
type: u16
address: 6100
length: 96
unit: watt
- name: R034_daily_pv_yields
type: u16
address: 6196
length: 31
unit: watthour
mapValue:
x: 100*x
- name: R035_monthly_pv_yields
type: u16
address: 6227
length: 12
unit: watthour
mapValue:
x: 100*x
# R036: reserved
- name: R037_yearly_pv_yields
type: u32
address: 6250
length: 20
unit: watthour
mapValue:
x: "x == 4294967295 ? 0 : 100*x"
- name: R038_direct_power_consumption_of_today_from_pv
type: u16
address: 6290
length: 96
unit: watt
- name: R039_daily_direct_energy_consumption_from_pv
type: u16
address: 6386
length: 31
unit: watthour
mapValue:
x: 100*x
- name: R040_monthly_direct_energy_consumption_from_pv
type: u16
address: 6417
length: 12
unit: watthour
mapValue:
x: 100*x
- name: R041_yearly_direct_energy_consumption_yearly
type: u32
address: 6429
length: 20
unit: watthour
mapValue:
x: "x == 4294967295 ? 0 : 100*x"
- name: R042_export_power_from_pv_of_today
type: u16
address: 6469
unit: watt
length: 96
- name: R043_daily_export_energy_from_pv
type: u16
address: 6565
length: 31
unit: watthour
mapValue:
x: 100*x
- name: R044_monthly_export_energy_from_pv
type: u16
address: 6596
length: 12
unit: watthour
mapValue:
x: 100*x
- name: R045_yearly_export_energy_from_pv
type: u32
address: 6608
length: 20
unit: watthour
mapValue:
x: "x == 4294967295 ? 0 : 100*x"
- name: R046_battery_charge_power_of_today
type: u16
address: 6648
unit: watt
length: 96
- name: R047_daily_battery_charge_energy_from_pv
type: u16
address: 6744
length: 31
unit: watthour
mapValue:
x: 100*x
- name: R048_monthly_battery_charge_energy_from_pv
type: u16
address: 6775
length: 12
unit: watthour
mapValue:
x: 100*x
- name: R049_yearly_battery_charge_energy_from_pv
type: u32
address: 6787
length: 20
unit: watthour
mapValue:
x: "x == 4294967295 ? 0 : 100*x"
- name: R050_system_state
type: u16
address: 13000
- name: R051_running_state
type: u16
address: 13001
- name: R052_daily_pv_generation
type: u16
address: 13002
unit: watthour
mapValue:
x: 100*x
- name: R053_total_pv_generation
type: u32
address: 13003
unit: watthour
mapValue:
x: 100*x
- name: R054_daily_export_energy_from_pv # spec says power?
type: u16
address: 13005
unit: watthour
mapValue:
x: 100*x
- name: R055_total_export_energy_from_pv
type: u32
address: 13006
unit: watthour
mapValue:
x: 100*x
- name: R056_load_power
type: s32
address: 13008
unit: watt
- name: R057_export_power
type: s32
address: 13010
unit: watt
- name: R058_daily_battery_charge_energy_from_pv
type: u16
address: 13012
unit: watthour
mapValue:
x: 100*x
- name: R059_total_battery_charge_energy_from_pv
type: u32
address: 13013
unit: watthour
mapValue:
x: 100*x
- name: R060_co2_reduction
type: u32
address: 13015
unit: gram
mapValue:
x: 100*x
- name: R061_daily_direct_energy_consumption
type: u16
address: 13017
unit: watthour
mapValue:
x: 100*x
- name: R062_total_direct_energy_consumption
type: u32
address: 13018
unit: watthour
mapValue:
x: 100*x
- name: R063_battery_voltage
type: u16
address: 13020
unit: volt
mapValue:
x: x/10
- name: R064_battery_current
type: u16
address: 13021
unit: ampere
mapValue:
x: x/10
- name: R065_battery_power
type: u16
address: 13022
unit: watt
mapValue:
x: x
- name: R066_battery_level
type: u16
address: 13023
mapValue:
x: x/1000
- name: R067_battery_state_of_healthy
type: u16
address: 13024
mapValue:
x: x/1000
- name: R068_battery_temperature
type: s16
address: 13025
mapValue:
x: x/10
- name: R069_daily_battery_discharge_energy
type: u16
address: 13026
unit: watthour
mapValue:
x: 100*x
- name: R070_total_battery_discharge_energy
type: u32
address: 13027
unit: watthour
mapValue:
x: 100*x
- name: R071_self_consumption_of_today
type: u16
address: 13029
mapValue:
x: x/1000
- name: R072_grid_state
type: u16
address: 13030
mapValue:
0xAA: '0' # off_grid
0x55: '1' # on_grid
- name: R073_phase_a_current
type: s16
address: 13031
unit: ampere
mapValue:
x: x/10
- name: R074_phase_b_current
type: s16
address: 13032
unit: ampere
mapValue:
x: x/10
- name: R075_phase_c_current
type: s16
address: 13033
unit: ampere
mapValue:
x: x/10
- name: R076_total_active_power
type: s32
address: 13034
unit: watt
- name: R077_daily_import_energy
type: u16
address: 13036
unit: watthour
mapValue:
x: 100*x
- name: R078_total_import_energy
type: u32
address: 13037
unit: watthour
mapValue:
x: 100*x
# R079: not applicable
- name: R080_charge_energy_daily
type: u16
address: 13040
unit: watthour
mapValue:
x: 100*x
- name: R081_total_charge_energy
type: u32
address: 13041
unit: watthour
mapValue:
x: 100*x
- name: R082_drm_state
type: u16
address: 13043
# R083: reserved
- name: R084_daily_export_energy
type: u16
address: 13045
unit: watthour
mapValue:
x: 100*x
- name: R085_total_export_energy
type: u32
address: 13046
unit: watthour
mapValue:
x: 100*x
# R86: reserved
- name: R087_inverter_alarm
type: u32
address: 13050
- name: R088_grid_side_fault
type: u32
address: 13052
- name: R089_system_fault_1
type: u32
address: 13054
- name: R090_system_fault_2
type: u32
address: 13056
- name: R091_dc_side_fault
type: u32
address: 13058
- name: R092_permanent_fault
type: u32
address: 13060
- name: R093_bdc_side_fault
type: u32
address: 13062
- name: R094_bdc_side_permanent_fault
type: u32
address: 13064
- name: R095_battery_fault
type: u32
address: 13066
- name: R096_battery_alarm
type: u32
address: 13068
- name: R097_bms_alarm_1 # there's also 2 below
type: u32
address: 13070
- name: R098_bms_protection
type: u32
address: 13072
- name: R099_bms_fault_1
type: u32
address: 13074
- name: R100_bms_fault_2
type: u32
address: 13076
- name: R101_bms_alarm_2
type: u32
address: 13078
# R102: reserved
# R103-R121: not applicable
- name: W001_system_clock_year
type: u16
address: 5000
writable: true
validation:
year: 'year > 2000'
- name: W002_system_clock_month
type: u16
address: 5001
writable: true
validation:
month: 'month >= 1 && month <= 12'
- name: W003_system_clock_day
type: u16
address: 5002
writable: true
validation:
day: 'day >= 1 && day <= 31'
- name: W004_system_clock_hour
type: u16
address: 5003
writable: true
validation:
hour: 'hour >= 0 && hour <= 23'
- name: W005_system_clock_minute
type: u16
address: 5004
writable: true
validation:
minute: 'minute >= 0 && minute <= 59'
- name: W006_system_clock_second
type: u16
address: 5005
writable: true
validation:
second: 'second >= 0 && second <= 59'
# W007: reserved
- name: W008_start_stop
type: u16
address: 13000
writable: true
mapValue:
0xCF: Start
0xCE: Stop
# W009: Not applicable
- name: W010_load1_adjustment_mode
type: u16
address: 13002
writable: true
mapValue:
0: Timing
1: OnOff
2: PowerOptimized
3: Disabled
- name: W028_charge_discharge_power
type: u16
address: 13052
writable: true
#validation:
# percent: 'percent >= 0.5 && percent <= 1'
# W025: reserved
# W029: reserved
# W030-W032: not applicable
- name: W033_max_soc
type: u16
address: 13058
writable: true
validation:
percent: 'percent >= 0.5 && percent <= 1'
mapValue:
x: x/1000
- name: W034_min_soc
type: u16
address: 13059
writable: true
validation:
percent: 'percent >= 0.0 && percent <= 0.5'
mapValue:
x: x/1000
# W035-W038: not applicable
# W039: reserved
# W040-W048: not applicable
- name: W049_export_power_limitation
type: u16
address: 13074
writable: true
unit: watt
validation:
limit: "limit >= register('R028_export_limit_min') && limit <= register('R029_export_limit_max')"
- name: W050_off_grid_option
type: u16
address: 13075
mapValue:
0xAA: "Enable"
0x55: "Disable"
- name: W058_export_power_limitation
type: u16
address: 13087
mapValue:
0xAA: "Enable"
0x55: "Disable"
0xFFFF: "Args"
# W059: reserved
- name: W060_reserved_soc_for_backup
type: u16
address: 13100