|
4 | 4 | VPP_V201_BATTERY2, VPP_V201_HOLDING_1P, |
5 | 5 | ) |
6 | 6 |
|
| 7 | +# AC charge energy — input registers 112-115, Storage Power interpretation. |
| 8 | +# |
| 9 | +# Protocol V1.39 gives this block two meanings, selected by device class. The rightmost |
| 10 | +# column of the spec table is the selector: |
| 11 | +# |
| 12 | +# | Reg | MAX-class string inverter | Storage Power (SPH, SPA) | |
| 13 | +# |-----|---------------------------|--------------------------| |
| 14 | +# | 112 | Warn Maincode | EACharge_Today_H | |
| 15 | +# | 113 | real Power Percent | EACharge_Today_L | |
| 16 | +# | 114 | inv start delay time | EACharge_Total_H | |
| 17 | +# | 115 | bINVAllFaultCode | EACharge_Total_L | |
| 18 | +# |
| 19 | +# SPH is a Storage Power model, so the energy reading applies to every profile in this |
| 20 | +# file. Until this was corrected these profiles mapped 112 as `warning_code` (the MAX |
| 21 | +# meaning) *and* 115 alone as `ac_charge_energy_total` (the Storage meaning) — two |
| 22 | +# interpretations of one block, which cannot both be right on one device (#390). |
| 23 | +# |
| 24 | +# Reading 115 without its high word at 114 also capped the lifetime total at 6553.5 kWh. |
| 25 | +# A reporter's scan read 114=1, 115=5462 → (1<<16)|5462 = 70998 → 7099.8 kWh, where 115 |
| 26 | +# alone would have said 546.2. |
| 27 | +# |
| 28 | +# NOT applied to MIN/MID/MOD/MIC/TL3-S/TL-XH. Those also map 112 as warning_code, and for |
| 29 | +# the MAX-class ones that is correct; for the XH hybrids there is no evidence either way |
| 30 | +# and guessing which side of the column they fall on is how wrong-but-plausible values |
| 31 | +# get shipped. |
| 32 | +STORAGE_AC_CHARGE_ENERGY = { |
| 33 | + 112: {'name': 'ac_charge_energy_today_high', 'scale': 1, 'unit': '', 'pair': 113, |
| 34 | + 'desc': 'AC charge energy today HIGH (EACharge_Today_H)'}, |
| 35 | + 113: {'name': 'ac_charge_energy_today_low', 'scale': 1, 'unit': '', 'pair': 112, |
| 36 | + 'combined_scale': 0.1, 'combined_unit': 'kWh'}, |
| 37 | + 114: {'name': 'ac_charge_energy_total_high', 'scale': 1, 'unit': '', 'pair': 115, |
| 38 | + 'desc': 'AC charge energy total HIGH (EACharge_Total_H)'}, |
| 39 | + 115: {'name': 'ac_charge_energy_total_low', 'scale': 1, 'unit': '', 'pair': 114, |
| 40 | + 'combined_scale': 0.1, 'combined_unit': 'kWh'}, |
| 41 | +} |
| 42 | + |
7 | 43 | # SPH 3000-6000 (Single-phase hybrid with battery) |
8 | 44 | SPH_3000_6000 = { |
9 | 45 | 'name': 'SPH Series 3-6kW', |
|
146 | 182 | # Diagnostics |
147 | 183 | 104: {'name': 'derating_mode', 'scale': 1, 'unit': ''}, |
148 | 184 | 105: {'name': 'fault_code', 'scale': 1, 'unit': ''}, |
149 | | - 112: {'name': 'warning_code', 'scale': 1, 'unit': ''}, |
150 | 185 |
|
151 | | - # Battery AC Charge Energy (SPH 3-6kW V201 with newer firmware) |
152 | | - 115: {'name': 'ac_charge_energy_total', 'scale': 0.1, 'unit': 'kWh', 'desc': 'Total energy charged from AC/grid to battery'}, |
| 186 | + # AC charge energy today/total — see STORAGE_AC_CHARGE_ENERGY above. |
| 187 | + **STORAGE_AC_CHARGE_ENERGY, |
153 | 188 | }, |
154 | 189 | 'holding_registers': { |
155 | 190 | # Basic Control |
|
445 | 480 | # Diagnostics |
446 | 481 | 104: {'name': 'derating_mode', 'scale': 1, 'unit': ''}, |
447 | 482 | 105: {'name': 'fault_code', 'scale': 1, 'unit': ''}, |
448 | | - 112: {'name': 'warning_code', 'scale': 1, 'unit': ''}, |
| 483 | + |
| 484 | + # AC charge energy today/total — see STORAGE_AC_CHARGE_ENERGY above. |
| 485 | + **STORAGE_AC_CHARGE_ENERGY, |
449 | 486 | }, |
450 | 487 | 'holding_registers': { |
451 | 488 | # Basic Control |
|
1007 | 1044 | 31217: {'name': 'battery_soc_vpp', 'scale': 1, 'unit': '%', 'maps_to': 'battery_soc'}, |
1008 | 1045 | 31218: {'name': 'battery_soh', 'scale': 1, 'unit': '%', 'desc': 'Battery state of health'}, |
1009 | 1046 | # Note: Registers 31220-31221 appear to contain incorrect data when paired as 32-bit |
1010 | | - # AC charge energy total is available in register 115 (legacy range) instead |
| 1047 | + # AC charge energy total is available in registers 114/115 (legacy range) instead, |
| 1048 | + # inherited from SPH_7000_10000 above. |
1011 | 1049 | 31222: {'name': 'battery_temp_vpp', 'scale': 0.1, 'unit': '°C', 'maps_to': 'battery_temp', 'signed': True}, |
1012 | 1050 |
|
1013 | | - # Battery AC Charge Energy (SPH 7-10kW V201 with newer firmware) |
1014 | | - 115: {'name': 'ac_charge_energy_total', 'scale': 0.1, 'unit': 'kWh', 'desc': 'Total energy charged from AC/grid to battery'}, |
1015 | | - |
1016 | 1051 | # Battery Cluster 2 State |
1017 | 1052 | **VPP_V201_BATTERY2, |
1018 | 1053 | }, |
|
0 commit comments