Repository navigation
Conversation
Every read went through a guard that left a register alone until restart after three misses. A GX booting or restarting when FTW started, or held by another Modbus client, used up every try while answering nothing, and the driver then sent nothing until FTW restarted it. A miss now counts only in a poll where another read answered, so a silent GX uses up no tries and is read again on the first poll it answers. A register that misses three times on a GX that does answer is asked again every five minutes. PV, meter and battery go out as before: PV is the sum of the parts that answered, the meter only with 820, the battery only with 840. The driver still reads no serial. test_victron_wakes.py fails on 2.2.2 (4 of 7 cases) and passes on 2.2.3. The three that pass on 2.2.2 check streams left out, which 2.2.2 already did. 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 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
victron 2.2.2 read every register through
probe_read, which leaves a register alone until restart after three misses. A GX booting or restarting when FTW started, or held by another Modbus client, used up every try while answering nothing. The driver then sent nothing until FTW restarted it.2.2.2 already left out fields and streams whose register did not answer, so it has no line in the invented-number baseline.
Change
probe_readchecks every word it asked for, not just the first.driver_pollis nowpoll_onceplus the bookkeeping;driver_cleanupresets the counts.Left as it was on purpose: PV is still the sum of the parts that answered (808 AC-coupled, 850 DC-coupled), the meter goes out only with 820, the battery only with 840, and the driver still reads no serial (the system service on unit 100 has none, see
driver_init). It stays read-only.Test evidence
test_victron_wakes.py, seven tests; four fail on 2.2.2 and all pass on 2.2.3:test_wakes_after_silence.lua(shared with the other PRs in this series): silent from start-up, silent mid-session, each register refused six times;The three that pass on 2.2.2 check that PV, meter or battery is left out when its power does not answer, which 2.2.2 already did.
test_victron_battery.pyandtest_victron_meter_pv.pypass unchanged.make test-driver ID=victron: 140 passed, 9 skipped (the-k victronfilter also picks upvictron_mqtt).make absent-register-report ID=victron: all 4 addresses print SETTLED 1.make invented-number-report ID=victron: none.make check: 5581 passed, 927 skipped.Not yet verified
CHANGELOG.mdand the shared harnesstest_wakes_after_silence.luaare touched by the other driver PRs in this series; whichever merges later needs a rebase there.drivers/BUNDLED_SOURCE.jsonhas to move.🤖 Generated with Claude Code