[vz-dev] iskra mt671 vzlogger.conf

cero at freenet.de cero at freenet.de
Fri Feb 6 17:24:23 CET 2015


danke udo



Am 05.02.2015 um 21:14 schrieb Udo1:
>
> Am 05.02.2015 um 21:03 schrieb cero at freenet.de:
>> ok- ich habe es hinbekommen- wenn man genau die einzelnen abschnitte 
>> betrachtet, ist es gar nicht so schwer.
>> eine frage habe ich für heute noch - mit welchem befehl kann ich den 
>> vzlogger daemon wieder stoppen oder muss ich ihn mit "kill" abwürgen ? 
> Sollte so aussehen:
>
> --------------------------------------------------------------
> /**
>  * vzlogger configuration
>  *
>  * use proper encoded JSON with javascript comments
>  *
>  * take a look at the wiki for detailed information:
>  * 
> http://wiki.volkszaehler.org/software/controller/vzlogger#configuration
> */
>
> {
>     "retry": 30,            // how long to sleep between failed 
> requests, in seconds
>     "daemon": true,        // run periodically
>     "verbosity": 5,         // between 0 and 15
>     "log": "/var/log/vzlogger.log",     // path to logfile, optional
>
>     "local": {
>         "enabled": false,   // should we start the local HTTPd for 
> serving live readings?
>         "port": 8080,       // the TCP port for the local HTTPd
>         "index": true,      // should we provide a index listing of 
> available channels if no UUID was requested?
>         "timeout": 30,      // timeout for long polling comet 
> requests, 0 disables comet, in seconds
>         "buffer": 600       // how long to buffer readings for the 
> local interface, in seconds
>     },
>
>     "meters": [
>         {
>             "enabled": false,               // disabled meters will be 
> ignored (default)
>             "skip": false,                  // if enabled, errors when 
> opening meter will lead to meter being ignored
>             "protocol": "sml",              // see 'vzlogger -h' for 
> list of available protocols
>             "host": "http://localhost/meinzaehler.dyndns.info:7331",
>             "channels": [{
>                 "api": "volkszaehler",      // default middleware api: 
> volkszaehler.org
>                 "uuid": "fde8f1d0-c5d0-11e0-856e-f9e4360ced10",
>                 "middleware": "http://localhost/middleware.php",
>                 "identifier": "power"       // alias for '1-0:1.7.ff', 
> see 'vzlogger -h' for list of available aliases
>             }, {
>                 "uuid": "a8da012a-9eb4-49ed-b7f3-38c95142a90c",
>                 "middleware": "http://localhost/middleware.php",
>                 "identifier": "counter"
>             }, {
>                 "uuid": "d5c6db0f-533e-498d-a85a-be972c104b48",
>                 "middleware": "http://localhost/middleware.php",
>                 "identifier": "1-0:1.8.0"   // see 'vzlogger -v20' for 
> an output with all available identifiers/OBIS ids
>             }]
>         },
>         {
>             "enabled": false,               // disabled meters will be 
> ignored
>             "skip": false,                  // if enabled, errors when 
> opening meter will lead to meter being ignored
>             "protocol": "s0",
>             "aggtime": 300,                 // aggregate all signals 
> and give one update to middleware every 300 seconds
>             "aggfixedinterval": true,       // round all timestamps to 
> middleware to nearest aggtime
>             "device": "/dev/ttyUSB0",
>             "channel": {
>                 "identifier": "Impulse",    // s0 meter knows 
> "Impulse" and "Power"
>                 "uuid": "d495a390-f747-11e0-b3ca-f7890e45c7b2",
>                 "middleware": "http://localhost/middleware.php",
>                 "aggmode": "SUM"            // add all s0 intervals in 
> the aggregation
>             }
>         },
>         {
>             "enabled": true,               // disabled meters will be 
> ignored (default)
>             "skip": false,                  // if enabled, errors when 
> opening meter will lead to meter being ignored
>             "protocol": "d0",               // see 'vzlogger -h' for 
> list of available protocols
>             "device": "/dev/usb-ir-lesekopf0",
> //          "dump_file": "/var/log/dumpD0.txt", // optional, if set 
> logs all received/transmitted data to this file
> //          "read_timeout": 10, // optional, default 10s. Timeout 
> value in secs between single bytes received from device
> //          "baudrate_change_delay": 400, // optional, default none. 
> Delay value in ms after ACKSEQ send before baudrate change
>             "parity": "7E1",                // oder 8N1
>             "baudrate": 9600,               // oder 300
> //          "pullseq": "2F3F210D0A",        // Pullsequenz 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" gesetzt werden, damit die 
> Sequenz autom. berechnet wird und autom. auf die max. Baudrate 
> umgeschaltet wird (baudrate_read wird dann ignoriert)
> //          "baudrate_read": 300,           // Baudratenumschaltung 
> auf gewünschte Baudrate, abhängig von Zählerantwort
> //          "aggtime": 20,                  // in Sekunden
> //          "aggmode": "AVG",               // Mittelwert für 
> Leistung, "MAX" für Zähler, "SUM" für Counter
>             "interval": 6,                  // Wartezeit in Sekunden 
> bis neue Werte in die middleware übertragen werden
>             "channel": {                    // Beispiel-channel
>                 "uuid": "3cf936c0-ac9f-11e4-9aa8-39e5652378ace",
>                 "middleware": "http://127.0.0.1/middleware.php",
>                 "identifier": "1-0:1.8.1"   // alias for '1-0:1.8.1', 
> see 'vzlogger -h' for list of available aliases
>             }
>         },
>         {
>             "enabled": true,               // disabled meters will be 
> ignored (default)
>             "skip": false,                  // if enabled, errors when 
> opening meter will lead to meter being ignored
>             "protocol": "d0",               // see 'vzlogger -h' for 
> list of available protocols
>             "device": "/dev/usb-ir-lesekopf1",
> //          "dump_file": "/var/log/dumpD0.txt", // optional, if set 
> logs all received/transmitted data to this file
> //          "read_timeout": 10, // optional, default 10s. Timeout 
> value in secs between single bytes received from device
> //          "baudrate_change_delay": 400, // optional, default none. 
> Delay value in ms after ACKSEQ send before baudrate change
>             "parity": "7E1",                // oder 8N1
>             "baudrate": 9600,               // oder 300
> //          "pullseq": "2F3F210D0A",        // Pullsequenz 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" gesetzt werden, damit die 
> Sequenz autom. berechnet wird und autom. auf die max. Baudrate 
> umgeschaltet wird (baudrate_read wird dann ignoriert)
> //          "baudrate_read": 300,           // Baudratenumschaltung 
> auf gewünschte Baudrate, abhängig von Zählerantwort
> //          "aggtime": 20,                  // in Sekunden
> //          "aggmode": "AVG",               // Mittelwert für 
> Leistung, "MAX" für Zähler, "SUM" für Counter
>             "interval": 6,                  // Wartezeit in Sekunden 
> bis neue Werte in die middleware übertragen werden
>             "channel": {                    // Beispiel-channel
>                 "uuid": "b2008d00-ac5e-11e4-a2d9-1556592a5e36",
>                 "middleware": "http://127.0.0.1/middleware.php",
>                 "identifier": "1-0:1.8.1"   // alias for '1-0:1.8.1', 
> see 'vzlogger -h' for list of available aliases
>             }
>         },
>
>         // examples for non-device protocols
>         {
>             "enabled": false,               // disabled meters will be 
> ignored
>             "skip": false,                  // if enabled, errors when 
> opening meter will lead to meter being ignored
>             "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,                  // if enabled, errors when 
> opening meter will lead to meter being ignored
>             "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                   // of ommitted, we will 
> try to listen on changes with inotify
>         },
>
>         // examples for Flukso-based sensors
>         {
>             "enabled": false,               // disabled meters will be 
> ignored
>             "skip": false,                  // if enabled, errors when 
> opening meter will lead to meter being ignored
>             "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" e.g.
>             }
>         },
>
>         // examples for MySmartGrid as middleware
>         {
>             "enabled": false,               // disabled meters will be 
> ignored
>             "skip": false,                  // if enabled, errors when 
> opening meter will lead to meter being ignored
>             "protocol": "d0",               // see 'vzlogger -h' for 
> list of available protocols
>             "device": "/dev/ttyUSB2",
>             "interval": 2,
>             "resolution": 2000,
>             "channels": [{
>                 "api": "mysmartgrid",       // use MySmartgrid as 
> middleware api
>                 "type": "sensor",
>                 "uuid": "01234567-9abc-def0-1234-56789abcdefe",
>                 "secretKey": "0123456789abcdef0123456789abcdef",
>                 "interval": 300,
>                 "middleware": "https://api.mysmartgrid.de:8443", // 
> identifier for measurement: 1-0:1.8.0
>                 "identifier": "1-0:1.8.0",  // see 'vzlogger -v20' for 
> an output with all available identifiers/OBIS ids
>                 "scaler": 1000              // d0 counter is in kWh, 
> so scaling is 1000
>             }]
>         },
>         {
>             "enabled": false,               // disabled meters will be 
> ignored
>             "skip": false,                  // if enabled, errors when 
> opening meter will lead to meter being ignored
>             "protocol": "sml",              // see 'vzlogger -h' for 
> list of available protocols
>             "device": "/dev/ttyUSB0",
>             "interval": 2,
>             "resolution": 2000,
>             "channels": [{
>                 "api": "mysmartgrid",       // use MySmartgrid as 
> middleware api
>                 "type": "sensor",
>                 "uuid": "01234567-9abc-def0-1234-56789abcdefe",
>                 "secretKey": "0123456789abcdef0123456789abcdef",
>                 "interval": 300,
>                 "middleware": "https://api.mysmartgrid.de:8443", // 
> identifier for measurement: 1-0:1.8.0
>                 "identifier": "1-0:1.8.0",  // see 'vzlogger -v20' for 
> an output with all available identifiers/OBIS ids
>                 "scaler": 1                 // sml counter is in Wh, 
> so scaling is 1
>             }]
>         },
>         {
>             "enabled": false,               // disabled meters will be 
> ignored
>             "skip": false,                  // if enabled, errors when 
> opening meter will lead to meter being ignored
>             "protocol": "s0",               // see 'vzlogger -h' for 
> list of available protocols
>             "device": "/dev/ttyUSB1",
>             "interval": 2,
>             "resolution": 2000,
>             "channels": [{
>                 "api": "mysmartgrid",       // use MySmartgrid as 
> middleware api
>                 "type": "sensor",
>                 "uuid": "01234567-9abc-def0-1234-56789abcdefe",
>                 "secretKey": "0123456789abcdef0123456789abcdef",
>                 "interval": 300,
>                 "middleware": "https://api.mysmartgrid.de:8443", // 
> identifier for measurement: 1-0:1.8.0
>                 "identifier": "counter",
>                 "scaler": 1-0               // s0 counter is in Wh
>             }]
>         }
>     ]
> }
>
>
> Ja, mit killall.
>
> Gruß
> Udo
>
>
>



More information about the volkszaehler-dev mailing list