Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/koesie10/smartmeter
- Owner: koesie10
- License: mit
- Created: 2018-08-09T18:52:00.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-08-26T15:39:11.000Z (5 months ago)
- Last Synced: 2024-10-01T05:20:57.477Z (4 months ago)
- Topics: dsmr, dsmr4, dsmr5, home-assistant, influxdb, mqtt, p1, prometheus, prometheus-exporter, raspberry-pi, smartmeter
- Language: Go
- Homepage:
- Size: 271 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 8
-
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/smartmetersudo adduser --system --no-create-home --group smartmeter
sudo usermod -a -G dialout smartmetersudo 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=smartmeterPermissionsStartOnly=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.