Timedata

A OpenEMS Edge Timedata service is responsible for…​

  • persisting values of Channels over time

  • providing historic data e.g. for OpenEMS UI History

1. InfluxDB

Persists all data of OpenEMS Edge Channels to an InfluxDB timeseries database. The implementation is compatible with InfluxDB v1 and v2.

1.1. InfluxDB v1

To setup the InfluxDB Timedata service with InfluxDB:

  1. Download from InfluxDB Download portal → "Are you interested in InfluxDB 1.x Open Source?"

  2. Extract downloaded archive

  3. Adjust the 'influxdb.conf' configuration file:

    1. Directory for metadata:

      [meta]
        dir = "/opt/influxdb/meta" # on Linux
        dir = "C:/influxdb/meta" # on Windows
    2. Directory for TSM and WAL files:

      [data]
        dir = "/opt/influxdb/data" # on Linux
        dir = "C:/influxdb/data" # on Windows
      
        wal-dir = "/opt/influxdb/wal" # on Linux
        wal-dir = "C:/influxdb/wal" # on Windows
    3. Enable HTTP endpoint and Flux query language in InfluxDB v1:

      [http]
        enabled = true
        flux-enabled = true
  4. Run InfluxDB Server

    1. Open a new Terminal

    2. Run InfluxDB Server…​

      influxd.exe -config influxdb.conf
  5. Create database

    1. Open a new Terminal

    2. Run InfluxDB Client

      influx.exe
    3. Create database

      Connected to http://localhost:8086 version 1.8.10
      InfluxDB shell version: 1.8.10
      > CREATE DATABASE db;
      exit
      You should see a log in InfluxDB Server: "[httpd] "POST /query?chunked=true&db=&epoch=ns&q=CREATE+DATABASE+db%3B HTTP/1.1 " 200 57"
  6. Start OpenEMS Edge via EdgeApp.bndrun

  7. Open Apache Felix Web Console (http://localhost:8080/system/console/configMgr)

  8. Add Configuration for Timedata InfluxDB:

    • URL: http://localhost:8086

    • Org: -

    • Bucket: db/data

      You should see logs in InfluxDB Server: "[httpd] "POST /api/v2/write?org=-&bucket=db%2Fautogen&precision=ms HTTP/1.1 " 204 0"

2. RRD4J

Persists data of OpenEMS Edge Channels to RRD4J files.