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: about 1 year ago
JSON representation
Application for reading a Dutch smart meter (DSMR) and saving the data to InfluxDB
- Host: GitHub
- URL: https://github.com/koesie10/smartmeter
- Owner: koesie10
- License: mit
- Created: 2018-08-09T18:52:00.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2025-04-08T15:45:03.000Z (about 1 year ago)
- Last Synced: 2025-04-14T23:08:08.595Z (about 1 year ago)
- Topics: dsmr, dsmr4, dsmr5, home-assistant, influxdb, mqtt, p1, prometheus, prometheus-exporter, raspberry-pi, smartmeter
- Language: Go
- Homepage:
- Size: 221 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.