General question

Hello OpenEMS community,

I am a newbie to OpenEMS platform, and I have been exploring its documentation. I am delighted to share that I have successfully implemented a sample simulation where I powered a load using the grid, battery, and solar panel sources. During this process, I used various controllers, such as the Controller Balancing Symmetric to minimize grid usage, and the Controller Peak-Shaving Symmetric to eliminate peak-shaving. The experience was truly fascinating.

As I continue my exploration, I have come across a few questions about the platform. My current use case involves managing energy in industrial zones. For example, I need to provide the platform with data like the electricity price throughout the day. In Morocco, the electricity price is higher during the day than at night. Hence, my goal is to employ controllers that establish algorithms to control when to use renewable energy sources, the battery (charge/discharge), or the grid based on this data. This is just one example; the platform should be capable of handling similar scenarios.

Moreover, there might be situations where there is a peak power demand during the day, and renewable energy sources or the battery alone might not be sufficient to handle it. Additionally, there may be restrictions on using the grid beyond a certain limit. In such cases, I would like to know if the controller can prioritize turning off certain appliances based on factors like weather, time of day, date, and other parameters, to optimize energy usage. Can the platform handle all of these scenarios?

Lastly, during my usage of the platform’s user interface, I noticed that all the loads are presented with just one logo, without displaying how much each component consumes or produces. It would be extremely beneficial for me to have a feature in the UI that provides information on individual component consumption and production.

Thank you all for your time and attention, and I eagerly look forward to any assistance or insights the community can offer. Your guidance will be greatly appreciated.

1 Like

i’m really excited to have a response

Hi Khalid and welcome to the OpenEMS Community!

Good to hear, that you could already use OpenEMS for your simulations. I would be glad if you could share your experience and results in more detail to other newcomers. Thanks in advance!

Time-of-Use pricing is a big topic here in Germany and in other European countries as well. There is already a Controller available in OpenEMS that combines day-ahead prices with a local forecast of production and consumption to optimize discharging of a battery:

https://github.com/OpenEMS/openems/tree/develop/io.openems.edge.controller.ess.timeofusetariff.discharge

We sell this also as a product in Germany:

My colleague @venu-sagar is currently working on an extended version of this controller, that even executes charging from grid, if it is feasible. He will surely appreciate your feedback.

He is also currently implementing ENTSO-E API to receive prices for european grid. (https://github.com/OpenEMS/openems/pull/2207). Is there a similar API for receiving prices in Morocco?


The “Consumption” Widget in OpenEMS UI shows all known meters with type “CONSUMPTION”, so that should already work if configured correctly. (Code is here: https://github.com/OpenEMS/openems/blob/develop/ui/src/app/edge/live/common/consumption/flat/flat.html)

Regards,
Stefan

Thank you so much for your prompt response. I genuinely appreciate the valuable insights you shared regarding OpenEMS platform. I found the platform fascinating, as it offers a lot of advanced features. The fact that it is an open-source platform is particularly fascinating, as it allows for further development and enhancements, you did a great job!

During my experience with OpenEMS, I encountered a few questions, especially as I am relatively new to the system. For instance, I’m trying to do a simulation of 24 hours, using a load profile for a house throughout the whole day. However, waiting for the entire 24-hour period to observe the graphs (btw I’m working with Grafana for visualization) and the simulation results, appear impractical.

I attempted to optimize the core cycle (The duration of one global OpenEMS Cycle in [ms] (cycleTime)) to accelerate the simulation process by setting it to 1 ms instead of 1 s of 1 cycle. However, it seems that Grafana or the historic UI disregards this configuration and continues to fetch data points at a 1-second interval from the Influx database. Consequently, the graphs produced are inaccurate, as they reflect data sampled every 1 second.

I would greatly appreciate any guidance or insights you could provide to address this issue so I can make the simulation faster( the problem isn’t at the edge because it really became faster and provides results every 1ms but the problem is especially with the visualization) and ensure a more precise and efficient visualization of the simulation results.

As u know the platform try to simulate the real behavior of every component so if we take a battery as an example it will simulate its real behavior so when i provide a load profile I need to provide data that respect the battery behavior (charge and discharge) i hope that u understand me.

Thank you once again for your assistance.

Thanks for the positive feedback on OpenEMS! Voices and experiences like this are the reason why we take the effort to publish everything as open source software.

Have you tried the “Simulator App” for your purpose?

I just said the truth, Ah I read about Simulator App. but can you provide more details about it and can it help me with my purpose?

In priniciple the Simulator App had been designed for exactly the use-case you have. It was developed during an internal project, where we wanted to simulate the behaviour of different devices and then evaluate the result. I have not been using it for a while, though.

The idea is, that you can define a full simulated environment (Meters, ESS, etc.) via a JSON-RPC call and receive the simulation results as a JSON-RPC response. It should also be possible to visualize the results in OpenEMS UI.

The simulated data is not written to InfluxDB; but you receive it as JSON.

See Error response when triggering simulator app through API request and possibly other threads in the Forum also.

Regards,
Stefan

appreciated, that really helped me,btw i followed all the steps in the doc and i had written a sample request:

{
“method”:“componentJsonApi”,
“params”:{
“componentId”:“_simulator”,
“payload”:{
“method”:“executeSimulation”,
“params”:{
“components”:[
{
“factoryPid”:“Scheduler.AllAlphabetically”,
“properties”:[
{
“name”:“id”,
“value”:“scheduler0”
}
]
},
{
“factoryPid”:“Simulator.GridMeter.Reacting”,
“properties”:[
{
“name”:“id”,
“value”:“meter0”
}
]
},
{
“factoryPid”:“Simulator.NRCMeter.Acting”,
“properties”:[
{
“name”:“id”,
“value”:“meter1”
},
{
“name”:“alias”,
“value”:“Consumption”
},
{
“name”:“datasource.id”,
“value”:“_simulator”
}
]
}
],
“clock”:{
“start”:“2023-08-03T17:50:00.00Z”,
“end”:“2023-08-03T17:51:00.00Z”,
“timeleapPerCycle”:1000,
“executeCycleTwice”:true
},
“profiles”:{
“meter1/ActivePower”: [436,205,216,2668,638,604,568,530,492,452,414,376,400]
},
“collect”:[
“_sum/GridActivePower”,
“_sum/ConsumptionActivePower”
]
}
}
}
}

and when i tried to send this JSON request using API Tester like as described at the document I got this error: {
“jsonrpc”: “2.0”,
“id”: “fabe4276-cacd-4a4a-a437-cf1a30274ad7”,
“error”:{
“code”: 1,
“message”: “Unable to get Response: A Singleton Component for PID [Ess.Power] is already existing!”,
“data”:[
“Unable to get Response: A Singleton Component for PID [Ess.Power] is already existing!”
]
}
}

and another error in the consol said:Unable to start REST-Api Read-Write on port [8084]: Failed to bind to 0.0.0.0/0.0.0.0:8084

Ok :frowning: As I said, I have not used the Simulator for a while and maybe something broke in the meantime. Sorry.