Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
vzlogger
vzlogger…
- is a tool to read and log measurements of a wide variety of smartmeters and sensors to the volkszaehler.org middleware.
- can run as a daemon in background or via cron.
- includes a tiny onboard HTTPd to serve realtime readings to the AJAX web frontend.
Features
- evaluates middleware return code
- buffering readings 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)
Installation
vzlogger is hosted at https://github.com/volkszaehler/vzlogger.
installation
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:
ID | Description | Status | Example & Usecases | Links & References |
---|---|---|---|---|
file | Read from file or fifo | <html><span style=„color: green“>implemented</span></html> | OWFS, /proc/ Filesystem | read(3) |
exec | Parse program output | <html><span style=„color: orange“>untested</span></html> | digitemp | exec(3) |
sml | SML as used by EDL-21, eHz and SyM2 meters | <html><span style=„color: green“>implemented</span></html> | sml | |
s0 | S0-meter directly or indirectly (USB) connected to UART or GPIO | <html><span style=„color: green“>implemented</span></html> | Quick and dirty method | s0-an-rs232 |
d0 | DLMS/D0 linebased cleartext | <html><span style=„color: green“>implemented</span></html> | DIN EN 62056-21 | |
w1therm | Support 1Wire-Sensors based on DSxxxxx | <html><span style=„color: green“>implemented</span></html> | 1Wire Busmaster DS2582 ist Voraussetzung | |
ocr | OCR (image processing/recognizing) with USB-Cam | <html><span style=„color: green“>implemented</span></html> | ||
random | Generate random values with a random walk | <html><span style=„color: green“>implemented</span></html> | Testing and demonstration | |
fluksov2 | Read from Flukso's onboard SPI fifo | <html><span style=„color: green“>implemented</span></html> | ||
fluksousb | fluksousb | <html><span style=„color: red“>planned</span></html> | 'Bart's Protokoll' | |
vsm103 | Voldcraft VSM-103 Drehstromzähler | <html><span style=„color: red“>planned</span></html> | VSM-103 | |
kd302 | Energiekostenmessgerät KD 302 | <html><span style=„color: red“>planned</span></html> | KD 302 | |
ccost | Weatherstation alike commercial smart metering system | <html><span style=„color: red“>planned</span></html> | CurrentCost, Umweltsünde, Jibble | |
tweetawatt | KillAWatt mod with XBee wireless communication | <html><span style=„color: red“>planned</span></html> | Sourcecode, Blog | |
ansi | ANSI standard that describes a protocol used for two-way communications with an electricity meter, mostly used in North American markets. | <html><span style=„color: red“>planned</span></html> | ANSI C12 | |
oms | Open Metering System, based on M-Bus communication | <html><span style=„color: green“>implemented</span></html> | OMS Group |
APIs
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.
Configuration
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.
A detailed example configuration is included in the distribution, see https://github.com/volkszaehler/vzlogger/blob/master/etc/vzlogger.conf
You can also find different user's configurations in the howto section.
You can also use these script: vzlogger.conf-editor
Command line parameters
parameter | example (default) | description | |
---|---|---|---|
long | short | ||
--config | -c | /etc/vzlogger.conf | configuration file |
--log | -o | /var/log/vzlogger.log | log file |
--daemon | -d | off | run as daemon |
--httpd | -l | off | activate local interface (tiny HTTPd which serves live readings) |
--httpd-port | -p | 8080 | TCP port for HTTPd |
--help | -h | show short help | |
--verbose | -vlevel | 0 | enable verbose output (0-20) |
--version | -V | show version of vzlogger |
Links
- Sourcecode on github.com
Generate Debian packages for your favorite platform
$ sudo echo "deb-src http://packages.0l.de/debian/ 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