Skip to content

Fronius: add support for single phase meters - #4093

Merged
LKuemmel merged 2 commits into
openWB:masterfrom
ndrsnhs:fronius-single-phase-meter
Oct 20, 2026
Merged

LKuemmel merged 2 commits into
openWB:masterfrom
ndrsnhs:fronius-single-phase-meter

Conversation

@ndrsnhs

@ndrsnhs ndrsnhs commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Ticket #66008972

Einphasige Smartmeter werfen KeyError

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

Production-meter handling can still raise ZeroDivisionError, and single-phase regression coverage is missing.

1 open finding
What changed in this PR

Adds support for Fronius single-phase meters by handling missing phase measurements.

Changes:

  • Defaults missing phase and frequency values.
  • Guards counter current calculations against invalid voltages.
  • Requires production-meter handling and regression coverage updates.
File Summary
packages/​modules/​devices/​fronius/​fronius_http_api/​meter_reader.py Handles missing phase measurements; production-meter division and regression coverage remain unresolved.
packages/​modules/​devices/​fronius/​fronius_http_api/​counter.py Safely calculates currents for missing or zero voltages.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

power_factors = [data["PowerFactor_Phase_"+str(num)] for num in range(1, 4)]
frequency = data["Frequency_Phase_Average"]
powers = [data.get(f"PowerReal_P_Phase_{num}", 0) for num in range(1, 4)]
voltages = [data.get(f"Voltage_AC_Phase_{num}", 0) for num in range(1, 4)]
@LKuemmel LKuemmel added this to the 2.3.0 milestone Oct 19, 2026
@LKuemmel
LKuemmel merged commit 827bb93 into openWB:master Oct 20, 2026
1 check passed
LKuemmel pushed a commit that referenced this pull request Oct 22, 2026
* add support for single phase meters

* fix zero division for production counter
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