Skip to content

fix: Fronius Sunspec module - #4253

Merged
LKuemmel merged 10 commits into
openWB:masterfrom
seaspotter:fronius-sunspec-hybrid-exported-simcounter
Nov 16, 2026
Merged

LKuemmel merged 10 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

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

New Features:

  • Support separate configurable MPPT channels for Fronius battery charging and discharging, including battery energy import and export readings.

Bug Fixes:

  • Correct Fronius SunSpec power and current sign handling and derive battery power from the separate charge and discharge channels.
  • Correct battery control register updates and inverter energy direction reporting.

Enhancements:

  • Validate configured MPPT channels during initialization and preserve battery control modes between updates.

Chores:

  • Migrate existing Fronius SunSpec battery configurations to separate charge and discharge MPPT indices and increment the datastore version.

@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
@seaspotter
seaspotter requested a review from ndrsnhs November 6, 2026 12:09
@LKuemmel
LKuemmel requested a lite review from Copilot November 12, 2026 11:53

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 :)

@seaspotter
seaspotter force-pushed the fronius-sunspec-hybrid-exported-simcounter branch from 38c39ce to 2e5eee6 Compare November 16, 2026 12:56
@LKuemmel
LKuemmel removed the request for review from ndrsnhs November 16, 2026 14:09
@seaspotter
seaspotter force-pushed the fronius-sunspec-hybrid-exported-simcounter branch from 367d32a to 81e4e30 Compare November 16, 2026 14:14
@LKuemmel
LKuemmel merged commit 7551b74 into openWB:master Nov 16, 2026
2 checks passed
@seaspotter
seaspotter deleted the fronius-sunspec-hybrid-exported-simcounter branch November 16, 2026 14:18
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