Repository navigation
fix(telemetry): dark offline PV counts as 0 W so live load stays known - #1767
Closed
frahlg-agents[bot] wants to merge 1 commit into
Closed
frahlg-agents[bot] wants to merge 1 commit into
frahlg-agents[bot] wants to merge 1 commit into
Conversation
Contributor
Author
|
Closing in favour of #1768, which restores live Home use from the site meter with quality tracked separately (no 50 W heuristic). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reported by Anders (Growatt PV + Pixii meter/battery, v0.154.1): after sunset Growatt goes offline and
/api/statusshowspv_w:null,load_w:null,history_reason:"offline:Growatt:pv"although Pixii still reports the site meter.Root cause —
measurementLocked(go/internal/telemetry/forecast.go) fails the whole balance (Valid=false) whenever any expected flow's driver is!TelemetryLive()(reason = "offline:").qualifyStatusHistorythen nullsload_w(MissingLoad) andpv_w(MissingPV).Fix (live path only,
alignSources == false): a PV source that is offline or stale and whose last reading was within ±50 W (PVDarkThresholdW) is counted as 0 W. The source is markedAssumedZero, the reading getsPVAssumedZero;Known[DerPV]andPVValidstay false so history and PV forecast training do not record an assumed value as measured./api/statusshowspv_w: 0and the load from meter + battery.Unchanged: PV that drops out while producing (last reading > 50 W) still fails as
offline:…:pv; a missing site meter still nulls load; a PV driver with no reading ever (missing:) still fails; forecast/history alignment paths unchanged.Tests: new cases in
telemetry/live_measurement_test.goandapi/api_history_quality_test.go.go testgreen for telemetry, api, ha, state, cmd/ftw. Locallyinternal/driversfails only because the bundled driver catalog is not checked out in my worktree (unrelated).Open questions: should the night check use
internal/sunpos(sun below horizon) instead of / in addition to the last-reading heuristic? Is 50 W the right threshold?