[Edge] Controller.Api.Backend: support Backend 2026.x edge.manager#3795
[Edge] Controller.Api.Backend: support Backend 2026.x edge.manager#3795arindahills wants to merge 2 commits into
Conversation
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>
39b2266 to
0791a2f
Compare
Signed-off-by: tushabe <tushabe.aaron@gmail.com>
|
@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. |
|
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:
There is no need to update the Edge Does this clarify the structure? I'll close this specific PR here, but we can continue discussions here or on https://community.openems.io/. |
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>

Backend 2026.x replaced the edgewebsocket module with
edge.manager, which identifies Edges by anidHTTP header and only accepts notifications wrapped inEdgeRpcNotification. 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
edgeIdconfig property toController.Api.Backend. When it is set:idheader is sent on the WebSocket handshake;EdgeRpcNotification, including the initialOnOpenEdgeConfigNotification.When
edgeIdis 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.managerregister a directly-connected Edge.