Skip to content

Feature/controller evcs analog heatingelement reference target - #3919

Merged
sfeilmeier merged 3 commits into
OpenEMS:developfrom
PunugupatiSaikumar:feature/controller-evcs-analog-heatingelement-reference-target
Aug 26, 2026
Merged

Feature/controller evcs analog heatingelement reference target#3919
sfeilmeier merged 3 commits into
OpenEMS:developfrom
PunugupatiSaikumar:feature/controller-evcs-analog-heatingelement-reference-target

Conversation

@PunugupatiSaikumar

Copy link
Copy Markdown
Contributor

Summary

Migrates three controllers from OpenemsComponent.updateReferenceFilter() to the Reference Target Plugin (@GenerateTargetsFromReferences).
This continues the same migration as the ESS controller PRs. The plugin resolves ${config.*_id} into the OSGi reference target before @Activate, so the runtime filter rewrite is no longer needed.

Bundles

1. Controller.Evcs

  • @GenerateTargetsFromReferences("evcs")
  • Reference: STATIC / GREEDY / MANDATORY with
    target = "(&(id=${config.evcs_id})(enabled=true))"
  • Removed evcs_target() from Config / MyConfig
  • Kept ConfigurationAdmin (cm) — still used to rewrite force-/default-charge power when hardware limits are exceeded
  • Tests: JUnit 4 → Jupiter; DummyConfigurationAdmin kept because cm is still used

2. Controller.IO.Analog

  • @GenerateTargetsFromReferences("analogOutput")
  • Reference: STATIC / GREEDY / MANDATORY with
    target = "(&(id=${config.analogOutput_id})(enabled=true))"
  • Removed analogOutput_target() from Config / MyConfig
  • Removed cm — it was only used for updateReferenceFilter
  • Optional timedata reference unchanged
  • Tests: JUnit 4 → Jupiter; DummyConfigurationAdmin removed

3. Controller.IO.HeatingElement

  • @GenerateTargetsFromReferences("meter")
  • Optional meter (same pattern as Controller.IO.HeatPump.SgReady):
    cardinality = OPTIONAL, policyOption = GREEDY,
    target = "(&(id=${config.meter_id})(enabled=true))"
    (not STATIC, because meter_id defaults to "")
  • Removed the old empty-id (false=true) / updateReferenceFilterRaw handling
  • Removed meter_target() from Config / MyConfig
  • Removed cm — it was only used for the meter filter
  • Tests: removed unused DummyConfigurationAdmin wiring only (left on JUnit 4 to keep the diff small)

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #3919      +/-   ##
=============================================
+ Coverage      55.71%   55.71%   +0.01%     
+ Complexity     19118    19113       -5     
=============================================
  Files           3674     3674              
  Lines         172019   172011       -8     
  Branches       14178    14175       -3     
=============================================
+ Hits           95817    95823       +6     
+ Misses         72409    72395      -14     
  Partials        3793     3793              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sfeilmeier sfeilmeier 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.

Thank you for proceeding. I am awaiting the moment when we can remove updateReferenceFilter() 🚀 (not sure if this will actually be possible, though)

@sfeilmeier
sfeilmeier merged commit a7efc1c into OpenEMS:develop Aug 26, 2026
7 checks passed
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