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)?
we recently implemented a “HTTP Bridge” that unifies communication over HTTP (just as the Modbus brige standardizes Modbus communiation in OpenEMS).
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.
Hallo @stefan.feilmeier,
The HTTP Bridge sounds perfect for my use case.
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?