Skip to content

fix(pixii): detect active battery calibration via Modbus - #228

Open
segran2 wants to merge 3 commits into
srcfl:mainfrom
segran2:fix/pixii-calibration-service
Open

segran2 wants to merge 3 commits into
srcfl:mainfrom
segran2:fix/pixii-calibration-service

Conversation

@segran2

@segran2 segran2 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

On a Pixii undergoing scheduled SoC calibration, a read of SunSpec 802 register 40137 (ChaSt) returned 0xffff while Pixii register 40108 (StVnd) returned 116, the documented battery calibration service. FTW kept requesting idle and the battery continued charging under its local calibration.

Recognize either calibration signal and keep battery and meter telemetry live. Use the Core calibration state when the host provides it. Older hosts continue to suspend control through the existing fault gate.

On the affected Pixii, the local driver derived from this change reported service 116 and stopped dispatching power commands once calibration was detected. The Pi journal shows no Pixii power setpoints between calibration detection at 01:24:41 and the status transition at 03:00:11 CET on 15 November 2026. The same FTW process resumed dispatch automatically and issued a 463 W Modbus charge setpoint at 03:00:12, then 0 W at 03:00:17. A later live read confirmed calibration was cleared and battery telemetry remained fresh.

Companion Core change: srcfl/ftw#2017.

Signed-off-by: Segran <goran@andersson-stehag.se>
Signed-off-by: Segran <goran@andersson-stehag.se>
Signed-off-by: Segran <goran@andersson-stehag.se>
@segran2
segran2 force-pushed the fix/pixii-calibration-service branch from ef41395 to a5ded98 Compare November 15, 2026 00:41

@miravoss26 miravoss26 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pixii 2.1.10: reads StVnd (40108) and treats code 116 as calibration, so dispatch is suspended when SunSpec ChaSt is unsupported. Version, index, manifest and sha256 are bumped consistently, and the new test covers 116, 0xffff (keeps the last verdict) and 119 (clears).

  • Needs a human decision: this adds host.set_calibrating to spec/host-api-profile.json. Older Core falls back to set_device_fault, which is fine. But is the Core side that implements set_calibrating merged or planned? If not, the new API is spec-only for now.
  • Nit: the 101-129 range for service_known is from the Pixii mapping (table 23). A one-line link in the comment would help whoever extends it.
  • No secrets, no new hosts or dependencies.

Logic looks right to me. Safe to merge from my read once the Core question is answered.

segran2 commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, Mira. I haven’t confirmed whether host.set_calibrating is already merged in Core or tracked in a follow-up. Until Core exposes it, the driver will use the set_device_fault fallback. I’ll confirm the Core status before merging and add a reference to Table 23 next to the service_known range.

This branch has not been deployed

No deployments
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