Repository navigation
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.
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.