Git Product home page Git Product logo

dsmr-influxdb-adapter-rs's Introduction

InfluxDB Adapter for DSMR5.0 compatible Dutch Smart Meters

This is a Rust application that reads data from a Dutch Smart Meter using a serial connection to the P1 port. Currently only the DSMRS5.0 protocol is supported.

Requirements:

  • P1 to USB-cable
  • Something to plug the cable in and run this program
  • InfluxDB on the same machine as this program
  • Optional: Grafana to visualize the InfluxDB data

Install

  1. Install InfluxDB and optionally Grafana.
  2. Checkout this repo.
  3. Make sure libudev-dev and libssl-dev are installed:
sudo apt-get install libudev-dev && sudo apt-get install libssl-dev
  1. Check the serial path (by default /dev/ttyUSB0) and change according to your setup.
  2. Check the InfluxDB database name (by default p1meter).
  3. Test if it works by running cargo run (if you don't have the Rust toolchain installed click here)
  4. Finally, run cargo build to create the binary executable. Use this executable as you wish, for example add it as systemd service so that it automatically starts and restarts.

Create /etc/systemd/system/smart-meter.service:

[Unit]
Description=InfluxDB-DSMR Adapter Process

[Service]
ExecStart=/home/<user>/path/to/dsmr-influxdb-adapter-rs/target/debug/dsmr-influxdb-adapter
Restart=always

[Install]
WantedBy=multi-user.target

And run sudo systemctl enable smart-meter.service.

Usage

Use a data visualization tool that uses InfluxDB as data source to create some nice graphs and/or dashboards. For example: Screenshot 2021-02-12 at 20 39 05

Disclaimer: I probably forgot to document something...

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.