Skip to content

fix(pixii): report measured power in the right direction - #1504

Merged
frahlg merged 1 commit into
masterfrom
fix/pixii-control-sign-20261003
Oct 3, 2026
Merged

frahlg merged 1 commit into
masterfrom
fix/pixii-control-sign-20261003

Conversation

@frahlg

@frahlg frahlg commented Oct 3, 2026

Copy link
Copy Markdown
Member

Pixii 2.1.7 reversed measured AC power when checking whether the battery followed a command. A real discharge of -1231 W therefore read as +1231 W and raised power_wrong_direction while the flow view showed discharge. This pin brings Pixii 2.1.8 into Core and preserves the measured sign. Command and setpoint conversion stay the same.

Paired with srcfl/device-drivers#155; fixes srcfl/device-drivers#154. The contributor reported charging and discharging checks on a real Pixii Home in that PR. Firmware was not recorded, so that evidence does not cover every Pixii model or firmware.

Validation:

  • Driver make test-driver ID=pixii: 104 passed, 13 skipped. Full make check: 4,805 passed, 923 skipped. Signed-channel version preflight passes.
  • Core make verify passes: tests, migration and release guards, vet and build. The local Docker-context check skipped because no Docker daemon was available.
  • The new Go test loads the driver through FTW's Lua host and checks charge, discharge, scaled readings and idle, with TS mode on and off. It checks atomic native setpoint writes, site-signed readback, AC observations and command evidence. Eight cases fail with 2.1.7; all ten pass with 2.1.8.
  • The generated snapshot matches the pinned source byte for byte. Only Pixii changes among the 40 bundled drivers. The driver version gate passes.

PR #1449 also touches the bundle pin and adds vehicle drivers. Its source pin predates current master. This fix keeps the current bundle list; #1449 should retain this newer source pin when rebased.

Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 3, 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-03T05:01:29.950940Z b6c3f4c PR opened
ℹ️ 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.

@frahlg
frahlg merged commit 1e80378 into master Oct 3, 2026
14 checks passed

segran2 commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Hardware validation completed successfully on a real Pixii Home system using FTW test build 562d1aa (v0.139.2-beta.1-test-562d1aa).

Test: driver-scoped battery manual hold, 500 W discharge for 30 s.

Observed control chain:

  • dispatch target_w: -500 W
  • requested_w: -500 W
  • sent_w: -500 W
  • Pixii native setpoint: +500 W
  • Modbus write addr 39905: +500
  • readback_w: -500 W
  • actual_w: -498 W
  • measured bat_w: -486.77 W
  • feedback: following / power_observed / measured
  • readings_fresh: true
  • clamped: false
  • battery SoC: 89.9%

Relevant driver log:

Pixii: setpoint ems_w=-500 pixii_w=500
Pixii: modbus_write_multi addr=39905 hi=0 lo=500 (pixii_w=500)

This verifies the full sign path on physical hardware: FTW discharge uses negative site power, converts to positive Pixii-native power for the command, and measured/readback power is converted back to the FTW site-sign convention correctly.

The manual hold was cleared after the test. The test build was stopped and the system was returned to the official v0.139.2-beta.1 release. Post-test health: 7/7 drivers OK, status OK, manual hold inactive.

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.

Pixii: AC power sign inversion causes false power_wrong_direction during discharge

2 participants