sml

command module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/m29h/sml

This is a simple Go server for the Smart Message Language (SML) protocol, which is used by electricity meters in Germany. An optical interface on the meter repeatedly transmits SML messages containing current meter readings.

The tool reads messages from a Serial interface, parses them using the 3e8.eu/go/sml library and publishes them as Prometheus metrics.

The Prometheus metric labels are autogenerated from whatever is received from the Smart Energy Meter. The tool is not sending anything to the serial port, it is just receiving cyclical messages (typical smart energy meters transfer one "unsolicited" status message telegram every second)

The only configuration required is the serial port -serial (default: "/dev/ttyUSB0") to use and the TCP port for the HTTP Webserver -listen-address (default ":8080"). Configuration is provided by command line arguments.

Installation

go install github.com/m29h/sml@latest

#run with 
sml -serial /dev/ttyUSB0 -listen-address :8080  

#access metrics with
curl http://localhost:8080/metrics

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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