vzlogger (en)


  • is a tool to read and log measurements of a wide variety of smartmeters and sensors to the middleware.
  • runs as a daemon in background.
  • includes a tiny onboard HTTPd to serve realtime readings to the AJAX web frontend.


  • evaluates middleware return code
  • buffering readings to RAM in case of:
    • network timeout
    • invalid middleware return code/exception or misconfiguration
  • „local interface“ onboard HTTPd ([9] )
  • easily extendable with new sensor/meter protocols
  • runs on embedded devices (Plug-Computers, Routers, Fluksos etc..)
  • portable (conforms to POSIX standards)



for installing the current version, refer to installation_cpp-version.

Meters & Protocols

The following table contains an overview of the existing protocols supported by vzlogger:

IDDescriptionStatusExample & UsecasesLinks & References
fileRead from file or fifoimplementedOWFS, /proc/ Filesystemread(3)
execParse program outputuntesteddigitempexec(3)
smlSML as used by EDL-21, eHz and SyM2 metersimplemented sml
s0S0-meter directly or indirectly (USB) connected to UART or GPIOimplementedQuick and dirty methods0-an-rs232
d0DLMS/D0 linebased cleartextimplemented DIN EN 62056-21
w1therm Support 1Wire-Sensors based on DSxxxxximplemented 1Wire Busmaster DS2482 ist Voraussetzung
ocrOCR (image processing/recognizing) with USB-Camimplemented
randomGenerate random values with a random walkimplementedTesting and demonstration
fluksov2Read from Flukso's onboard SPI fifoimplemented
fluksousbfluksousbplanned 'Bart's Protokoll'
vsm103Voldcraft VSM-103 Drehstromzählerplanned VSM-103
kd302Energiekostenmessgerät KD 302planned KD 302
ccostWeatherstation alike commercial smart metering systemplanned CurrentCost, Umweltsünde, Jibble
tweetawattKillAWatt mod with XBee wireless communicationplanned Sourcecode, Blog
ansiANSI standard that describes a protocol used for two-way communications with an electricity meter, mostly used in North American markets.planned ANSI C12
omsOpen Metering System, based on M-Bus communicationimplemented OMS Group


Vzlogger is able to push the gathered data to different backend systems for further processing or storage. This is done via the `api` parameter that is configured per channel. Vzlogger's default backend api is volkszaehler, which is the volkszaehler middleware. Additonal options are mysmartgrid and a 'null' api.


Example configuration is not runable, all the meter are deactivated

The vzlogger configuration is done with a file containing JSON encoded settings. General settings also can be set via the command line. You must have at least one meter in your configuration. Channels are optional. A meter can have more channels. Ex. if you want to log to multiple middleware servers.

All meter protocols have own properties. We do not describe them here in detail. Just take a look at the example configuration. It contains a meter for every protocol.

Example configurations are included in the distribution, see or in detail here in the wiki: vzlogger_conf_parameter

You can also find different user's configurations in the howto section.

You can also use these script: vzlogger.conf-editor

Meter Identifier Bemerkung
SML, D0 Obis-Codes z.B. 1-0:1.8.0 Welche Obis-Codes/Identifier gesendet werden ist abhängig vom Gerät
OMS Obis-Codes 1.8.0, 2.8.0, 1.7.0, 2.7.0 max. die 4 Obis-Codes, abhängig vom Gerät
S0 „Impulse“ und „Impulse_neg“ Anzahl Impulse (pro Sekunde)
S0 „Power“ und „Power_neg“ Impulse pro Zeiteinheit umgerechnet in „Leistung“ (per Parameter resolution)
1Wire ID des 1-Wire-Sensors Pro gefundenem Sensor ein Identifer mit Temp. als Wert
FluksoV2 2 pro Channel mittels ChannelId und -ChannelId Consumption = -ChannelId, Power = +ChannelId
File, Exec (leer) oder per $i erkannter Identifier z.B. $i = $v ⇒ Temperatur = 10 ⇒ Identifier „Temperatur“, Value = 10
OCR konfigurierbar siehe Config Option „identifier“
Random kein Identifier Name, nur Wert und Zeit

Command line parameters

parameterexample (default)description
--config-c/etc/vzlogger.confconfiguration file
--log-o/var/log/vzlogger/vzlogger.loglog file
--httpd-loffactivate local interface (tiny HTTPd which serves live readings)
--httpd-port-p8081TCP port for HTTPd
--help-h show short help
--verbose-vlevel0enable verbose output (0-15; 0 = log_alert, 1 = log_error, 3 = log-warning, 5 = log_info, 10 = log-debug, 15 = log_finest)
--version-V show version of vzlogger


For diagnostics usally the logfile is used because of vzlogger running under control of systemd. In cases this is not possible exit-codes will be shown.
E.g. calling systemctl status vzlogger shows something like: Main process exited, code=exited, status=1/FAILURE

1FAILUREgeneric failure, is also generated by unfeasible configuration when vzlogger is closed because of no active meters (example config from git)
64USAGEcli argument is bad
71OSERRmoving service to background (daemon) didn't work out
73CANTCREATvzlogger lacks the rights to write logfile
78CONFIGbrocken syntax in config-file

Generate Debian packages for your favorite platform

Package source seems to be defunct!
$ sudo echo "deb-src squeeze main non-free" >> /etc/apt/sources.list
$ sudo apt-get update
$ apt-get source vzlogger
$ cd vzlogger-<version>
$ sudo apt-get install debhelper
$ dpkg-buildpackage -b
software/controller/vzlogger/overview_en.txt · Zuletzt geändert: 2022/04/21 20:09 von jau