Store the simulation data in InfluxDB and visualize the results in UI history

Hello There ;

I am trying to store the simulation results using InfluxDB In order to obtain the UI history. So I did the following:

  1. I followed the simulation steps according to “Getting Started guide” Link

  2. I run InfluxDB on my machine using PowerShell

  3. Then I configured Time data InfluxDB and I filled the required filed [I’m not sure about the API key, is it the same API token] ?, then I stucked !, what are the steps to collect the simulation data, store it in influxDB then getting the UI historical data ?

Hi Abdallah,

if you use the a version 1 influxdb this results to “username:password”.
if you use a version 2 influxdb this results to the API Token managed here:

Best regards!

1 Like

Thank you … I guess OpenEMS store the data directly in InfluxDB (no need for telegraf), am I right ?

Hi @Abdallah,

yes - data will be automatically stored in your influxdb when the component is active. I assume your “simulation data” is created by a “Simulator *****” Component. This data will aswell be stored in the influxdb.

Regards

1 Like

Hi @simonfey …Thank you very much … I started receiving “Data” from OpenEMS as shown in the below figure. However, I am not able to see the simulation values … So I tried to connect the InfluxDB to Grafana to visualize the results but i am not able to reach to the data… is there any advise to get it ?

Hi @Abdallah afaik there needs to be data in your influxdb when these channels/filters show up. So I guess you are pretty close. You can double check on:

  • Did you properly “Submit” the query?
  • Did you select a time window that actually contains data? (Past 15 minutes)
  • Does other data get stored except _sum/ConsumptionXXX?

You can also put a debug breakpoint in InfluxConnector:java:515 in order to make sure that your Edge or Backend is actually writing points to your influxdb.

1 Like

Hallo zusammen,

habe leider das Problem, dass bei meiner InfluxDB keine historischen Daten ans openEMS UI Edge zurückübertragen werden. Die Grafik zeigt keine Daten an. Im Log der InfluxDB steht folgendes:

Jan 20 03:17:17 raspberrypi influxd-systemd-start.sh[9200]: [httpd] 127.0.0.1 - - [20/Jan/2023:03:17:17 +0100] "POST /api/v2/query?org=- HTTP/1.1 " 403 100 “-” "influxdb-client-java/unknow>
Jan 20 03:17:17 raspberrypi influxd-systemd-start.sh[9200]: [httpd] 127.0.0.1 - - [20/Jan/2023:03:17:17 +0100] "POST /api/v2/query?org=- HTTP/1.1 " 403 100 “-” "influxdb-client-java/unknow>
Jan 20 03:17:18 raspberrypi influxd-systemd-start.sh[9200]: [httpd] 127.0.0.1 - - [20/Jan/2023:03:17:18 +0100] "POST /api/v2/write?org=-&bucket=db%2Fautogen&precision=ms HTTP/1.1 " 204 0 ">
Jan 20 03:17:29 raspberrypi influxd-systemd-start.sh[9200]: [httpd] 127.0.0.1 - - [20/Jan/2023:03:17:29 +0100] "POST /api/v2/write?org=-&bucket=db%2Fautogen&precision=ms HTTP/1.1 " 204 0 ">

meiner Meinung nach passt das laut “Get Started” :slight_smile:

An was kann es liegen? Im Log der UI finde ich folgendes:

20.1.2023, 03:29:38
INFO
io.openems.shared.influxdb.InfluxConnector
[InfluxDB] [monitor] Pool: 10/50, Pending: 0, Completed: 26, Active: 0 Queue:0/1000000