Repository navigation
Conversation
Every read went through a guard that left a register alone until restart after three misses. An inverter asleep at start-up, or held by another Modbus client, used up every try while answering nothing, so the driver sent nothing until FTW restarted it. The battery registers were among them, so a hybrid's battery would have looked absent, as on a PV-only inverter. A miss now counts only in a poll where another read answered, and a register given up is asked again every five minutes. Whether a battery is there is still decided on each poll from the values that answered. 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
growatt 2.2.2 read every register through
probe_read, which leaves a register alone until restart after three misses. An inverter asleep 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.The battery registers (1009, 1011, 1013, 1014) went through the same guard. The driver decides on each poll whether a battery is there, from the values that answered. After a silent start those registers were given up, so a hybrid inverter's battery would have looked absent for the session, as on a PV-only inverter.
Change
probe_readitself;read_inputalready refused it.growattis not ininvented-number-baseline.json.Test evidence
test_growatt_wakes.py, eight tests; four fail on 2.2.2 and all pass on 2.2.3:test_wakes_after_silence.lua(shared harness): silent from start-up, silent mid-session, each register refused six times;test_growatt_battery_now.py(5),test_growatt_battery_sign.py(2),test_growatt_never_fabricate.py(13) andtest_growatt_pv_only_battery.py(3) pass unchanged.make test-driver ID=growatt: 80 passed, 5 skipped.make absent-register-report ID=growatt: all 21 addresses SETTLED 1.make invented-number-report ID=growatt: none.make check: 5582 passed, 927 skipped.Not yet verified
experimental. The case needs a Growatt SPH or MOD that is asleep or held by another client when FTW starts.wwhen voltage or SoC answered but the charge or discharge power did not.test_growatt_never_fabricate.pypins that on purpose. The rule in this series is that a stream goes out only when its power answered; whether growatt should follow it is for the owner to decide.CHANGELOG.mdand the shared harnessdrivers/tests/lua_harness/test_wakes_after_silence.luaare touched by the other PRs in this series; whichever merges later needs a rebase there.drivers/BUNDLED_SOURCE.jsonhas to move.🤖 Generated with Claude Code