Skip to content

fix(pixii): recover after the device was unreachable (2.1.9) - #180

Merged
frahlg merged 1 commit into
mainfrom
cursor/pixii-boot-recovery-ae54
Oct 14, 2026
Merged

frahlg merged 1 commit into
mainfrom
cursor/pixii-boot-recovery-ae54

Conversation

@frahlg

@frahlg frahlg commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Summary

After a power cut the Pixii driver stayed offline until a manual restart. Each register keeps its own failure count and stops being read after three misses (GIVE_UP_AFTER = 3). When the Pixii boots slower than FTW, every read fails within about 15 seconds at a 5 second poll, every register is retired, and the driver never asks again.

  • A poll where every read fails leaves the failure counts unchanged. That poll means the device is unreachable, rather than that a register is missing.
  • The next poll that gets an answer clears the counts.
  • Register 40288 on PowerShaper firmware below CPU 2.0.23 still stops after three misses while other registers answer. It is tried again every five minutes, the short end of a 5–10 minute retry, instead of only after a restart.

Pixii is now 2.1.9. Simulated with the existing Lua host mock: the device is unreachable from init through six polls, then answers, and battery and meter values come back without reloading the driver. Register 40288 is still left alone between retries.

FTW's bundled copy does not move with this commit. After this merges, bump the pin in FTW and run scripts/sync-bundled-drivers.sh (srcfl/ftw#1620). Until then a gateway booting offline still runs the old driver.

Driver evidence

  • Driver id: pixii
  • Device make/model: Pixii PowerShaper
  • Firmware tested: not run on hardware in this change. The 40288 behaviour remains the one found on PowerShaper firmware below CPU 2.0.23.
  • Protocol/register source: existing Pixii SunSpec map; no register map change
  • Hardware test performed: none. Recovery is covered by drivers/tests/test_pixii_unreachable.py against the host mock.
  • Known limits: a real power cut on a PowerShaper has not been repeated for 2.1.9. One failed read of an absent register still happens every five minutes.

Safety

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

No new driver and no control change. Heartbeat, setpoint, default mode and sign conversion are untouched. The existing control path is unchanged, so the read-only / new-control checkbox does not apply.

Control evidence

  • HIL evidence or required: not applicable
  • Control changes include default-mode, lease-expiry and HIL evidence.

Not applicable. No control path change.

Checks

  • Commits include Signed-off-by.
  • make test-driver ID=pixii — 110 passed, 13 skipped
  • make check — 4912 passed, 923 skipped

make package-driver is no longer a target in this repository; the package tree was removed, and pixii has no separate package target to update.

Open in Web Open in Cursor 

A poll where every read fails no longer counts toward retiring a
register. The next poll that gets an answer clears the failure counts,
and a register that stays silent while the device is up is tried again
every five minutes. Register 40288 is still left alone between retries.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@frahlg
frahlg marked this pull request as ready for review October 14, 2026 15:40
@frahlg

frahlg commented Oct 14, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 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-14T15:42:44.189653Z 5533b10 Manual request
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 5533b1062f

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@frahlg
frahlg merged commit 4a17397 into main Oct 14, 2026
5 checks passed
@frahlg
frahlg deleted the cursor/pixii-boot-recovery-ae54 branch October 14, 2026 15:49
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.

2 participants