/** * vzlogger configuration * * Use properly encoded JSON with javascript comments * * Take a look at the wiki for detailed information: * http://wiki.volkszaehler.org/software/controller/vzlogger#configuration * * For an online configuration editor refer to: * http://volkszaehler.github.io/vzlogger/ */ { // General settings "daemon": false, // run periodically "verbosity": 5, // log verbosity (0=log_alert, 1=log_error, 3=log_warning, 5=log_info, 10=log_debug, 15=log_finest) "log": "/var/log/vzlogger.log", // log file, optional "retry": 30, // http retry delay in seconds // Build-in HTTP server "local": { "enabled": false, // enable local HTTPd for serving live readings "port": 8080, // TCP port for local HTTPd "index": true, // provide index listing of available channels if no UUID was requested "timeout": 30, // timeout for long polling comet requests in seconds (0 disables comet) "buffer": -1 // HTTPd buffer configuration for serving readings, default -1 // >0: number of seconds of readings to serve // <0: number of tuples to server per channel (e.g. -3 will serve 3 tuples) }, // realtime notification settings "push": [ { "url": "http://127.0.0.1:5582" // notification destination, e.g. frontend push-server } ], // mqtt client support (if ENABLE_MQTT set at cmake generation) "mqtt": { "enabled": false, // enable mqtt client. needs host and port as well "host": "test.mosquitto.org", // mqtt server addr "port": 1883, // 1883 for unencrypted, 8883 enc, 8884 enc cert needed, "cafile": "", // optional file with server CA "capath": "", // optional path for server CAs. see mosquitto.conf. Specify only cafile or capath "certfile": "", // optional file for your client certificate (e.g. client.crt) "keyfile": "", // optional path for your client certficate private key (e.g. client.key) "keypass": "", // optional password for your private key "keepalive": 30, // optional keepalive in seconds. "topic": "vzlogger/data", // optional topic dont use $ at start and no / at end "user": "", // optional user name for the mqtt server "pass": "", // optional password for the mqtt server "retain": false, // optional use retain message flag "rawAndAgg": false, // optional publish raw values even if agg mode is used }, // Meter configuration "meters": [ /** { // Example SML meter "enabled": false, // disabled meters will be ignored (default) "skip": false, // errors when opening meter may be ignored if enabled "protocol": "sml", // meter protocol, see 'vzlogger -h' for full list "device": "/dev/ttyUSB1", // meter device // "host": "http://my.ddns.net::7331", // uri if meter not locally connected using "aggtime": 10, // aggregate meter readings and send middleware update after seconds "channels": [{ "api": "volkszaehler", // middleware api, default volkszaehler "uuid": "fde8f1d0-c5d0-11e0-856e-f9e4360ced10", "middleware": "http://localhost/middleware.php", "identifier": "power" // OBIS identifier (alias for '1-0:1.7.ff') // see 'vzlogger -h' for available aliases // see 'vzlogger -v20' for available identifiers for attached meters }, { "uuid": "a8da012a-9eb4-49ed-b7f3-38c95142a90c", "middleware": "http://localhost/middleware.php", "identifier": "counter", // OBIS identifier "duplicates": 10 // duplicate handling, default 0 (send duplicate values) // >0: send duplicate values only each seconds // Activate only for abs. counter values (Zaehlerstaende) and not for impulses }, { "uuid": "d5c6db0f-533e-498d-a85a-be972c104b48", "middleware": "http://localhost/middleware.php", "identifier": "1-0:1.8.0" // OBIS identifier }] }, { // Example S0 meter "enabled": false, // disabled meters will be ignored (default) "skip": false, // errors when opening meter may be ignored if enabled "protocol": "s0", // meter protocol, see 'vzlogger -h' for full list "device": "/dev/ttyUSB0", // meter device "aggtime": 300, // aggregate meter readings and send middleware update after seconds "aggfixedinterval": true, // round timestamps to nearest before sending to middleware "channel": { "identifier": "Impulse", // s0 meter knows "Impulse" and "Power" "uuid": "d495a390-f747-11e0-b3ca-f7890e45c7b2", "middleware": "http://localhost/middleware.php", "aggmode": "SUM" // aggregation mode: aggregate meter readings during interval // "SUM": add readings (use for s0 impulses) // "MAX": maximum value (use for meters sending absolute readings) // "AVG": average value (use for meters sending current usage) } }, */ { // Example D0 meter / enable = true und Test 2 VL-Temp: UUID = b6992b60-a00d-11ea-a2c1-435966815451 eingefügt / Baudrate geändert von 9600 auf 300 / ackseq = 063030300d0a / baudrate read = 2400 / parity = 7E1 // / read_timeout von 10 sek / interval von 0 auf 5 / "enabled": true, // disabled meters will be ignored (default) "skip": false, // errors when opening meter may be ignored if enabled "protocol": "d0", // meter protocol, see 'vzlogger -h' for full list "device": "/dev/ttyUSB0", // meter device "dump_file": "/var/log/d0.txt", // detailed log file for all received/transmitted data (optional) "parity": "7E1", // Serial parity, 7E1 or 8N1 "baudrate": 300, // Serial baud rate, typically 9600 or 300 // optional D0 interface settings "pullseq": "2F3F210D0A", // Pull sequence in 'hex' "ackseq": "063030300d0a", // optional (default: keine Antwortsequenz auf Zaehlerantwort) kann entweder feste hex-Sequenz sein (z.B. 063035300d0a für mode C mit 9600bd oder 063030300d0a = 300bd) oder kann auf "auto" ges$ "read_timeout": 10, // optional read timeout, default 10s. Data reading is considered finished if no state change after that timeout "baudrate_change_delay": 400, // optional, default none. Delay value in ms after ACKSEQ send before baudrate change "baudrate_read": 2400, // Baudratenumschaltung auf gewünschte Baudrate, abhängig von Zählerantwort "aggtime": 20, // aggregate meter readings and send middleware update after seconds "interval": 5, // Wartezeit in Sekunden bis neue Werte in die middleware übertragen werden "channel": { "uuid": "b6992b60-a00d-11ea-a2c1-435966815451", "middleware": "http://localhost/middleware.php", "identifier": "1-0:1.8.1", // OBIS identifier "aggmode": "MAX", // aggregation mode: aggregate meter readings during interval } }, /** // examples for non-device protocols { "enabled": false, // disabled meters will be ignored "skip": false, // errors when opening meter may be ignored if enabled "protocol": "random", "interval": 2, "max": 40.0, // has to be double! "min": -5.0, // has to be double! "channel": { "uuid": "bac2e840-f72c-11e0-bedf-3f850c1e5a66", "middleware": "http://localhost/middleware.php" } }, { "enabled": false, // disabled meters will be ignored "skip": false, // errors when opening meter may be ignored if enabled "protocol": "file", "path": "/proc/loadavg", // "format": "$i $v $t", // a format string for parsing complex logfiles // arbitrary text and whitespaces are allowed, see 'scanf()' // at least $v has to be used // $i => identifier, $v => value, $t => timestamp "rewind": true, // reset file pointer each interval to the beginning of the file "interval": 2 // if ommitted, we will try to listen on changes with inotify }, { "enabled": false, // disabled meters will be ignored "skip": false, // if enabled, errors when opening meter will lead to meter being ignored "protocol": "exec", "command": "python /path/to/yourscript.py", // is the command line as you'll type it in the shell - remember to test your command from the root directory // "format": "$i $v $t", // a format string for parsing complex logfiles // arbitrary text and whitespaces are allowed, see 'scanf()' // at least $v has to be used // $i => identifier, $v => value, $t => timestamp "interval": 2 }, // examples for Flukso-based sensors { "enabled": false, // disabled meters will be ignored "skip": false, // errors when opening meter may be ignored if enabled "protocol": "fluksov2", "fifo": "/var/spid/delta/out", "channel": { "uuid": "3b4da450-42a8-11e1-8b8d-c526d853edec", "middleware": "http://localhost/middleware.php", "identifier": "sensor0/power" // or "sensor2/consumption" } }, // example for 1wire temp sensors { "enabled": false, "skip": true, "protocol": "w1therm" }, */ /** // example OMS or M-Bus meter / mbus_debug = true { "enabled": true, "allowskip": false, "interval": 0, "aggtime": 20, "aggfixedinterval": false, "channels": [ { "api": "volkszaehler", "uuid": "b6992b60-a00d-11ea-a2c1-435966815451", "identifier": "1-0:1.8.1", "middleware": "http://localhost/middleware.php", "aggmode": "max", "duplicates": 0 } ], "protocol": "oms", "device": "/dev/ttyUSB0", "baudrate": 2400, "key": "0102030405060708090a0b0c0d0e0f10", "mbus_debug": true, "use_local_time": false, "dump_file": "/var/log/OMS.txt", "pullseq": "2F3F210D0A", "ackseq": "auto", "baudrate_read": 2400, "parity": "8e1", "wait_sync": "off", "read_timeout": 10, "baudrate_change_delay": 400 } */ ] }