Repository navigation
fix(pixii_pv): keep sunset readings valid (0.3.3) - #181
Merged
Merged
Conversation
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Codex Review SummaryThis 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. |
11 tasks done
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.
Summary
PV can disappear after sunset while fresh Pixii MQTT messages keep arriving. A phase sum of -6 W becomes +6 W after sign conversion. FTW rejects positive PV power, leaving the last accepted reading to become stale and then missing.
pixii_pv0.3.3 reports-max(0, phase_sum)for complete, finite input. It sums before applying the limit, keeps signed phase diagnostics and leaves the generation counter intact. Missing or invalid phase power emits no PV reading. Idle polls do not replay old readings.The negative reading may come from meter noise or inverter consumption. The report and screenshot do not establish which, or confirm the exact failure times.
Driver evidence
pixii_pvmeter_ext6schema, gated bymeter_source = "PV".Safety
Control evidence
Checks
Signed-off-by.make test-driver ID=pixii_pv— 65 passed, 6 skipped.make check— 4931 passed, 923 skipped.The 19 new test cases cover negative, zero and positive totals, mixed phase signs, missing and invalid phase values, non-finite values, repeated night readings, idle polls, grid-only messages and morning recovery. The unchanged driver fails 15 of them.
A local comparison through FTW's Go Lua host and telemetry store also passed: the old driver leaves the last daytime reading and timestamp unchanged after five negative-total messages; the fixed driver updates to zero on each message, stops refreshing when messages stop, and accepts morning production.
Delivery
Paired Core PR srcfl/ftw#1654 moves the bundled driver pin to this PR's merge commit,
76ddd5846f18cb1a0d53d85508904d4e953421b2, and adds a Core regression test plus a patch changeset for the next beta. Signed driver delivery and activation are separate from the Core bundle pin.