Skip to content

fix: Fronius Sunspec module - #4253

Open
seaspotter wants to merge 9 commits into
openWB:masterfrom
seaspotter:fronius-sunspec-hybrid-exported-simcounter
Open

seaspotter wants to merge 9 commits into
openWB:masterfrom
seaspotter:fronius-sunspec-hybrid-exported-simcounter

Conversation

@seaspotter

@seaspotter seaspotter commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

UI: openWB/openwb-ui-settings#1155

Offenbar lässt sich das Modbus Register nicht korrekt auslesen: #3465 (reply in thread)

Für die Batterie gibt es 2 MPPT Kanäle für Laden und Entladen

Summary by Sourcery

Correct Fronius SunSpec measurements and battery control for devices that expose charging and discharging through separate MPPT channels.

New Features:

  • Support separate MPPT channels for Fronius SunSpec battery charging and discharging measurements.
  • Report Fronius SunSpec battery imported and exported energy from the corresponding MPPT channels.

Bug Fixes:

  • Correct Fronius SunSpec power, current, and energy sign handling to match openWB conventions.
  • Upgrade existing Fronius SunSpec battery configurations to separate charge and discharge MPPT indices.

Enhancements:

  • Improve Fronius battery control state handling and restore charge/discharge rate limits when automatic inverter control resumes.

@seaspotter
seaspotter force-pushed the fronius-sunspec-hybrid-exported-simcounter branch from d0d6fc8 to cc55eb3 Compare November 2, 2026 19:17
@seaspotter seaspotter changed the title fix: Fronius Sunspec module simcounter fix: Fronius Sunspec module Nov 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Active moderate and critical findings remain in the battery module, including unfiltered energy totals and reversed charge/discharge control bits and register writes.

3 open issues
What changed in this PR

Updates the Fronius SunSpec integration to support separate MPPT channels for battery charging and discharging, correct counter sign handling, and migrate existing battery configurations.

Changes:

  • Uses simulated inverter counters and corrected Smart Meter sign conventions.
  • Adds configurable charge and discharge battery MPPT channels with separate readings.
  • Updates battery control handling and migrates legacy configurations to the new MPPT fields.
File Description
packages/​modules/​devices/​fronius/​fronius_sunspec/​inverter.py Uses simulated counters for inverter import and export values.
packages/​modules/​devices/​fronius/​fronius_sunspec/​counter.py Updates SunSpec power and current sign conventions.
packages/​modules/​devices/​fronius/​fronius_sunspec/​config.py Adds separate configurable MPPT indices for battery charging and discharging.
packages/​modules/​devices/​fronius/​fronius_sunspec/​bat.py Reads separate battery MPPT channels and updates battery control and energy reporting.
packages/​helpermodules/​update_config.py Migrates existing Fronius SunSpec battery configurations to the new MPPT fields.

Review effort: Lite

@LKuemmel LKuemmel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bitte die Copilot Kommentare prüfen.

@seaspotter

Copy link
Copy Markdown
Collaborator Author

Bitte die Copilot Kommentare prüfen.

erl :)

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.

3 participants