Hi Vincenzo,
welcome to the Community.
By default the writes to InfluxDB are truncated to one value per second. You should be able to adjust implementation for your use-case here:
Apart from that: I am working on a “Simulator” which might be exactly what you need. It is already functional, but unfortunately still lacks proper documentation and a nice UI.
To try if it suits you, you would have to
- Activate the “Controller Api REST/JSON Read-Write” in OpenEMS. (I usually use the Talend API Tester chrome extension)
- Then send a
executeSimulation
JSONRPC-Request (see the example here), that defines the simulated Components, simulated data and simulation parameters.-
components
keeps the configuration for each Component, just like Apache Felix Configuration Admin would do -
clock
defines the duration of the simulation.- To simulate a real-time execution set the
timeleapPerCycle
to1000
(i.e. 1 second) andexecuteCycleTwice
tofalse
. - (The settings in the example (
timeleapPerCycle:900000, executeCycleTwice:true
) are for a simulation of 15 minutes values, e.g. for industrial peak-shaving applications)
- To simulate a real-time execution set the
-
profiles
: define the input data. This is the data you currently provide via adatasource
. -
collect
: defines the channels that you would want to record.
-
- The simulation will then run for a while… watch the logs to see the progress
- Once it’s finished it returns a JSONRPC-Response, that holds the
collect
ed channel data as a JSON - The Simulator-App also behaves like a
Timedata
service in OpenEMS, so you can also see the simulated results in OpenEMS UI.
Looking forward to hearing from you about this. I am curious to know if it works for you.
Regards,
Stefan