https://github.com/ppostma/slimmemeter-stats
Simple application for reading the Dutch "Slimme meter" via the P1 port and generating graphics with RRDtool.
https://github.com/ppostma/slimmemeter-stats
p1 raspberrypi ruby slimmemeter
Last synced: about 2 months ago
JSON representation
Simple application for reading the Dutch "Slimme meter" via the P1 port and generating graphics with RRDtool.
- Host: GitHub
- URL: https://github.com/ppostma/slimmemeter-stats
- Owner: ppostma
- Created: 2019-04-18T18:31:13.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-18T18:35:19.000Z (about 7 years ago)
- Last Synced: 2025-08-24T21:15:00.120Z (11 months ago)
- Topics: p1, raspberrypi, ruby, slimmemeter
- Language: Ruby
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Slimme meter stats
Simple application for reading the Dutch "Slimme meter" via the P1 port and generating graphics with RRDtool.
## Requirements
This application expects an P1 to USB cable connected as `/dev/ttyUSB0`.
The following packages are required:
* Ruby
* RRDtool
* Nginx (or another webserver; example for nginx is included)
* fcgiwrap (when using nginx)
## Installation
Make sure you have installed bundler:
```bash
gem install bundler
```
Run bundle install to install the dependencies:
```bash
bundle install --path vendor
```
Start the slimme meter updater in the background:
```bash
bundle exec ruby slimmemeter.rb -d -r /var/lib/rrd/power.rrd
```
Nginx configuration:
```
server {
...
# Pass CGI scripts to FastCGI server
location /cgi-bin/ {
fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_param POWER_RRD /var/lib/rrd/power.rrd;
include /etc/nginx/fastcgi_params;
}
}
```
Place the files in the `www` directory of your web directory. Make sure you put the *.cgi files in the cgi-bin directory of your document root.