Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.
/ smartmeter Public archive

Monitor an electricity smart meter (OBIS) with prometheus and persist to a db

License

Notifications You must be signed in to change notification settings

panzerdev/smartmeter

Repository files navigation

Smartmeter

Monitor an electricity smart meter (OBIS) with prometheus and persist to a databse

Image of Grafana Dashboard

Setup

What you need

  • 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

Final setup

Run app

Compile

# for your current machine
$ go build -o smartmeter

# for Raspberry Pi zero w 
$ env GOOS=linux GOARCH=arm GOARM=6 go build -o smartmeter

Run

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")

About

Monitor an electricity smart meter (OBIS) with prometheus and persist to a db

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published