Repository navigation
Conversation
The measurement block, the identity block and the device limit all went
through a guard that left a register alone until restart after three
misses. A charger that was off at start-up, or held by another Modbus
client, used up every try while answering nothing. Core reloads a driver
with nothing left to read only if an earlier read had succeeded, so the
driver then sent nothing until FTW restarted it, and never read the
serial number Core keys the device on.
The measurement block is now asked on every poll and never given up.
The device limit and the identity block are asked only in a poll where
it answered, the identity last. A register that misses three times on a
charger that does answer is asked again every five minutes.
test_wakes_after_silence.lua fails on 1.1.1 ("asleep at start-up: no ev
emitted after the device answered") and passes on 1.1.2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
miravoss26
left a comment
There was a problem hiding this comment.
Stops etrel 1.1.1 from going permanently silent when the charger doesn't answer at start-up: the measurement block is asked every poll, limit and identity only once it answers, and given-up registers are retried every 5 min. Version, hashes and catalog entries bumped to 1.1.2.
- blocker for merge: GitHub reports the branch as conflicting with base. Rebase needed, then re-check size/sha256 in
index.yamlandmanifests/etrel.yaml. - minor, question:
read_identity()now runs at the end ofdriver_poll, so the first emit after wake-up goes out before the serial is set (drivers/lua/etrel.lua). Is Core fine with that for device keying? - note: no hardware run, as the description says.
- Security screen: no secrets, new dependencies, new network destinations or authz changes seen. Control path unchanged.
Logic reads fine to me. Not safe to merge as is only because of the conflict. I read the diff and CI results; I did not run the tests myself.
Problem
etrel 1.1.1 read its measurement block (input 0, 32 registers), the identity block and the device limit through
probe_read, which leaves a register alone until restart after three misses. A charger that was off when FTW started, or held by another Modbus client, used up every try while answering nothing. The driver's own comment counted on Core reloading it once nothing is left to read, but Core does that only if an earlier read had succeeded. So after a silent start the driver sent nothing until FTW restarted it, and the serial Core keys the device on was never read.Change
Test evidence
test_wakes_after_silence.lua(shared with fix(saj): read the serial and battery again after the inverter wakes (1.3.1) #301), run bytest_etrel_wakes.py: silent from start-up, silent mid-session, each register refused six times. 1.1.1 fails:asleep at start-up: no ev emitted after the device answered.make test-driver ID=etrel: 42 passed, 14 skipped (the control tests included).make absent-register-report ID=etrel: every address settles except the measurement block, which emits nothing while it fails (allowed).make invented-number-report ID=etrel: none.make check: 5575 passed, 927 skipped.Not yet verified
drivers/BUNDLED_SOURCE.jsonhas to move.🤖 Generated with Claude Code