I want SubscribeEdgesChannels in UI WebSocket

Dear OpenEMS community,

I need to subscribe to channels distributed across multiple Edges from a custom UI, and have three questions:

  1. Why is SubscribeEdgesChannels (supports multiple Edges) restricted to B2B WebSockets?

  2. SubscribeChannels (an edgeRpc method) works in UI WebSockets, but doesn’t support multi-Edge subscriptions. Is there a reason this limitation exists?

  3. Can moving SubscribeEdgesChannelsRequest/SubscribeEdgesChannelsNotification to backend.common enable UI WebSocket support?

    If yes, could you provide guidance on the implementation steps?

Thank you in advance.

Hi. We somehow had this requirement in mind, that’s why there are some basic implementations for it. We did not require that feature in OpenEMS UI yet, though - so we did not implement it till now. Specifically in UI the Angular lifecycle events are often not reliable, which would lead to forgotton unsubscribes after switching to a different Edge, so it was easier to implement this way.

If you can provide a small PR, we’ll certainly look into it.

Regards,
Stefan