Skip to content

feat(easee_cloud): expose independently confirmed pilot current (1.5.0) - #200

Merged
frahlg merged 16 commits into
srcfl:mainfrom
segran2:fix/easee-confirmed-pilot-1874
Nov 24, 2026
Merged

frahlg merged 16 commits into
srcfl:mainfrom
segran2:fix/easee-confirmed-pilot-1874

Conversation

@segran2

@segran2 segran2 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

An Easee current-setting readback can remain at 15 A while the actual pilot and circuit allocation allow 13 A. Treating the setting as the pilot makes a real charging limit look unexplained. This adds independently confirmed pilot evidence for srcfl/ftw#1874.

Change

  • Expose pilot_a, pilot_observed_at, pilot_confirmed_at_ms and dynamic_limit_a separately.
  • Refresh an observation's confirmation only when that REST/SignalR observation is accepted. Reading other observations does not refresh it.
  • Keep unchanged old source timestamps usable when freshly confirmed, while rejecting missing, expired or future evidence before pilot/allocation values can explain a limit.
  • Preserve fix(easee_cloud): report Easee's load balancing below FTW's order (1.4.4) #194's command, ordering, allocation and safety behavior.
  • Propose easee_cloud 1.5.0 for the added telemetry; regenerate catalog metadata and add a changelog entry.

Dependency

Stacked on #194 at 34347fb92b08474b52e6240b28e78498110ba580, targeting easee-allocated-limit. This extends that work without rewriting or replacing it. Paired Core extension: srcfl/ftw#1905 (stacked on srcfl/ftw#1537). After driver integration, FTW still needs a separate pin/snapshot update to the merged driver commit; this PR does not publish a signed artifact.

Validation

  • Exact PR tree: make test-driver ID=easee_cloud: 44 passed, 15 skipped.
  • Exact PR tree: make check: 4,992 passed, 936 skipped; generated metadata and whitespace checks passed.
  • Added harness covers separate 13 A pilot / 15 A setting, constant old source timestamp freshly confirmed by REST, missing observations not refreshing the pilot, zero pilot, no invented limit and future timestamps.

On 27 October 2026 the paired logic ran locally on FTW v0.157.2-beta.1+local.2 with an Easee cloud charger and Audi e-tron. The live driver was the same logic with unpublished 1.4.1 metadata; this PR's 1.5.0 is a version/catalog change, not a second hardware-tested binary.

  1. With the car allowed to charge: 15 A request, 15 A pilot and approximately 10.46 kW; Following FTW.
  2. Natural charger allocation: request/setting 15 A, pilot/allocation 13 A, approximately 8.93 kW. Six consecutive settled samples over about 54 seconds showed Core load_balancer_limit/info, and the actual EV sheet displayed “Limited by the charger’s load balancing” without a red warning.
  3. Releasing the temporary hold returned to plan, 0 A pilot and 0 W; no persistent goal or protection limit was changed.

This is one-site evidence. Charger model/firmware identifiers were not captured, and no claim is made about the exact internal allocation algorithm or which household load triggered it. Communication-loss/recovery and release-of-load-balancing transitions were not hardware-tested here; freshness/order regressions are software evidence. Keep draft pending dependency integration, CI and remaining device identification/review. No site configuration, credentials, raw household history or device identifiers are committed.

frahlg and others added 5 commits October 25, 2026 19:11
…4.1)

A tester's trace (srcfl/ftw#1763, 23 Oct 2026) showed FTW ordering 15 A
and the charger reading back 15 A, while Easee's circuit allocation
(observations 70-72) and the current it signalled to the car (114) fell
to 12, 14 and 13 A. FTW said "Not following".

Read 70-72 and 114. Emit current_limit_a, the signalled current, while
the car charges and it is more than half an amp below the order the
charger holds (48), and only when it answers that order: recorded at or
after it, or unchanged for 30 s since. Emit current_limited_by =
"load_balancer" only when the allocation is below the order too and no
higher than the signalled current. ReasonForNoCurrent is not used as a
cause. Reason labels follow Easee's table (from srcfl#172).

Port the REST ordering check from srcfl#183: while a car is connected, a
reply whose power time goes back, conflicts at one instant or cannot be
read is not used. Times compare as instants across offsets. The order
starts again on disconnect or after 30 s of replies that go back, so a
stamp from the future cannot hold the driver silent.

Co-authored-by: Segran <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Fredrik Ahlgren <[email protected]>
- An unreadable power time no longer silences the driver for good:
  after 30 s of such replies they are used as they come, as before,
  until a readable time arrives.
- A late "disconnected" reply is held to the same order as any other.
- A failed poll ends a run of held-back replies, so a rejection before
  an outage does not count toward the 30 s.
- A held-back reply does not drop the session proof, which cost one of
  Easee's ten session checks an hour each time.
- Report a limit only while the charger reads back FTW's last order;
  do not name the load balancer when the charger's own static limit
  explains the pilot; a phase with no allocation is not one in use.
- Tests for each, all failing on the previous commit, plus the
  one-phase highest-allocation rule, a finished car, a pilot recorded
  in the same second as the order, and an impossible first date.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Fredrik Ahlgren <[email protected]>
- A failed poll no longer restarts the 30 s count; a gap of more than
  30 s between held-back replies does. Occasional HTTP errors among
  unreadable replies kept the driver silent.
- Skip dropping the session proof only on a poll whose reply was held
  back, not whenever the count is running.
- A one-phase charger with no allocation on any phase does not name the
  load balancer.
- Tests: both cases, and no limit before FTW's first order.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Fredrik Ahlgren <[email protected]>
When Easee lets the car take the order again, the car needs a few
seconds to draw it and the cloud to report that. Core then saw no limit
and a car still below the order, and said "Not following" until the new
draw arrived. Keep the last limit for up to 20 s while the car charges
below the order. Test fails without it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Fredrik Ahlgren <[email protected]>
Pair fresh per-observation pilot evidence with Core feedback for srcfl/ftw#1874.

Signed-off-by: Segran <[email protected]>

@miravoss26 miravoss26 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Easee cloud driver 1.5.0: exposes the charger's confirmed pilot current (pilot_a, pilot_observed_at, pilot_confirmed_at_ms) and dynamic_limit_a as separate fields, only when the REST observation was confirmed recently and isn't in the future.

  • Correctness, fine: confirmed_current rejects NaN, negatives, >80 A, missing source time, stale confirmation (REST_FRESH_MS) and future source times. When host.unix_ms is missing it skips the future check and emits pilot_confirmed_at_ms = 0, which the FTW side (#1905) treats as not fresh. That's the safe direction.
  • Low: observation_confirmed_ms is stamped in note_observation for any wanted id, including values REST re-confirms unchanged. That's intended (the test name in #1905 says so), but it means "confirmed" = "REST returned it again", not "the charger re-sent it". Worth a comment in the code so nobody reads it as a fresh measurement.
  • Low: spec/host-api-profile.json gains four fields, so anything validating against the profile needs to pick them up. CI is green, so presumably done.
  • Security screen: no secrets, no new hosts or dependencies, no authz changes.

Safe to merge from my read. It pairs with srcfl/ftw#1905, which consumes these fields. Merge order doesn't matter, since old drivers keep the old contract.

@segran2

segran2 commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

Hardware validation on the exact PR commit

Tested e384c6404bf368fbe6bb726c7b3add5c8d04b3f4 (Easee Cloud 1.5.0) on 13 November 2026 with an Easee charger and Audi e-tron. The SHA-256 reported by FTW for the installed Lua file matched the file from that commit.

  • The car was plugged in and drawing 0 W before the test.
  • Started charging from FTW in three-phase mode. FTW requested 15 A, and Easee reported a 15 A dynamic limit and a 6 A pilot.
  • Charging started and reached 4.18 kW measured. The driver reported current_limit_a=6 and current_limited_by=load_balancer.
  • Ended the manual charge and restored the local diagnostics driver. Easee was online and reporting 0 W after restoration.

This run covered three-phase startup, pilot reporting and load-balancer attribution under a reduced pilot. Single-phase attribution, release of load balancing during a charge and communication-loss recovery were outside this run.

Easee puts its dynamic current back at its maximum on a resume or a
phaseMode write (32 A reported, srcfl#225). The settings write only reaches the
charger when the cloud's stored value changes, so re-sending the same order
as a setting never undid it: a 7 A order drew 16 A on a 16 A fuse. The
driver now re-sends its order as a set_dynamic_charger_current command 3 s
after a resume or start, after a phaseMode write, and whenever the charger
reports a higher limit or draws over the order (at most every 10 s).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0124SQZZwXFRjnTEvh4SNrjp
Signed-off-by: Erik <[email protected]>

@miravoss26 miravoss26 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

easee_cloud 1.5.0: exposes the effective pilot current (pilot_a, pilot_observed_at, pilot_confirmed_at_ms) separately from the dynamic setting (dynamic_limit_a), and only counts a pilot as confirmed when REST or SignalR actually delivered it.

  • Behavior change to check: answering() now goes through confirmed_current, which also requires the observation to be within REST_FRESH_MS, in range (0-80 A) and not future-dated. A stale-but-settled dynamic readback that was accepted before can now come back nil. Looks intended, but worth confirming it can't flip the existing limit attribution on a quiet charger.
  • The future-time check multiplies value_at by 1000, so it assumes source_time_key returns epoch seconds. I couldn't confirm that from the diff, and the harness test only covers the 2099 case.
  • host.unix_ms is guarded, and the missing-pilot path emits 0 for the confirmation time. Good.
  • Security screen: no secrets, no new hosts or dependencies. Test data is synthetic. CI green.

Needs a human glance at the first point (freshness gate on the existing attribution path); otherwise fine from my read.

erikarenhill and others added 2 commits November 16, 2026 11:25
A re-send that fails after a resume or phaseMode write is now retried every
10 s, not on every poll. When a lower order's settings write fails, re-sends
use that lower order, not the earlier, higher one. A 0 A order still goes out
as a 0 A command: it is the limit Easee's pause sets, and Easee accepted
every 0 A command on a real charger. The code and test now quote Easee's
documentation for minutes = 0: the limit holds until the next one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0124SQZZwXFRjnTEvh4SNrjp
Signed-off-by: Erik <[email protected]>
Easee's Equalizer can hold a start for up to 15 minutes after household
use falls (Easee support, srcfl/ftw#1948). The car then draws nothing
while the charger reads back FTW's order, and Core reported a failed start.

While the car draws nothing and the charger holds an order of at least
6 A, report current_limit_a as the current the load balancing allows and
current_limited_by = "load_balancer" when that is below 6 A. Evidence is
the allocation on all three phases (70-72), or else a reason in which
Easee names the Equalizer (10 or 28), recorded in the charger's current
state. Reason 78 is not evidence: FTW writes that setting too.

Refs srcfl/ftw#1948. Stacked on srcfl#194.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Fredrik Ahlgren <[email protected]>
@frahlg

frahlg commented Nov 21, 2026

Copy link
Copy Markdown
Member

Thanks for the test on the exact commit: 15 A requested, Easee reported a 15 A dynamic limit and a 6 A pilot, and the driver reported current_limit_a=6 with current_limited_by=load_balancer. We have not reviewed the code yet. It changes easee_cloud.lua as #183 and #227 do, so the three need one merge order, and your version number will change. We will say the order here.

frahlg added a commit to srcfl/ftw that referenced this pull request Nov 21, 2026
…s its limit (#2062)

#2056: a steady Easee charge under load balancing (13 A order
and readback, 8 A pilot, 5.44 kW) read Not following for 15 s between
two pilot confirmations a minute apart, though the pilot was still
fresh. The load-balancing verdict needed the driver's current_limit_a;
without it nothing explained the draw, and the mismatch clock, running
since the limit began, made the verdict Not following at once.

The test driver, built on srcfl/device-drivers#200, withholds its limit
for up to 30 s after its order reading moves. While the driver reports
no limit, a fresh pilot below the order now explains a draw that
matches it, as limited/charger_pilot_limit/info. Only the driver can
name the load balancing. A car taking far less than the pilot is still
Not following.

Refs #2056

Signed-off-by: Fredrik Ahlgren <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
srcfl#183 landed as 1.4.2 and requires a source time on power, so the
re-send harness now stamps its power readings.

Signed-off-by: Fredrik Ahlgren <[email protected]>
Main now orders power with srcfl#183's watermark (1.4.2), so this branch drops
its own REST reply ordering and keeps the allocation and pilot reporting.
The start-boost rejection tests from this branch stay, on main's harness.

Signed-off-by: Fredrik Ahlgren <[email protected]>
An Equalizer reason now counts only when it and the charger state both
carry a readable source time (Codex P2 on srcfl#236), with a harness case past
the 30 s order settle.

Signed-off-by: Fredrik Ahlgren <[email protected]>
Main's source_time_key is days and seconds, not plain seconds, so the
future-pilot check converts the key back to Unix ms (as floats: host
integers may be 32-bit). note_observation is the srcfl#183 one, plus the pilot
confirmation times.

Signed-off-by: Fredrik Ahlgren <[email protected]>
@frahlg
frahlg deleted the branch srcfl:easee-allocated-limit November 24, 2026 15:46
@frahlg frahlg closed this Nov 24, 2026
@frahlg frahlg reopened this Nov 24, 2026
@frahlg
frahlg changed the base branch from easee-allocated-limit to main November 24, 2026 15:51
Main carries srcfl#194 and srcfl#236 as squashes of the branches already merged here.

Signed-off-by: Fredrik Ahlgren <[email protected]>
@frahlg
frahlg merged commit b234721 into srcfl:main Nov 24, 2026
5 checks passed
@frahlg

frahlg commented Nov 24, 2026

Copy link
Copy Markdown
Member

Merged as easee_cloud 1.5.0, after #183 (1.4.2), #227 (1.4.3), #194 (1.4.4) and #236 (1.4.5).

The merge needed one change in your code. main's source_time_key is now #183's format: seven digits of days, then five of seconds. So tonumber(value_at) * 1000 no longer gave Unix ms, and every pilot looked future-dated. A small source_key_unix_ms now converts the key back. It uses floats because the host's Lua integers may be 32-bit. That surfaced as a negative timestamp in the harness. test_easee_cloud_pilot_freshness passes. note_observation is #183's version, plus your confirmation times.

On Mira's quiet-charger question: every REST read, once a minute while streaming, re-confirms an unchanged pilot. So the 90 s freshness should not flip the attribution while REST answers.

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.

4 participants