Skip to content

Brief measurement imbalances invalidate whole daily household totals #1667

Closed

Description

@segran2

On v0.145.0-beta.1, History showed “Incomplete measurements” and no household-use bar for 13–16 October 2026, although grid, solar and battery energy were still present.

/api/energy/daily returned load_wh: null and history_quality: balance_mismatch. The underlying history contains brief invalid_balance samples: asynchronous grid, battery, PV and charger observations temporarily produce a negative household residual. These occur with and without EV charging. The quality mask is ORed across the day, so a short transient invalidates the entire daily household total.

Expected behavior:

  • Preserve the original rejected instantaneous observations; do not feed them into forecast training or control.
  • Allow an explicitly estimated household-energy total where independent source observations support signed integration across a brief imbalance. Do not clip negative instantaneous residuals before integrating.
  • Keep missing, stale, duplicate or skewed sources distinct from a transient negative balance.
  • Show actual recording coverage. Offline/writer gaps must not silently become full-day measurements or be extrapolated as zero consumption.
  • Retain estimate provenance through caching, retention, backups and restart.

A local hotfix and an audited, additive repair were tested on the affected installation. The repaired 13–16 October totals now display as estimates, while original measurements and quality masks remain intact. Separate recording gaps of about 91 and 89 minutes on 14 and 15 October remain explicitly disclosed. The historical repair used retained 10-second charger observations and is an estimate, not recovery of exact lost measurements.

Validation on the beta-based hotfix: make verify, 727 web tests, targeted signed-balance/coverage regressions, runtime API verification and browser inspection. Upstream applicability and review belong to the linked PR.

Activity

  1. segran2 commented on Oct 17, 2026

    @segran2
    ContributorAuthor

    Related EV regulation field test — 17 October 2026 (CEST)

    Personal v0.145.2-beta.1 revision 4, derived from #1675 head 8a02c0a and preserving the existing EV-cost/history patches, was installed on the affected RPi. Its executable SHA-256 matches the package manifest; FTW restarted at 03:08:08.

    A controlled test for #1674/#1675 observed 6.209 kW EV charging with a 7,500 W import cap (7.058 kW grid import), an intentional stop with a 3,000 W cap, and automatic recovery to 10.328 kW after disabling the cap, without a cable reconnect or manual Start/Resume. Follow-up at 03:16:49 reported Following and no further stop in that observation interval.

    This verifies that bounded charging-control scenario, not the history fix. The test's history rows, invalid_balance occurrences, daily estimate provenance and recording coverage still need inspection, followed by a longer charging period. The earlier additive historical repair remains an estimate; this test does not recover missing measurements or establish that all asynchronous balance failures are prevented.

    The import cap is now disabled because the user currently has no peak-tariff requirement. The configured 25 A per-phase main-fuse protection remains in place. Keep #1667/#1668 open pending history verification and review.

  2. segran2 commented on Oct 17, 2026

    @segran2
    ContributorAuthor

    Longer field/history check — 17 October 2026, 12:27 CEST

    The car now reports the requested 80% SoC (vehicle reading about 105 minutes old at inspection), and retained session delivery is approximately 42.73 kWh. Current command and actual charging are both zero; the command reason is no_plan_budget. The service has continued running since revision 4 installation. No exhausted-resume warning was found in the inspected post-test journal.

    This is not a continuous, interruption-free charging result. At 05:49:15, with the import ceiling disabled, the controller issued a below-minimum zero offer: grid 12,323 W, eligible EV credit 0 W, phase bound approximately 2,449.5 W, minimum 4,140 W. Aggregated history shows EV zero from 05:49:25 through 05:50:25 and positive power again at 05:50:40 (10.230 kW by 05:50:45). This documents later recovery in telemetry; it does not independently establish whether any user action occurred or whether that zero decision was physically justified. Other short zero/low-power intervals also exist. The initial controlled test remains passed, but long-term stability and that later decision's raw alignment/phase evidence still need investigation.

    History API review (range=12h&points=4320, 10-second aggregated rows):

    • 03:13:35–03:16:50, covering the controlled stop/restart: 20 returned rows, all complete.
    • 03:11–03:17, including the earlier rate reduction: 35 complete rows and one balance_mismatch / invalid_balance row.
    • 03:17–07:15: 1,428 returned rows, 14 with balance_mismatch, the remainder complete. These are aggregate rows, not counts of original failed measurements; averaged columns and last embedded driver values must not be treated as simultaneous raw samples.
    • The daily API still provides a non-null estimated household total for 17 October (15.268 kWh at this inspection), recorded coverage 44,855,239 ms against elapsed period 44,871,653 ms (about 16.4 seconds uncovered). 16 October remains estimated at 33.461 kWh with reported full-day coverage.

    Thus #1668's deployed daily estimate is present while rejected instantaneous rows remain visible; live balance failures are not eliminated. This API inspection does not independently audit every estimate-table entry, exact missing interval or database provenance. No database repair or hardware/configuration change was made in this check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions