Skip to content

[Edge] Controller.Api.Backend: support Backend 2026.x edge.manager#3795

Closed
arindahills wants to merge 2 commits into
OpenEMS:developfrom
arindahills:pr/edge-direct-connect
Closed

[Edge] Controller.Api.Backend: support Backend 2026.x edge.manager#3795
arindahills wants to merge 2 commits into
OpenEMS:developfrom
arindahills:pr/edge-direct-connect

Conversation

@arindahills

Copy link
Copy Markdown
Contributor

Backend 2026.x replaced the edgewebsocket module with edge.manager, which identifies Edges by an id HTTP header and only accepts notifications wrapped in EdgeRpcNotification. An Edge connecting directly to a 2026.x Backend currently stays offline, because it sends only the apikey and raw, unwrapped notifications.

This adds an edgeId config property to Controller.Api.Backend. When it is set:

  • the id header is sent on the WebSocket handshake;
  • every outgoing notification is wrapped in EdgeRpcNotification, including the initial OnOpen EdgeConfigNotification.

When edgeId is empty the behaviour is unchanged, so connections to 2025.x Backends keep working.

Tested against Backend 2026.6.0: the Edge connects and streams live data.

Pairs with a separate PR that lets edge.manager register a directly-connected Edge.

@arindahills
arindahills marked this pull request as ready for review June 29, 2026 20:48
Backend 2026.x replaced the edgewebsocket module with edge.manager, which
identifies Edges by an 'id' HTTP header and only accepts notifications wrapped
in EdgeRpcNotification. An Edge connecting directly to a 2026.x Backend sends
only the apikey and raw, unwrapped notifications, so it stays offline.

- Add edgeId config property (default empty, backward-compatible).
- When edgeId is set, send the 'id' header on the WebSocket handshake.
- When edgeId is set, wrap all outgoing notifications in EdgeRpcNotification,
  including the initial OnOpen EdgeConfigNotification.
- Empty edgeId keeps the legacy 2025.x behaviour unchanged.

Signed-off-by: arindahills <arinda.hillary@gmail.com>
@arindahills
arindahills force-pushed the pr/edge-direct-connect branch from 39b2266 to 0791a2f Compare June 30, 2026 21:03
Signed-off-by: tushabe <tushabe.aaron@gmail.com>
@tushabe

tushabe commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@sfeilmeier Please have a review at this PR and #3796 when you have a moment. It's enabling Core direct Edge-to-Backend 2026.x support. We realised this was missing when we were trying to connect edge and backend using 2026.6 release images.

@sfeilmeier

Copy link
Copy Markdown
Contributor

Hi @tushabe and @arindahills,

I think there is a misunderstanding on how Backend Edge Manager works. Unfortunately we did not yet document this, so I try to explain it here. Before, we used to have a EdgeWebsocket-Component inside a central Backend server. This did not scale well, so we split this up to be able to run the Edge-facing service on one or more separate physical servers. This is the general setup:

grafik

There is no need to update the Edge Controller.Api.Backend. Of course it's also possible to run Backend.Edge.App on the Central Server and connect to localhost.

Does this clarify the structure?
If you try this and it works for you it would be very helpful if you could help in documenting this feature.

I'll close this specific PR here, but we can continue discussions here or on https://community.openems.io/.

@sfeilmeier sfeilmeier closed this Jul 7, 2026
sfeilmeier pushed a commit that referenced this pull request Jul 9, 2026
The backend Architecture page was empty. Document how an OpenEMS Edge connects
to the Backend via the Backend.Edge.App: the Edge-facing endpoint was split out
of the central Backend into its own scalable application, so the Edge
Controller.Api.Backend connects to a Backend.Edge.App (deployed on separate
servers, or on the central server via localhost) which relays to the central
Edge.Manager. Follows up on the discussion in #3795.

https://openems.github.io/openems.io/openems/latest/backend/architecture.html

Signed-off-by: arindahills <293051436+arindahills@users.noreply.github.com>
Co-authored-by: arindahills <293051436+arindahills@users.noreply.github.com>
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