Repository navigation
Conversation
…ter wakes (1.7.2) FTW Core keys a device on its serial number, and its saved forecast receipt holds it. The driver read the serial first in each poll and gave it 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, so the device stayed known only by its address and Core's forecast identity check stayed pending. Device-type detection gave up the same way and stayed on "unknown", so a hybrid's external meter was no longer named as one. The serial is now read last in a poll, and only in one where another read answered. After three misses on an inverter that does answer, it is asked again every five minutes instead of never, and a reconnect starts its count over like every other register's. Detection that gave up during an outage gets one more try once the inverter answers again. A new harness test starts the inverter asleep, wakes it after six polls, and checks the serial and the hybrid's meter; then fails the serial three times on a live inverter, fails its first retry and answers its second. The old driver fails it. 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. |
miravoss26
reviewed
Dec 5, 2026
miravoss26
left a comment
There was a problem hiding this comment.
The serial is now read last, only in a poll where another read answered, retried every five minutes after three misses, and its count (plus a gave-up device-type detection) starts over on reconnect. That matches the description.
- Security screen: no secrets, new dependencies or network destinations seen in the driver diff. No new writes to the device.
- No findings. I read the driver diff only, did not run the tests, and there is no hardware run (as you note).
Safe to merge from my read.
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. sungrow 1.7.1 read the serial first in each poll and gave it three tries for the life of the process (
sn_tries). An inverter asleep at start-up, or held by another Modbus client, used up those tries while answering nothing. The device then stayed known only by its address, and Core's forecast identity check stayed pending. This is the fault #298 fixed for SolarEdge; on 4 Dec 2026 it held back a site's load forecast for 12 hours.settle_pollalready starts every other register's count over when the link comes back, but notsn_tries. Device-type detection (register 4999) gave up the same way: three tries on a dead link, thenunknownfor the session, so a hybrid's external meter was no longer reported withpower_origin = "external_meter".Change
unknownin that same poll, so a hybrid block read is not held back.Test evidence
drivers/tests/lua_harness/test_sungrow_serial_retry.lua(run bytest_sungrow_serial_retry.py):driver_initfor six polls, then the inverter wakes: the serial is reported on the first poll after waking and the hybrid's meter is named again;1.7.1 fails case 1:
serial not reported on the first poll after waking: nil.make test-driver ID=sungrow: 154 passed, 4 skipped.make absent-register-report ID=sungrow: every address settles.make check: 5575 passed, 927 skipped.Not yet verified
drivers/BUNDLED_SOURCE.jsonhas to move, or an offline boot keeps running 1.7.1.🤖 Generated with Claude Code