Monitor an electricity smart meter (OBIS) with prometheus and persist to a databse
- A digital electricity meter with data interface
- A IR reader with USB (ebay example device)
- A Raspberry Pi (I use a Zero W in my setup)
- Another Raspberry pi or other server able to run Grafana and Prometheus
# for your current machine
$ go build -o smartmeter
# for Raspberry Pi zero w
$ env GOOS=linux GOARCH=arm GOARM=6 go build -o smartmeter
Usage of ./smartmeter:
--db-flush duration Flush after duration (default 1m0s)
--db-host string Db host (default "localhost")
--db-name string Db name (default "root")
--db-password string Db password (default "root")
--db-port string Db port (default "5432")
--db-user string Db user (default "postgres")
--http-port string Port for http server serving prometheus endpoint (default "8080")
--persist string type of persistence: [none, postgres] (default "none")
--reader-port string Device name of reader (default "/dev/ttyUSB0")