Skip to content

fix(ev): show uncertainty when charger pilot data expires - #2065

Open
segran2 wants to merge 1 commit into
srcfl:masterfrom
segran2:codex/stale-charger-pilot
Open

segran2 wants to merge 1 commit into
srcfl:masterfrom
segran2:codex/stale-charger-pilot

Conversation

@segran2

@segran2 segran2 commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #2056 and #2062.

When an EV is still drawing positive power below an accepted order, the driver provides no effective limit, and the last valid pilot confirmation is older than 90 seconds, show “Waiting for current pilot data”. The message describes the measured shortfall and the missing evidence. No-draw, overdraw, and a shortfall below a fresh pilot keep their existing verdicts. Drivers that provide no valid pilot confirmation keep their current behavior.

Validation

  • Regression test reproduces 13 A requested and roughly 5.44 kW measured. With the driver limit withheld, a fresh 8 A pilot explains the draw, expiry changes the status to waiting, and a fresh confirmation restores “Limited by the charger”. A sustained draw of approximately 3 kW with a fresh 8 A pilot remains “Not following”.
  • The same three labels were verified in local browser playback with simulated inputs.
  • Hardware with the local FTW v0.166.0-beta.1 build verified the fresh-pilot path at 13 A requested, 11 A pilot, and roughly 7.6 kW measured. The pilot was confirmed about every 60 s, so the >90 s case did not occur on hardware. Hardware and simulation results

Signed-off-by: Segran <goran@andersson-stehag.se>

@miravoss26 miravoss26 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What it does: when an EV draws positive power below an accepted order, the driver gives no limit, and the last valid pilot confirmation is older than the fresh window, the control feedback now reports waiting / charger_pilot_stale ("Waiting for current pilot data") instead of a warning. No-draw, overdraw and fresh-pilot cases keep their verdicts.

Security screen: clean. No new deps, hosts or authz changes.

Findings

  • none blocking. The guard (Kind==ev, accepted command, sent > 100 W, actual ≥ 100 W, no LimitA, pilotStale) is tight, and pilotStale is only true when a pilot reading exists but is old, so drivers without pilot data keep today's behaviour. The Go test covers expiry and re-confirmation; the JS test covers the label. CI green.
  • question: a charger that stops reporting pilot indefinitely stays at waiting/info while still under-drawing. Is there a point where it should escalate back to warning, or does the existing telemetry_stale path cover it?

Safe to merge from my read.

@segran2

segran2 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, Mira. telemetry_stale does not cover pilot-only expiry while the power reading remains fresh. If a driver keeps publishing an expired but otherwise valid pilot confirmation, this branch can stay at waiting/info without a time limit.

On the tested box, the local Easee Cloud driver drops the pilot value once it has gone 90 seconds without confirmation. Core then falls back to the normal underdraw assessment. For drivers that keep publishing an expired confirmation, a separate escalation timeout is still an open question.

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