Repository navigation
fix(telemetry): derive Home use from energy and preserve history gaps - #1720
Conversation
|
Integration check with the charging candidate passed on 18 October. An isolated tree combines #1719 Keep the existing merge order: #1668 first, then rebase this PR. No branch, box or release was changed by the check. Home use uses timed energy/period evidence; the EV safety guard remains meter-based and does not consume the estimate. Independent human UI and physical report-cadence validation remain outstanding. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
7867449 to
67ef096
Compare
Problem and result
Refs #1667. Builds on #1668, now merged as
5c2ec4e9. Rebased onto master4223a25fafter #1719 and #1721 merged. Review this change alone.A slow charger report can make the latest household power balance negative. Filtering each device does not align their times. Home use now shows a marked interval mean: subtract charger session-energy differences from the other flows' integrated energy over the same reported period, then divide by the period's length. Use sampled power for sources without timed counters. A broken counter series waits for a new valid interval. A minute-scale report produces a slower, older mean rather than a claimed live reading.
The house shows
≈, with the period's clock times, time zone, length and age since its end below the diagram. A past mean cannot supply SELF-POWERED NOW. Rawload_w, quality and control evidence remain separate. Missing coverage shows unknown rather than falling back to the latest mismatched residual.Easee checks
Checked the release's exact driver pin,
5cc7bb1a65fe41c4f2cb28a7f546875313b2df85, also used by v0.150.0-beta.1:session_wh, retains that observation's ownenergy_observed_at, and supplies a session id checked against the ongoing-session endpoint. The new calculation uses those existing fields and adds no API calls.Calculation and limits
History and scope
Keep #1668's signed balance-energy record. Publish new daily estimate evidence only after a balance episode recovers within two minutes without a recording gap over 15 seconds. Long or interrupted failures stay unknown. Do not clip negatives or fill from surrounding positive endpoints. The new display intervals are not added to history totals, which would count energy twice.
Break history integration at restart, keep SoC quality separate from power coverage, and wait three minutes after local midnight before caching the closed day. Estimated daily load stays out of
measured, gets≈in Today, and supplies no measured self-powered share. Display smoothing keeps Core's raw household residual, including V2X, instead of deriving it again from independently filtered fields.No change to forecast training, fuse protection, dispatch, charging commands/limits or recovery. No box operation, database repair, backfill, driver pin, merge or release. Checked open work and reviews: #1668 owns the base; #1547 stays untouched. #1719/#1694/#1675 have separate
app.jswork. #1177's visibility-pause changes already appear in this base; this patch does not alter that path. No reviewer was requested.Verification
make verify: passed (Go/protocol tests, Docker context, native solver handshake, package/migration checks, boundaries, vet and build).npm test: 767 passed.≈, time zone/end age, no SELF-POWERED NOW for past means, and no horizontal overflow.Remaining evidence
Independent human UI review and physical-site validation remain open. Measure observation 121's actual updates and reset/session binding, paired source/receipt times, device clock offsets and independent energy over the same intervals. An old change-only observation may still leave Home use unavailable; a successful cloud poll cannot make it fresh.
Beta integration check
The owner authorized merging the selected fixes and publishing the next beta. Head
67ef0966has the same Git tree (6575c8db) as the isolated combination of #1668, #1719, #1720 and #1721 that passed fullmake verifyand all 781 web tests. The rebased head is running its own CI before merge. Human UI and physical-site checks remain part of beta validation.