Skip to content

fix(pixii_pv): keep sunset readings valid (0.3.3) - #181

Merged
frahlg merged 1 commit into
mainfrom
fix/pixii-pv-night-noise
Oct 16, 2026
Merged

frahlg merged 1 commit into
mainfrom
fix/pixii-pv-night-noise

Conversation

@frahlg

@frahlg frahlg commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

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_pv 0.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

  • Driver id: pixii_pv
  • Device make/model: Pixii PowerShaper, the existing driver target. The report does not identify the exact unit.
  • Firmware tested: not supplied; no hardware run with this change.
  • Protocol/register source: the driver's existing MQTT meter_ext6 schema, gated by meter_source = "PV".
  • Hardware test performed: none. Tests use synthetic MQTT messages.
  • Known limits: no raw MQTT capture or installed FTW/driver version from the affected site. Beta validation on the affected site still needs to confirm fresh zero PV after sunset and returning production the next morning.

Safety

  • The driver starts read-only, or this is a separately reviewed control change.
  • Vendor signs are converted at the driver boundary.
  • Cached telemetry becomes stale instead of being re-emitted as fresh.
  • No credentials, serial numbers, private addresses or site data are included.

Control evidence

  • HIL evidence: not applicable; this driver is read-only.
  • Control changes: not applicable.

Checks

  • Commits include 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.

Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@frahlg
frahlg marked this pull request as ready for review October 16, 2026 04:19
@frahlg
frahlg merged commit 76ddd58 into main Oct 16, 2026
5 checks passed
@frahlg
frahlg deleted the fix/pixii-pv-night-noise branch October 16, 2026 04:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T04:21:02.102972Z 8b93c1a Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant