You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(control): ignore offline battery and PV watts when computing site load #1133
siteLoadW mixes live meter watts with last-known battery and PV watts from drivers that are no longer online. That can skip protective PV export curtailment.
Found while reviewing dispatch safety on master 6eadec3f.
EV and V2X already skip offline drivers (SumOnline*; telemetry_test.go exists because last-known EV W leaked into load math). Battery and PV do not.
protectiveCurtailLimitW then compares online PV generation to this mixed load. A dead inverter still showing cached −4 kW PV (the Ferroamp cache incident documented in go/internal/telemetry/store.go) inflates household load and can skip export protection. The opposite error: a dead battery stuck at +5 kW charge understates load.
This path is for DC-link / protective PV curtail, not the main battery PI. The comment on siteLoadW says a missing meter degrades to "don't engage". Offline PV does the reverse: it can make protection look unnecessary.
What a fix needs
Sum only online, non-stale battery and PV readings, matching EV/V2X.
Test: last-known −4 kW PV, driver watchdog-offline, live meter export — protection must not use the corpse reading (mirror TestSumOnlineEVWSkipsOfflineDrivers).
Same for an offline battery stuck at a large charge or discharge.
Open PR overlap: #1129 does not touch dispatch.go.
HA publishState (go/internal/ha/bridge.go) also sums ReadingsByType with no IsOnline() check. Support-report load math filters; HA does not. After the watchdog drops a driver, automations still see the last grid/PV/battery watts. Availability is process LWT, not meter freshness.
Keep this issue for dispatch siteLoadW. HA is another consumer of the same last-known rows.
Activity
frahlg commentedon Sep 8, 2026
HA
publishState(go/internal/ha/bridge.go) also sumsReadingsByTypewith noIsOnline()check. Support-report load math filters; HA does not. After the watchdog drops a driver, automations still see the last grid/PV/battery watts. Availability is process LWT, not meter freshness.Keep this issue for dispatch
siteLoadW. HA is another consumer of the same last-known rows.fix(control): ignore stale load, missing SoC, and stale meters