gotsmart

command module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2021 License: BSD-3-Clause Imports: 14 Imported by: 0

README

GotSmart

GotSmart collects information from the Dutch SlimmeMeter (translated as Smart Meter) and exports them as Prometheus metrics.

Setup

Build
go get github.com/basvdlei/gotsmart
Run

Specify the serial device that is connected with the Smart Meter.

gotsmart -device /dev/ttyS0

Setup with Docker

Build
docker build -t gotsmart .
Run

Make sure to add the serial device that is connected with the Smart Meter to the container. (ttyS0, ttyUSB0, ttyAMA0, etc)

docker run -d -p 8080:8080 --device /dev/ttyS0:/dev/ttyS0 gotsmart

Usage

By default gotsmart listens on port 8080 and exposes the metrics under /metrics.

Build for Raspberry Pi

GotSmart also runs on a Raspberry Pi. To cross compile:

GOARCH=arm go build

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package crc16 implements CRC-16-IBM/CRC-16-ANSI reversed.
Package crc16 implements CRC-16-IBM/CRC-16-ANSI reversed.
Package dsmr implements DSMR P1 frame reading.
Package dsmr implements DSMR P1 frame reading.
prometheus
Package prometheus implements a collector of DSMR metrics for Prometheus.
Package prometheus implements a collector of DSMR metrics for Prometheus.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL