Repository navigation
Conversation
…(1.3.1) FTW Core keys a device on its serial number, and its saved forecast receipt holds it. saj 1.3.0 asked the identity block first in every poll and the BMS block on every poll, both with three tries for the life of the process. An inverter asleep at start-up, or held by another Modbus client, used up those tries while answering nothing: the serial never reached Core and the battery was never reported. Both blocks are now asked only in a poll whose live power block answered, and the identity block last, so a timeout there cannot make the host skip the poll's other reads. After three misses on an inverter that does answer, a register is asked again every five minutes instead of never. The live power block is still asked on every poll. A new harness, test_wakes_after_silence.lua, compares a driver with a healthy run of itself after a silent start, after a silent spell mid-session, and after each register is refused six times. 1.3.0 fails it; 1.3.1 passes. 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. |
This was referenced Dec 4, 2026
miravoss26
reviewed
Dec 5, 2026
miravoss26
left a comment
There was a problem hiding this comment.
Identity and BMS reads now happen only when the live power block answers, and a given-up register is retried every five minutes instead of never.
- Low:
read_identityno longer has its own attempt bound. If 0x8F00 answers but the serial decodes empty,probe_readclears the failure count andsn_readstays false, so the block is read on every poll for the whole session (before: three times). Suggest counting an empty serial as a miss, or spacing it byRETRY_EVERY_MS. - Security screen: no secrets, new dependencies or network destinations seen in the driver diff.
I read the driver diff only and did not run the tests. Safe to merge from my read; the point above is a small follow-up.
This branch has not been deployed
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.
Problem
FTW Core keys a device on its serial number, and its saved forecast receipt holds it. saj 1.3.0 asked the identity block (0x8F00) first in every poll with its own
sn_triescount, and the BMS block (0xA000) on every poll, each with three tries for the life of the process. An inverter asleep at start-up, or held by another Modbus client, used up those tries while answering nothing. The serial then never reached Core, so its forecast identity check stayed pending, and the battery was never reported until FTW restarted the driver. This is the fault #298 fixed for SolarEdge.Change
sn_triesis gone.Test evidence
drivers/tests/lua_harness/test_wakes_after_silence.lua, run bytest_saj_wakes.py. It runs the driver healthy, then compares three cases with that run: asleep fromdriver_initfor eight polls then awake; silent for eight polls mid-session; and each register the healthy run reads refused for six polls while the rest answer, which must be asked again within five minutes. After waking, the driver must emit the same kinds, report the same serial and read the same registers.1.3.0 fails it:
asleep at start-up: no battery emitted after the device answered.make test-driver ID=saj: 124 passed, 21 skipped.make absent-register-report ID=saj: every address settles except 16549, the live power block, which emits nothing while it fails (allowed).make check: 5575 passed, 927 skipped.The harness is shared: the other driver PRs in this series add the same file, byte for byte, so they merge cleanly in any order.
Not yet verified
experimental. The case needs an H2/HS2 that is off or held by another client when FTW starts.drivers/BUNDLED_SOURCE.jsonhas to move.🤖 Generated with Claude Code