Skip to content

Add external charge control mode for EVSE - #3999

Open
Christoph-87 wants to merge 9 commits into
OpenEMS:developfrom
Christoph-87:evse-external-control
Open

Christoph-87 wants to merge 9 commits into
OpenEMS:developfrom
Christoph-87:evse-external-control

Conversation

@Christoph-87

@Christoph-87 Christoph-87 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This is a focused first step for #3943. It adds a generic external setpoint path for EVSE charge points while keeping OpenEMS responsible for device safety and ability limits.

The PR adds:

  • writable EvseChargePoint channels:
    • SetMaximumChargePower in W
    • SetChargingEnabled
  • a new Controller.Evse.Single mode: EXTERNAL
  • cluster power distribution that applies externally written limits while respecting the EVSE's effective limits
  • tests for external setpoints, controller parameters, cluster distribution and the affected charge-point implementations
  • README documentation for the new mode and REST writes

The branch is rebased onto the current develop branch and incorporates the review feedback, including the split from the former RunUtils logic to the current power-distribution classes.

Out of scope for this first PR:

  • external phase switching
  • a dedicated evcc adapter/API
  • UI automation beyond the existing controller configuration

Validation

./gradlew :io.openems.edge.controller.evse:test \
  :io.openems.edge.evse.chargepoint.ambibox:test \
  :io.openems.edge.evse.chargepoint.hardybarth:test \
  :io.openems.edge.evse.chargepoint.keba:test \
  :io.openems.edge.evse.chargepoint.mennekes:test
./gradlew checkstyleAll buildEdge

Both commands complete successfully on Java 21.

@codecov

codecov Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #3999      +/-   ##
=============================================
+ Coverage      57.15%   57.17%   +0.02%     
- Complexity     22095    22119      +24     
=============================================
  Files           4176     4176              
  Lines         190779   190836      +57     
  Branches       16290    16297       +7     
=============================================
+ Hits          109027   109086      +59     
+ Misses         77306    77303       -3     
- Partials        4446     4447       +1     
🚀 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

Copy link
Copy Markdown
Contributor

@Howaner: Opinions?

@Christoph-87

Copy link
Copy Markdown
Contributor Author

Hi @sfeilmeier @Howaner,

just wanted to follow up on this PR. The implementation is ready for review from my side.

I'd appreciate any feedback, especially on whether the proposed approach fits the intended EVSE architecture.

Thanks!

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

Looks good so far - I think it's a good idea to have a way for externals to override the system behaviour.

Can you take a look at the comments and pull the latest develop branch into your branch? The RunUtils class was split up into PowerDistribution classes.

@Christoph-87
Christoph-87 force-pushed the evse-external-control branch from ae91b79 to 3e7288d Compare October 14, 2026 14:24
@Christoph-87
Christoph-87 force-pushed the evse-external-control branch from 4aba150 to dc1a671 Compare October 26, 2026 10:06
@Christoph-87
Christoph-87 marked this pull request as ready for review October 26, 2026 10:07
@Christoph-87

Copy link
Copy Markdown
Contributor Author

Rebased this branch onto the current develop branch and verified the updated implementation against the current power-distribution classes. The targeted EVSE tests, checkstyleAll, and buildEdge all pass locally on Java 21. I also updated the PR description and marked it ready for review. @Howaner, could you please take another look when you have time?

@sjjh

sjjh commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

@Christoph-87 would you mind bringing this up to date agsin (if I understood it correctly, there are some conflicts)?

If I understand this feature correctly, it would allow us to handle charging of car sharing wall boxes generally optimized by OpenEMS (e.g., PV surplus) and overrule the OpenEMS logic by a car sharing booking system (e.g., ensuring that a booked car is fully charged at a specific time).

Preserve user-event and charge-session handling, account for external limits in live and simulated power distribution, and allow static overrides without PV surplus while retaining ZERO mode. Document booking-system scope and override lifetime.
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.

4 participants