A question about influxDb

Hello OpenEMS community,

I hope you’re all doing well. I have a specific question regarding the process of sending data from OpenEMS to InfluxDB. Our main objective is to create a graph displaying historical data. We would greatly appreciate any guidance or advice on the best approach to achieve this seamlessly. Your expertise and insights will be invaluable to us. Thank you very much for taking the time to help. Looking forward to being an active part of this amazing community!

Hi Adnane,

that should not be too complicated to do.

  1. Install InfluxDB

Download InfluxDB from Downloads, install and run it. We still recommend the old version 1.8 - click on “Are you interested in InfluxDB 1.x Open Source?” to find it.

  1. Configure “Timedata InfluxDB” in OpenEMS Edge

You can configure it via Apache Felix Web Console or via OpenEMS UI “Install Component”. See the config settings here → https://github.com/OpenEMS/openems/blob/develop/io.openems.edge.timedata.influxdb/src/io/openems/edge/timedata/influxdb/Config.java

Now OpenEMS should continuously send data to InfluxDB and you should see data in the Historic tab in OpenEMS UI after a while.

Additionally I can recommend using Grafana to directly access the InfluxDB and visualize the recorded data.

Regards,
Stefan

thank you so much ,
I did all of this configuration but it did not work. I think i have to run openems Backend ?
For Grafana I will see the visualization directly or i have to do some configuration ?

Hmm, sad to hear that. We are internally working on better Backend documentation and fixing the GitPod live demo - maybe this should also include configuration examples for InfluxDB.

In general OpenEMS Backend is not required for this - but you could of course also try it. Follow the Getting Started Guide for setting up Backend and then configure the “Timedata.InfluxDB” service in OpenEMS Backend.

If you only want to see the data in OpenEMS UI, you could also configure “Timedata RRD4J”. It will store the data for visualization in local files.

Grafana will require additional configuration. The details are unfortunately out of scope for this thread (but could be also a target for our new Backend/GitPod demo… I will keep it in mind)

Regards,
Stefan

thank you so much ,
sir where can i find the data when i use Timedata RRD4J ???

It’s unfortunately harder to read the actual data from the RRD4J files.

OpenEMS Edge stores the RRD4J files in a directory under the openems.data.dir path. You would have to add -Dopenems.data.dir=/tmp/ to your command line to explicitely set it. Example: usr/bin/java -Dfelix.cm.dir=/etc/openems.d/ -Dopenems.data.dir=/tmp/ -jar /usr/lib/openems/openems.jar

(see https://github.com/OpenEMS/openems/blob/develop/io.openems.common/src/io/openems/common/OpenemsConstants.java#L147 and https://github.com/OpenEMS/openems/blob/develop/io.openems.edge.timedata.rrd4j/src/io/openems/edge/timedata/rrd4j/TimedataRrd4jImpl.java#L468C5-L468C21 for details on how this works internally)

The file format is the same as from rrdtool (RRDtool - About RRDtool), see GitHub - rrd4j/rrd4j: A high performance data logging and graphing system for time series data.

As mentioned: if you plan to read the data outside of OpenEMS UI, InfluxDB is clearly the better choice. But it requires some setup…

Regards,
Stefan