Repository navigation
Conversation
Every read went through a guard that left a register alone until restart after three misses. A gateway that was off, restarting or held by another Modbus client at start-up used up every try, and the driver then sent zeros until FTW restarted it. A battery status that did not answer read as idle, so the battery went out as 0 W. A miss now counts only in a poll where another read answered, and a register given up is asked again every five minutes. A field whose register did not answer is left out. PV goes out only when 60069 answered, the battery only when 60071 and 60067 answered, the meter only when 60073 answered. Control is unchanged. 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
atmoce 1.1.1 read every register through
probe_read, which leaves a register alone until restart after three misses. A gateway that was off, restarting or held by another Modbus client when FTW started used up every try while answering nothing. The driver then sent PV, battery and meter streams full of zeros until FTW restarted it.A register that did not answer went out as zero (13 fields in the invented-number baseline). The ESS status defaulted to 99 (idle) when it did not answer, so the battery went out as 0 W even when the power register had answered.
Change
driver_commandanddriver_default_modeare unchanged; they write and never read.driver_cleanupresets the guard and the poll state.atmoceleavesinvented-number-baseline.json.Test evidence
drivers/tests/test_atmoce_wakes.py, 11 tests. 7 fail on 1.1.1 and pass on 1.1.2:test_wakes_after_silence.lua(shared with the rest of the series): silent from start-up, silent mid-session, each register refused six times;The other 4 pass on both and guard what must not change: the battery sign for status 1, 2 and 99, and the charge command's writes after a silent start.
make test-driver ID=atmoce: 59 passed, 6 skipped.make absent-register-report ID=atmoce: every address prints SETTLED 1.make invented-number-report ID=atmoce: none.make check: 5585 passed, 927 skipped.Not yet verified
DRIVERtable, as onmain; this PR does not add one.CHANGELOG.md,drivers/tests/lua_harness/test_wakes_after_silence.luaandinvented-number-baseline.jsonare shared with the other PRs in this series; whichever merges later needs a rebase there.drivers/BUNDLED_SOURCE.jsonhas to move.🤖 Generated with Claude Code