I want to customize alerting in OpenEMS in my custom UI

Hello OpenEMS community,

I’m a new OpenEMS user working on a customization project. I’ve reached the Alerts part and my goal is to display alerts in my own UI. I found the bundle io.openems.backend.alerting, but I don’t fully understand how it works.

Context:

  • I want an EdgeController (e.g., monitoring meter0/Current) to raise an alert whenever a channel value exceeds a threshold.
  • That alert should be generated on the edge, forwarded to the backend, and then pushed to my custom UI—so the UI stays updated with all active alerts.

Questions:

  1. Does the existing alerting logic in the OpenEMS base code already support this workflow? If so, how can I leverage it to achieve my objective?
  2. If not (i.e., if I need to implement alerting from scratch), could you provide a high-level roadmap for doing so?

Thank you in advance for your help!

Hi @Anass-Ezz and welcome to the OpenEMS Community.

For these kind of “States” for INFO, WARNING or FAULT we usually use StateChannels.

In your Component you could define a StateChannel CURRENT_ABOVE_THRESHOLD and set it to true when its above the threshold. You will then directly receive a message in the top right corner in the UI.

Regards,
Stefan

1 Like