Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/koesie10/smartmeter

Application for reading a Dutch smart meter (DSMR) and saving the data to InfluxDB
https://github.com/koesie10/smartmeter

dsmr dsmr4 dsmr5 home-assistant influxdb mqtt p1 prometheus prometheus-exporter raspberry-pi smartmeter

Last synced: 4 months ago
JSON representation

Application for reading a Dutch smart meter (DSMR) and saving the data to InfluxDB

Awesome Lists containing this project

README

        

# smartmeter

Connects to P1 DSMR interface.

Influenced by [smeterd](https://github.com/nrocco/smeterd).

Licensed under MIT license.

## Development

```
go install github.com/koesie10/smartmeter/cmd/smartmeter
```

## Running

### As systemd service

```
sudo mv smartmeter /usr/local/bin
sudo chmod +x /usr/local/bin/smartmeter

sudo adduser --system --no-create-home --group smartmeter
sudo usermod -a -G dialout smartmeter

sudo nano /etc/systemd/system/smartmeter.service
```

```
[Unit]
Description=smartmeter
Wants=network-online.target
After=network-online.target
After=influxdb.service
AssertFileIsExecutable=/usr/local/bin/smartmeter

[Service]
User=smartmeter
Group=smartmeter

PermissionsStartOnly=true

Restart=always

ExecStart=/usr/local/bin/smartmeter publish --influx-database telegraf --influx-tags="house=myhouse"

[Install]
WantedBy=multi-user.target
```

```
sudo systemctl daemon-reload
sudo systemctl start smartmeter
sudo systemctl status smartmeter
sudo systemctl enable smartmeter
```

## Todo

- Checksum validation. I only have DSMR 2, so it was not necessary for me to implement.