Repository navigation
Conversation
Signed-off-by: Segran <goran@andersson-stehag.se>
Signed-off-by: Segran <goran@andersson-stehag.se>
miravoss26
reviewed
Nov 22, 2026
miravoss26
left a comment
Contributor
There was a problem hiding this comment.
What it does: adds an opt-in, read-only Python collector that polls the local FTW API every 5 s and writes rotating JSONL (1 MB × 5) around Easee charge starts/stops, with a 30 s in-memory prehistory. No change to charging behaviour; not part of a standard install.
Security screen: clean. Only 127.0.0.1:8080 GETs, no new deps, no subprocess/eval, log path comes from argv. The only exec_module is in the test loading the script.
Findings
- nit:
scripts/easee-start-diagnostics.pyhardcodes/api/drivers/pixiifor the grid meter andeasee-cloudas driver. On a box without a Pixii the grid-current fields silently come out empty. Fine for the diagnostic box this targets; worth a comment or a flag. - nit: the test file is 57 lines for 461 lines of logic. The status/pilot freshness classification (
pilot_sample,paired_evidence) is the part I'd most want covered. I did not run the tests; CI is green.
Safe to merge from my read.
Signed-off-by: Segran <goran@andersson-stehag.se>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #1975 and #1948.
Add an opt-in, read-only collector for Easee charging starts and stops. It reads the local FTW API, retains 30 seconds of prehistory in memory, and writes bounded rotating JSONL logs when an event is captured. It records the sent order, phase changes, resume acknowledgements, pilot and power evidence with separate source and confirmation times, and the vehicle SoC and charge limit when available.
The captured data helps distinguish a vehicle-side stop with a positive pilot from a charger that holds the pilot at zero. The collector does not change charging behavior or run as part of a standard FTW installation.
To check the local API fields without writing a log, run
python3 scripts/easee-start-diagnostics.py --probeon the box. For continuous capture, pass a writable JSONL path.Validation
python3 scripts/test_easee_start_diagnostics.pypassed. It checks a newly reported 0 W sample after a stable positive reading with an older source timestamp. It also checks stale power, stale pilot and a zero FTW order.confirmed_no_drawlive. The vehicle limit was supplied by the operator. Hardware timelineReview follow-up
easee-cloudfor charger reads andpixiifor grid phase currents. On boxes without a driver namedpixii, the grid phase-current fields are empty.31572baadds direct tests for pilot source-timestamp freshness and paired evidence. The cases cover fresh, stale, future and missing pilot timestamps, stale power, zero versus positive pilot with no draw, and fresh allocation versus stale or missing grid phase samples.python3 scripts/test_easee_start_diagnostics.py -vpassed all three tests.