Skip to content

Add Morningstar ProStar MPPT charge controller preset#1

Open
pbitzer wants to merge 2 commits into
v0.3.xfrom
add-prostar-mppt-preset
Open

Add Morningstar ProStar MPPT charge controller preset#1
pbitzer wants to merge 2 commits into
v0.3.xfrom
add-prostar-mppt-preset

Conversation

@pbitzer

@pbitzer pbitzer commented May 1, 2026

Copy link
Copy Markdown

Summary

  • Adds complete device preset for the Morningstar ProStar MPPT solar charge controller
  • Uses IEEE 754 half-precision float (input_type = "e") for measurement registers, verified against the official Modbus spec (MS-001723 v05)
  • Reads 61 contiguous registers (0x0010-0x004C) covering 54 data channels: voltages, currents, temperatures (including 3-phase inductor temps), charge/load status, Ah/kWh accumulators, MPPT sweep results, and daily statistics

Key design decisions

  • Float16 not fixed-point: The ProStar MPPT stores measurement values as IEEE 754 half-precision floats, unlike the SunSaver which uses fixed-point n * scale * 2^-15. Using input_type = "e" lets Python's struct module decode them directly with no conversion math needed.
  • input_type not binary_type: Required for Modbus presets because Brokkr's ModbusInput sets a default input_type = "H" that would override binary_type. This matches the sunsaver's approach.
  • 32-bit accumulators (Ah counters, hourmeter, alarm): Use input_type = "I" with HI-word-first ordering, matching the spec's big-endian layout.

Test plan

  • Verify TOML parses without errors
  • Confirm register count (61) matches the contiguous block 0x0010-0x004C
  • Test on actual ProStar MPPT hardware if available
  • Verify float16 decoding produces correct engineering values

🤖 Generated with Claude Code

pbitzer and others added 2 commits April 28, 2026 15:31
The ProStar MPPT uses IEEE 754 half-precision floats (not the fixed-point
scale/base/power encoding from the SunSaver). Verified against the official
Modbus spec (MS-001723 v05). Also adds the complete register map (54 data
channels, 61 registers), the [inputs.ram] section, and _dependencies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@pbitzer
pbitzer requested a review from jcburchfield May 1, 2026 01:53
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