Repository navigation
fix(easee_cloud): reject out-of-order power observations - #183
Conversation
miravoss26
left a comment
There was a problem hiding this comment.
Easee cloud driver 1.3.9: rejects out-of-order or conflicting power observations (compares RFC3339 source instants normalised to UTC), and adds a one-shot 7 A "start boost" for 6 A orders to work around the ~5 min Easee start delay.
- Correctness, fine:
power_time_keyhandles offsets, fractions and leap days, and the zero-padded key compares correctly as a string. Disconnect resets the ordering. Boost is bounded (90 s, once per start, gated oncap_amps_per_phase,max_aand the device limit all allowing 7 A) andstart_boost: falseturns it off. Tests cover both paths and CI is green. - Low, worth a thought: a charger that reboots while a car stays connected and restarts its clock behind the last accepted timestamp will have every poll rejected as "out-of-order" until it passes the old value. The disconnect reset covers the normal case, but there's no timeout or escape hatch for this one. Maybe a reset after N consecutive rejections.
- Low: this PR carries two unrelated behaviours (observation ordering and start boost) under one version bump. Fine to ship together, just noting that a revert would take both.
- Note: the boost deliberately offers 1 A above what Core ordered. The
cap_amps_per_phaseguard is what keeps that safe, and a Core that doesn't send the cap gets no boost. Good default. - Security screen: no secrets, no new hosts or dependencies, no authz changes.
Safe to merge from my read. The field-data claim (4 runs, 22 Oct) is the author's, so I couldn't verify it. The PR itself says the ordering fix isn't hardware-verified yet.
|
Review (Claude CLI, 2026-11-12): do not merge this PR as it stands. Merging would squash into Blockers
The ordering logic on this branch is otherwise sound (RFC3339 comparison, same-instant conflicts, measured-zero rules, disconnect reset). During the rebase, please also add an escape hatch for a bogus future timestamp or a charger clock that jumps backwards — today that can reject every later poll until disconnect — plus tests for that path and for a mode-1 reset. CI being green on a7b6a3d only covers the stale #172 base, not current main. |
a7b6a3d to
a83417e
Compare
Signed-off-by: Segran <[email protected]>
a83417e to
c9b4a88
Compare
miravoss26
left a comment
There was a problem hiding this comment.
Summary: easee_cloud 1.4.2. Orders TotalPower by parsed RFC3339 source instant across REST and SignalR, so an older or conflicting reading can't replace a newer one. Mode 1 resets the watermark, and a backwards clock recovers after 30 s of advancing readings. Version, index, manifest and sha bumps are consistent with the driver change.
Findings:
- nit, drivers/lua/easee_cloud.lua:~108-140 (power_problem): recovery needs
key > recovery_keyafter 30 s. A source whose clock stays on the lower timeline but only repeats a coarse stamp (same second, changing values) stays rejected indefinitely and the driver reports blocked. Probably acceptable (it logs a warn and retries every 10 s), but worth knowing for chargers with 1 s stamp resolution and fast-changing power. - nit, easee_cloud.lua:~1058 (driver_poll):
apply(OBS_TOTAL_POWER)rejection now skips the remaining observations for that poll (session id, energy, etc.). Intended as far as I can tell (the whole read is treated as a problem), just noting that one bad power stamp holds the rest of the snapshot too. - info, test_easee_cloud_stream.lua: existing tests were edited to add stamps and to flip two assertions ("a pushed sample applies even when older" now means the opposite). That matches the new intent and is called out in the diff, so fine.
- Security screen: no secrets, no new hosts, no new dependencies, no authz changes. Pure Lua + metadata.
The hardware validation in the description (REST fallback, SignalR, 6 A boost) covers the realistic paths well. The 32 A reading discrepancy is correctly parked for #225.
Safe to merge from my read. Reminder from the description: bump FTW's bundled-driver pin after merge.
|
Follow-up to frahlg’s November 12 review. The PR now targets Easee Cloud is now at 1.4.2 with regenerated manifest metadata. REST and SignalR share the RFC3339 parser and validate power in The driver can recover from a bogus future timestamp or a backwards clock jump after 30 seconds if the lower source timestamps advance. Mode 1 clears the power watermark. The tests cover future-dated REST power, a backwards jump on SignalR, and the mode-1 reset. Repeated identical timestamps do not qualify for clock recovery.
|
|
@frahlg, the follow-up to your November 12 review is ready for another look. It covers the REST and SignalR timestamp handling, recovery after clock jumps, and the passing checks on |
miravoss26
left a comment
There was a problem hiding this comment.
Easee Cloud 1.4.2: one RFC3339 parser that compares instants (offset + fraction), a power-ordering watermark shared by SignalR and REST, rejection of older power / conflicting values at one instant / connected power without a valid timestamp, and a 30 s strictly-advancing recovery path for a future timestamp or clock jump. Resets on mode 1.
Read the whole diff, no blocking findings.
- Security: nothing. No new hosts or deps, and the error text still goes through
redact_http_err. - Checked:
source_time_keyproduces a zero-padded day/second key plus a trailing-zero-stripped fraction, so plain string comparison orders correctly ("12" < "5" for .12 vs .5). Thegsubtwo-value return is safe in that assignment. Missing TotalPower on REST in mode ≥2 was already astate_problem, so applying power unconditionally doesn't add a new failure. - Needs a human eye (operational): after a rejected power observation,
stream_power_problemblocks all reporting until a valid newer reading lands, and a lower-timeline recovery needs ≥30 s plus two advancing readings. A single bad future-dated packet therefore blinds the driver for at least ~30 s. That seems an intended trade for "never report a stale 0 W", but it's the behaviour I'd want a field run to confirm on a real charger, since the PR itself says the cause of the ftw#1674 incidents is still unproven. - Nit: the recovery state machine (
recovery_key/recovery_since) is subtle. A short comment with the timeline (accept at t≥30 s when key > recovery_key) would help the next reader.
Safe to merge from my read; I'd want the on-charger confirmation above before relying on it for #1674.
|
We saw the follow-up. The branch now targets main and has no conflicts. We have not read the shared RFC3339 parser or the 30 s recovery rule yet. Both this PR and #227 use version 1.4.2, so one must rebase after the other lands. We will say which here. |
miravoss26
left a comment
There was a problem hiding this comment.
What it does: easee_cloud now orders power observations by source instant across SignalR and REST, with a full RFC3339 parser (offsets, fractions), a conflict check for the same timestamp, and a 30 s recovery window when the source clock goes backwards.
I traced the main paths: out-of-order stream packet, REST older than a healthy stream, same-instant conflict, clock recovery, and the op-mode 1 reset. I found no defect. This is a dense state machine though, so I would not call my read exhaustive.
- note: after a backwards clock jump, power is held back for at least 30 s (
POWER_CLOCK_RECOVERY_MS). Reasonable, but it means up to ~30 s without power telemetry after a charger clock reset. Worth confirming that is acceptable for dispatch. - nit:
source_time_keynow returns a string key built with%07d%05d, so comparison relies on fixed width. Fine until year 2243 or so, but a comment would help the next reader. - security screen: no secrets, no new dependencies, no new hosts.
Needs a human decision on the 30 s blackout, otherwise looks fine from my read. CI is green on f8786b5.
|
Follow-up to Mira’s question about the 30-second telemetry gap:
srcfl/ftw#1674 is closed. A charger clock jump remains an unconfirmed explanation for that incident. |
Signed-off-by: Segran <[email protected]>
miravoss26
left a comment
There was a problem hiding this comment.
Ports the Easee Cloud observation-order fix to 1.4.2: REST and SignalR TotalPower now compare on one UTC timeline, older or conflicting readings can't replace newer power, a disconnect clears the watermark, and a backwards source clock recovers after 30 s of strictly advancing readings. CI is green (5/5) and the new regression test reproduces the 10.242 kW then 0 W case.
- Question, driver_poll: a REST reply with a missing/invalid power stamp now returns a
problemfor the whole poll (apply(OBS_TOTAL_POWER)result), so the other observations in that reply are skipped too, and the next poll is retried in 10 s. Is dropping the full reply intended, or should the other ids still apply? - Nit:
source_time_keyhand-rolls epoch-day math (leap years, offsets). Looks right to me (checked leap handling and the fraction strip), but a table-driven test around month ends, a leap day and a non-UTC offset would pin it. - No secrets, new hosts or dependencies in the diff.
Safe to merge from my read once the question above is answered. The root cause for srcfl/ftw#1674 is still field evidence, as the description says.
Signed-off-by: Segran <[email protected]>
283b0e9 to
283cfb5
Compare
Signed-off-by: Segran <[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 #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]>
…4.4) (#194) * fix(easee_cloud): report Easee's load balancing below FTW's order (1.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 #172). Port the REST ordering check from #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]> * fix(easee_cloud): review fixes to the limit and the ordering check - 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]> * fix(easee_cloud): second review pass on the escape and one-phase cause - 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]> * fix(easee_cloud): keep the last limit while the car catches up 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]> * fix(easee_cloud): re-send the current limit as a command (1.4.2) Easee puts its dynamic current back at its maximum on a resume or a phaseMode write (32 A reported, #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]> * fix(easee_cloud): space failed re-sends and keep a failed cut (1.4.2) 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]> --------- Signed-off-by: Fredrik Ahlgren <[email protected]> Signed-off-by: Segran <[email protected]> Signed-off-by: Erik <[email protected]> Co-authored-by: Segran <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Erik <[email protected]>
) * fix(easee_cloud): report Easee's load balancing below FTW's order (1.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 #172). Port the REST ordering check from #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]> * fix(easee_cloud): review fixes to the limit and the ordering check - 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]> * fix(easee_cloud): second review pass on the escape and one-phase cause - 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]> * fix(easee_cloud): keep the last limit while the car catches up 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]> * fix(easee_cloud): re-send the current limit as a command (1.4.2) Easee puts its dynamic current back at its maximum on a resume or a phaseMode write (32 A reported, #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]> * fix(easee_cloud): space failed re-sends and keep a failed cut (1.4.2) 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]> * fix(easee_cloud): report when load balancing holds a start (1.4.4) 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 #194. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Fredrik Ahlgren <[email protected]> --------- Signed-off-by: Fredrik Ahlgren <[email protected]> Signed-off-by: Segran <[email protected]> Signed-off-by: Erik <[email protected]> Co-authored-by: Segran <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Erik <[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]>
…0) (#200) * fix(easee_cloud): report Easee's load balancing below FTW's order (1.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 #172). Port the REST ordering check from #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]> * fix(easee_cloud): review fixes to the limit and the ordering check - 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]> * fix(easee_cloud): second review pass on the escape and one-phase cause - 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]> * fix(easee_cloud): keep the last limit while the car catches up 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]> * feat(easee_cloud): expose separately confirmed pilot current (1.5.0) Pair fresh per-observation pilot evidence with Core feedback for srcfl/ftw#1874. Signed-off-by: Segran <[email protected]> * fix(easee_cloud): re-send the current limit as a command (1.4.2) Easee puts its dynamic current back at its maximum on a resume or a phaseMode write (32 A reported, #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]> * fix(easee_cloud): space failed re-sends and keep a failed cut (1.4.2) 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]> * fix(easee_cloud): report when load balancing holds a start (1.4.4) 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 #194. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Fredrik Ahlgren <[email protected]> --------- Signed-off-by: Fredrik Ahlgren <[email protected]> Signed-off-by: Segran <[email protected]> Signed-off-by: Erik <[email protected]> Co-authored-by: Fredrik Ahlgren <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Erik <[email protected]>
|
Thanks @segran2. This landed on Here is what happened next, all on top of your fix:
So the merge order we promised is done. All four are on |
Since 1.4.2 (#183) op_mode 1 clears TotalPower, and Easee's cloud records TotalPower only when it changes, which needs a car. After every driver start with no car, the ev sample said control_power_available=false until a car was plugged in. FTW Core then marked the EV flow unknown_power and lost Home use for those hours. When a read the driver vouches for shows op_mode 1, the charger is online and has no car, so it draws nothing. The ev sample now carries 0 W as known and confirmed, with op_mode's source time as control_power_observed_at. power_observed_at stays out, as for any unchanged value. TotalPower still cannot be noted while op_mode is 1, and the ordering checks from #183 still apply once a car is connected. Closes #289 Signed-off-by: Fredrik Ahlgren <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Problem
An older Easee Cloud TotalPower observation can replace a newer one. The regression harness reproduces a 10.242 kW reading followed by an older 0 W reading. This demonstrates the driver behavior. The cause of the individual incidents in srcfl/ftw#1674 still needs field evidence.
Fix
main, where SignalR supplies live updates and REST supplies fallback snapshots and periodic confirmation. The ordering fix is independent of the load-balancer reporting in fix(easee_cloud): report a load-balancer limit while the car charges #172.Validation
make test-driver ID=easee_cloudpassed with 43 tests and 15 skips. Coverage includes REST and SignalR ordering, equivalent timestamps, measured zero, clock recovery, mode-1 reset, and the existing start-boost regressions.Hardware validation
Tested exact driver commit
c9b4a8812a412b0cd50ab06456dbcc602eaaf197on 12 November 2026 (CET), using FTW Core v0.163.0-beta.1 with local diagnostics, an Easee charger and an Audi e-tron.Follow-up
In the first capped test, Easee reported a 32 A dynamic setting and measured power reached 6.14 kW despite the 6 A offer and reassertion. In the repeat, Easee again briefly reported 32 A before reading back 6 A, with measured power within the 4.14 kW cap. The 32 A value is a reported setting. The cause of the discrepancy is unresolved and belongs to the phase/current trace investigation in #225.
The boost timeout and synthetic clock jumps were exercised in regression tests. The hardware runs exercised the boost's step-down on measured charging. The original driver and FTW configuration were restored after testing.
After merge, advance FTW's bundled-driver pin so the fix reaches offline gateways.
Vendor references: Get observations, observation IDs, SignalR stream.