Skip to content

fix(ev): confirm planning SoC and show charging target and source - #1501

Closed
segran2 wants to merge 1 commit into
srcfl:vehicle-soc-max-age-20mfrom
segran2:fix/car-charging-soc-confirmation
Closed

segran2 wants to merge 1 commit into
srcfl:vehicle-soc-max-age-20mfrom
segran2:fix/car-charging-soc-confirmation

Conversation

@segran2

@segran2 segran2 commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Problem and result

When the car's cloud reading was stale, the charging planner could use the assumed 20% plug-in level even though the car was at 86%. On an 86.5 kWh Audi with a 90% goal, this produced a roughly 60 kWh plan instead of about 3.9 kWh including charging losses.

Scheduled charging now waits for a valid car anchor or a user-confirmed starting level. The user can correct the slider or confirm that the older reported percentage matches the car now. Older telemetry keeps its age; confirming the starting level does not make the cloud reading fresh.

The Car charging card always shows its goal, including when no charging is needed: Car SoC target 80% < actual SoC 86% (Confirmed by user). It uses ≥ when the target is at least the displayed actual level. Source labels distinguish From Car · Current, Confirmed by user, an older car reading with age, and FTW estimate.

The household battery forecast is labelled Home battery, so it cannot be confused with the car's level.

Scope and safety

  • Stacked on fix(ev): anchor older car SoC with energy delivered since #1500, branch vehicle-soc-max-age-20m, commit f585074c35f7606317159331521e5a2be48a66b7. Only this PR's 19 files and 289 added / 11 removed lines belong to the change. Retarget and rebase onto master after that dependency lands.
  • The unresolved measurement-time review in fix(ev): anchor older car SoC with energy delivered since #1500 remains that PR's responsibility; this change does not repair or endorse its timing assumption.
  • fix(web): pause plan, heating, settings, and card polls when hidden #1177 shares web/app.js and web/plan.js for polling lifecycle work. This PR changes the SoC controls and displayed text, not polling; coordinate its final rebase before merge. Other open main.go work concerns unrelated startup/help paths.
  • Guard both new plans and dispatch from an already cached automatic plan. Explicit manual charging and PV-only charging remain available.
  • Preserve user confirmation provenance only within the matching hardware session. Clear it for a new session or car anchor, and label the value an FTW estimate after delivered energy advances it.
  • Persist provenance as an optional field in the existing version-2 session record. Older saved sessions remain readable and do not acquire invented confirmation provenance.
  • No Pixii driver, battery power conversion, battery optimizer, or MyUplink authentication changes. The Pixii direction warning is tracked separately in Pixii: AC power sign inversion causes false power_wrong_direction during discharge device-drivers#154.
  • No release publication, installer or binary is included.

Verification

Re-run after applying the test4 changes on the #1500 head:

  • npm test: 690 passing tests, 94 suites.
  • From go/: go test ./internal/loadpoint ./internal/mpc ./cmd/ftw: pass.
  • From go/: go test ./internal/api -skip TestHandleSysInfoSmoke: pass.
  • From go/: go vet ./...: pass.
  • git diff --check: pass.
  • make verify: not green in this environment. Tests fail when they need network-interface/netlink access or changing file ownership: sysinfo, gatewayidentity, mdnsresolve, nova and scanner. Those environment limitations were also observed on the unmodified v0.139.0-beta.1 baseline. The Make target stops at tests, so its later build checks are not claimed as passed.

New regression tests cover waiting for confirmed SoC, blocking cached automatic dispatch, session provenance and restore, target display without charging windows, both comparison directions, source labels, and the stale-reading confirmation UI.

Human/site evidence: the tester reviewed the rendered preview and installed test4 (v0.139.0-beta.9004) on one FTW site with Audi e-tron / Easee. Confirming 86% with a 90% target reduced the plan to about 3.9 kWh. The tester confirmed the updated UI after restarting the FTW app. The deployed test4 build was based on v0.139.0-beta.1, not the combined #1500 branch; the stacked branch has automated verification only. Multi-site and full physical-dispatch validation remain outstanding.

Checklist

Signed-off-by: Göran Andersson <goran@andersson-stehag.se>
@segran2
segran2 marked this pull request as ready for review October 3, 2026 00:08
@frahlg
frahlg deleted the branch srcfl:vehicle-soc-max-age-20m October 3, 2026 05:41
@frahlg frahlg closed this Oct 3, 2026
@segran2

segran2 commented Oct 3, 2026 via email

Copy link
Copy Markdown
Contributor Author

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants