Repository navigation
Conversation
abb_meter 1.0.7, acrel 1.0.5, carlo_gavazzi 1.0.6, chint 1.0.6, circutor 1.0.6, janitza 1.0.6, schneider_meter 1.0.6, siemens_pac 1.0.6 and socomec 1.0.5 share one template. Every read went through a guard that left a register alone until restart after three misses. A meter that was off, restarting or held by another Modbus client at start-up used up every try while answering nothing, and the driver then sent nothing until FTW restarted it. A register that did not answer went out as 0, and the float meters sent NaN as 0 too. A miss now counts only in a poll where another read answered, so a silent meter uses up no tries and is read again on the first poll it answers. A register that misses three times on a meter that does answer is asked again every five minutes. A field whose register did not answer, or that holds NaN, is left out, and the meter goes out only when its total power answered. chint no longer sends L2 and L3 power as 0, since it never reads them. All nine leave the invented-number baseline. test_meter_wakes.py fails on the old drivers (42 of 42 cases) and passes on the new ones. 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
Nine meter drivers share one template: abb_meter, acrel, carlo_gavazzi, chint, circutor, janitza, schneider_meter, siemens_pac and socomec. Each read every register through
probe_read, which leaves a register alone until restart after three misses. A meter that was off, restarting or held by another Modbus client when FTW started used up every try while answering nothing. The driver then sent nothing until FTW restarted it.A register that did not answer went out as 0: a silent meter reported 0 W, 0 V and 0 Hz (13 fields each in the invented-number baseline). The float meters also sent NaN and infinity as 0, and chint sent L2 and L3 power as a fixed 0 it never read.
Change
complete()checks every word of a reply, not just the first.invented-number-baseline.json.Versions: abb_meter 1.0.7, acrel 1.0.5, carlo_gavazzi 1.0.6, chint 1.0.6, circutor 1.0.6, janitza 1.0.6, schneider_meter 1.0.6, siemens_pac 1.0.6, socomec 1.0.5.
Test evidence
test_meter_wakes.py, 42 cases over the nine drivers; all 42 fail on origin/main and pass here:test_wakes_after_silence.lua(the harness shared with fix(sungrow): keep reading the serial and device type after the inverter wakes (1.7.2) #300-fix(solis): read the inverter again after a silent start (2.2.2) #312): silent from start-up, silent mid-session, each register refused six times;make test-driver ID=<id>: 47 or 48 passed, 11 skipped for each of the nine.make absent-register-report ID=<id>: every address settles for each of the nine.make invented-number-report ID=<id>: none for each of the nine.make check: 5616 passed, 927 skipped.Not yet verified
CHANGELOG.mdandinvented-number-baseline.jsonare touched by the other driver PRs in this series; whichever merges later needs a rebase there. The harness file has the same bytes in every PR.drivers/BUNDLED_SOURCE.jsonhas to move.🤖 Generated with Claude Code