Controller for a remote Call


I would like to trigger a remote service from OpenEMS, maybe by sending a request to the remote server at a predefined time or at regular intervals. Could I subclass a Controller for this purpose?
If the controller is the right interface for the task, should the logic to execute the controller on time be within the controller or do I have to use a separate scheduler (eg the Daily scheduler)?

Thank you

Hi dsen,

we recently implemented a “HTTP Bridge” that unifies communication over HTTP (just as the Modbus brige standardizes Modbus communiation in OpenEMS).

We are just now starting to migrate all Components slowly. See the updated Shelly implementation for an example → openems/ at develop · OpenEMS/openems · GitHub

Also the Tibber implementation is a good example - though not yet migrated to HTTP bridge - for querying a web-service regularly (e.g. every hour) → openems/io.openems.edge.timeofusetariff.tibber/src/io/openems/edge/timeofusetariff/tibber/ at develop · OpenEMS/openems · GitHub

HTTP requests always must be in a separate thread, so that they cannot interrupt/pause the core cycle. HTTP bridge takes care of this.

Implementation of a Controller is only required if you really plan to control something (and want to make use of the ProcessImage), e.g. activate a digital output etc. Your case doesn’t sound like that.


1 Like

Hallo @stefan.feilmeier,
The HTTP Bridge sounds perfect for my use case. :slight_smile:

I’m using a slightly older version of the OpenEMS code (no upgrade possible due to stability reasons). Is the process for adding the HTTP Bridge library to my setup similar to Implement New Device?

Thank you

1 Like