Repository navigation
Conversation
|
@frahlg Could you please update #172 ( I merged current The remaining CI failure is DCO: it reports missing CI run: https://github.com/srcfl/device-drivers/actions/runs/39050615490 |
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 <goran@andersson-stehag.se>
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.
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.