[vz-users] json - Konfigurator für vzlogger

Paul Muster paul at muster.dyndns.info
Sat Jan 19 11:13:29 CET 2013


On 19.01.2013 09:43, Rainer Gauweiler wrote:

> P.s.: Ich habe bisher lediglich zwei vzlogger-Konfigs erhalten. Benutzt
> das Ding sonst keiner?

Ich weiß nicht, was daran so spannend ist, aber hier meine:


> {  
> "retry" : 30,                   /* how long to sleep between failed requests, in seconds */
> "daemon": true,         /* run periodically */
> //"foreground" : true,          /* dont run in background (prevents forking) */
> "verbosity" : 15,               /* between 0 and 15 */
> "log" : "/var/log/vzlogger.log",/* path to logfile, optional */
> 
> "local" : {
>         "enabled" : true,       /* 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 requeste
>         "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" : [
>         {   
>         "protocol" : "s0",
>         "device" : "/dev/serUSB2",
>         "channel" : {
> //Stromzaehler 1  
>                 "uuid" : "12345678-4c5f-11e2-b793-987654321000",
>                 "middleware" : "http://127.0.0.1/volkszaehler.org/htdocs/middleware.php"
>                 }
>         },
>         { 
>         "protocol" : "s0",
>         "device" : "/dev/serUSB1",
>         "channel" : {
> //Stromzaehler 2 
>                 "uuid" : "12345678-4c5f-11e2-ade2-987654321000",
>                 "middleware" : "http://127.0.0.1/volkszaehler.org/htdocs/middleware.php"
>                 }
>         }, 
>         {  
>         "protocol" : "s0",
>         "device" : "/dev/serUSB0",
>         "channel" : {
> //Gaszaehler
>                 "uuid" : "12345678-4c5f-11e2-8edd-987654321000",
>                 "middleware" : "http://127.0.0.1/volkszaehler.org/htdocs/middleware.php"
>                 }
>         } /* Ende des letzten protocol-Eintrags */
>         ] /* Ende von meters */
> } /* Ende der Datei */

Zur Erzeugung der /dev/serUSBx gibt es eine Datei
/etc/udev/rules.d/10-USBserial.rules, in der die drei
Seriell-USB-Adapter anhand ihres Ports am USB-Hub sortiert werden:

KERNEL=="ttyUSB*", KERNELS=="1-2.2", SYMLINK+="serUSB0"
KERNEL=="ttyUSB*", KERNELS=="1-2.3", SYMLINK+="serUSB1"
KERNEL=="ttyUSB*", KERNELS=="1-2.4", SYMLINK+="serUSB2"


Viele Grüße

Paul



More information about the volkszaehler-users mailing list