Git Product home page Git Product logo

dsmr2influx's Introduction

DSMR2Influx

Stores P1 port data in a InfluxDB database, to visualize with Grafana.

Inspired by psy0rz/p1_dsmr_to_influxdb. Uses ndokter/dsmr_parser to read the P1 port data.

NOTE: I switched to PostgreSQL with TimescaleDB for performance, stability and flexibility reasons. This repo is not maintained. See mhvis/p1postgres.

Getting started

With Docker Compose:

  1. Copy or download compose.yaml to a desired location: wget https://github.com/mhvis/dsmr2influx/raw/master/compose.yaml.
  2. Modify the configuration as required.
  3. Run docker compose up -d.
  4. To see if the containers have started correctly, use docker compose logs -f.

Steps after deployment:

  • Open Grafana and add a data source for InfluxDB.
  • Create a new dashboard or import the sample at ... .

Raspberry Pi

The Docker image is only for amd64 platforms. To run this image on an arm platform, build it yourself. (TODO: add arm image.)

Importing from DSMR-reader

This command imports data from DSMR-reader into your InfluxDB instance. It requires that the DSMR-reader API is enabled and accessible via the container.

docker compose run app python dsmrreaderimport.py <api-url> <api-key>

Note: when using localhost as url, because the command runs in a Docker container, localhost does not refer to the Docker host. Instead use 172.17.0.1.

When the InfluxDB instance already contains measurements, existing measurements with the same timestamp get overridden. So it is safe to import multiple times.

Backups

A note on the InfluxDB schema

Each telegram is stored as a telegram measurement in InfluxDB, and each field in the telegram is a field on the measurement. Field keys are the same as OBIS names, but in lowercase, for instance electricity_used_tariff_1 and instantaneous_voltage_l1.

Gas meter readings are stored in a separate measurement named gas_meter, because they update less frequent, often every 5 minutes or every hour. The measurement time is taken from the telegram. The field reading contains the value.

dsmr2influx's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.