digitaldex / piMeter_grafana

Software for piMeter EnergyMonitor
https://www.digitaldex.de/
MIT License
7 stars 2 forks source link
energy-management-systems raspberry-pi smartmeter

piMeter - a SmartMeter for Raspberry Pi

This repo contains the software for the piMeter_hardware project. You need a running InfluxDB and Grafana installation. A Tutorial on how to setup can be found at www.digitaldex.de

Setup Raspberry Pi

Enable SPI

sudo raspi-config
-> Interface Option
-> Enable SPI

Install Dependencies

// Install bcm2835 Library
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.52.tar.gz
tar zxvf bcm2835-1.52.tar.gz
./configure
make
sudo make check
sudo make install

Change influxdb credentials in main.cpp

influxdb_cpp::server_info si("IP", 8086, "DB", "user", "password");

Build piMeter

g++ main.cpp spiComm.cpp -o piMeter -lbcm2835

Run piMeter

// bcm2835 Lib needs root
sudo ./piMeter &

Visualization

alt text

Example Grafana Export can be found in the /visu folder