Skip to content

v0.9.10

Choose a tag to compare

@0xAHA 0xAHA released this 03 Jul 09:44

What's new

Fixes

MOD-XH Grid Import Energy Today/Total shows wrong values (#336)

The calculated grid import formula (load + export − energy_today) is incorrect on MOD-XH models because energy_today on those profiles is PV DC string energy (due to use_mppt_energy_today: True), not AC inverter output. The formula omits the battery charge/discharge contribution and produces an inflated result. For example: load 38.7 kWh, export 1.2 kWh, PV DC 37.9 kWh → formula gives 2.0 kWh; correct value per hardware register is 0.8 kWh.

Fix: MOD-XH profiles (any series name containing "xh") now read grid import directly from hardware registers — energy_to_user_today at 3067/3068 and energy_to_user_total at 3069/3070 — bypassing the calculation entirely. This matches what Growatt's cloud portal reports.

⚠️ If upgrading from v0.9.9 or earlier, read the upgrade note below.


SPH time period start/end writes silently revert (#333)

SPH firmware rejects FC06 single-register writes to time period registers — the write is acknowledged but the inverter reverts the value within ~6 seconds. All SPH time period controls (AC charge periods 1–3 at registers 1100–1108, Battery First periods 4–6 at 1017–1025, Grid First periods 4–9 at 1026–1034 and 1080–1088) now use an atomic FC16 write that sends the full [start, end, enable] triple in a single transaction. Matches the write behaviour already used for MOD TOU periods.


SPH 3-6kW auto-detects as sph_8000_10000_hu (#337)

The DTC-3502 refinement was checking register 1086 before checking PV3 string presence. Register 1086 responds on all SPH models with a battery (returns battery SOC on 3-6kW units), so the HU branch fired for any 3-6kW SPH with a battery regardless of actual model. Detection order is now: (1) if PV3 absent → sph_3000_6000_v201 immediately; (2) if PV3 confirmed → check register 1086 to distinguish HU from 7-10kW.


DTC display names corrected for WIS/WIT commercial models

Per VPP V2.03 spec: DTC 5601 is WIT 29.9-50K-XHU (not "WIT 100KTL3-H"); DTC 5800 is WIS 210K (not "WIS 215KTL3"). Corrected in diagnostic.py, auto_detection.py, wit.py.


New features

WIT 29.9-50K-XHU profile (#338)

New dedicated profile wit_29900_50000tl3_xhu for the 5-variant WIT XHU commercial hybrid series (29.9K / 30K / 36K / 40K / 50K-XHU). DTC 5601 now correctly routes to this profile instead of the MID grid-tied profile.

Hardware specs confirmed from manual: 4 MPPT trackers (50/40 d.c.A×4), 3 battery channels (55A×3), 200-900V battery range, off-grid capable, three-phase 3P3W+PE / 3P4W+PE.

  • PV3 sensors: registers 11-14 (V/I/P) and 67-70 (energy today/total) — universal Growatt pattern, high confidence
  • PV4 sensors: registers 15-18 (V/I/P) and 71-74 (energy today/total) — inferred from sequential pattern, pending hardware register scan verification. Sensors are disabled by default and only activate when PV4 voltage > 0, so they are harmless if addresses turn out to be incorrect.
  • Per-MPPT energy_today sanity limit raised from 100 kWh to 1000 kWh to accommodate 50 kW 4-string commercial systems on high-production days
  • All WIT controls apply: TOU periods, work mode select, remote power control
  • Battery channels 2/3 require Modbus register documentation (not in manual) — to be addressed when documentation becomes available

Upgrade notes

MOD-XH / MID-XH users (Issue #336)

The Grid Import Energy Total sensor will change its source from the calculated formula to the hardware register when you upgrade. On most systems the register value will be lower than what the sensor has been reporting (e.g. 725.1 kWh vs 1037.90 kWh from the formula).

Because this sensor uses HA's total_increasing state class, a drop in the sensor value is interpreted as a meter reset. HA will add the old value to a historical baseline and restart accumulation from the new value — making the energy dashboard total more inflated, not less.

Recommended steps before upgrading:

  1. Note the current hardware register value — run the diagnostic register scan and look at registers 3069/3070 (the low word × 0.1 = lifetime total in kWh)
  2. In HA go to Developer Tools → Statistics
  3. Search for your grid_import_energy_total entity
  4. Use "Adjust Sum" to set the accumulated total to match the hardware register value
  5. Then upgrade to v0.9.10

If you upgrade first without correcting statistics, the entity state will immediately be correct, but the energy dashboard chart will need a manual statistics correction afterwards.


Contributors

Thanks to @ledermueller and @xvil for detailed register scans and charts that diagnosed the MOD-XH grid import issue, and to @sentivfan for the WIT 30K-XHU manual photos that enabled the new profile.