github Philra94/homeassistant-hoymiles-cloud v1.2.1
v1.2.1 — Negative energy guard, diagnosable device reports

latest releases: v1.4.0rc6, v1.4.0rc5, v1.4.0rc4...
one month ago

A follow-up to v1.2.0 fixing a statistics-corrupting bug and making "missing devices" reports diagnosable.

Negative energy readings no longer corrupt statistics (#54)

The Hoymiles cloud can return a negative value for a daily energy counter — observed as pv_to_load_eq = -3461 Wh on a battery-only system that has no PV at all.

This was more damaging than the Home Assistant log warning suggested. HA reads a drop in a total_increasing sensor as a meter reset, so a negative reading caused the next normal value to be recorded as one enormous delta, permanently inflating the Energy dashboard and long-term statistics. None of the 23 energy counters guarded against it.

Negative readings are now withheld (the sensor reads unknown for that poll) rather than being published or clamped to zero — clamping would itself signal a reset and cause the same inflation. Signed measurements such as battery_power, which is legitimately negative while charging, are unaffected.

If your Energy dashboard already shows an implausible spike, that history was recorded before this fix and needs correcting in Developer Tools → Statistics; this release stops it recurring.

Thanks to @davidmcluckie for the report.

Diagnostics now show what is actually happening (#41)

Reports of missing devices or entities could not be diagnosed, because the diagnostics export omitted the very fields that would answer the question. It now includes:

  • Microinverters. These were silently dropped from the device inventory. Because HMS/HMT microinverters are fetched from a different endpoint than string/hybrid inverters, an empty inverters list is the expected result for a microinverter-only station — but with the microinverter list missing, that looked identical to a discovery failure. This cost real diagnostic time on #41.
  • Raw telemetry payloads (real_time_data, pv_indicators, grid_indicators, load_indicators, energy_flow) — the data that decides which PV, grid and load entities exist.
  • device_fetch_status — the per-endpoint outcome, so an empty device list can finally be told apart from one the account was denied access to (No Permission).

Failed device lookups now also warn once per outage instead of only at debug level, so a persistent failure is visible without flooding the log.

Serial numbers, addresses, coordinates and account identifiers are redacted before the file is written, including unknown fields matched by shape (*_sn, *_addr, …).

If you have an open report about missing devices, a fresh diagnostics export from this version will be far more useful than the previous one.

Thanks to @BKurze, whose report exposed the diagnostics gap.

Known issues

  • #39 — per-channel PV values still missing on some HMS-800-2T setups. The per-port fallback deliberately remains limited to single-microinverter stations: indicator channel numbers are station-level while the module-data endpoint takes a per-microinverter port, and without that mapping a multi-microinverter station could be shown another device's reading. Being resolved properly rather than guessed at.
  • #32 — "Battery Power always 0 W" on some 1920AC setups, awaiting diagnostics.
  • #43 — the battery-write fix in v1.2.0 is not yet confirmed by the reporter.

Full Changelog: v1.2.0...v1.2.1

Don't miss a new homeassistant-hoymiles-cloud release

NewReleases is sending notifications on new releases.