[vz-dev] vzlogger / d0 / (0.3.3-rc1)

NetFritz NetFritz at gmx.de
Wed Jul 25 18:23:21 CEST 2012


Am 25.07.2012 13:31, schrieb NetFritz:
> Hallo
> Habe auf meinem Wiregate (ALIX-Board mit Debian Lenny) über apt WG 
> <http://knx-user-forum.de/lexikon/tag/WG/>-Packerl (0.3.3-rc1) 
> GIT-Version vom 20 Apr 2012 installiert.
> Mit einem Perl-Script kann ich die Daten auslesen.
>
> Der EMH ED300L ist mit einem d0 Auslesekopf über USB am WG angeschlossen.
> Der Zähler muss mit 9600 8N1 ausgelesen werden.
> Habe vor vzlogger start die USB-Schnittstelle mit   "stty -F 
> /dev/ttyUSB0 9600" eingestellt.
> Hier meine vzlogger.conf :
> /**
>  * 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 */
> //"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 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" : [{
>         "protocol" : "d0",     /* see 'vzlogger -h' for list of 
> available protocols */
>         "device" : "/dev/ttyUSB0",
>         "channels": [{
>                 "uuid" : "fde8f1d0-c5d0-11e0-856e-f9e4360ced10",
>                 "middleware" : 
> "http://localhost/volkszaehler.org/htdocs/middleware.php",
>                 "identifier" : "1-0:2.8.0" /* Lieferung */
>                 }, {
>                     "uuid" : "a8da012a-9eb4-49ed-b7f3-38c95142a90c",
>                     "middleware" : 
> "http://localhost/volkszaehler.org/htdocs/middleware.php",
>                     "identifier" : "1-0:1.8.0", /* Bezug */
>                 }
>                     ]
>          }]
> }
>
> Die vzlogger.log mit verbosity:15 sieht so aus:
> [Jul 25 13:07:25]       Opened logfile /var/log/vzlogger.log
> [Jul 25 13:07:25][mtr0] Meter connection established
> [Jul 25 13:07:25][mtr0] Meter thread started
> [Jul 25 13:07:25][ch0]  Logging thread started
> [Jul 25 13:07:25][ch1]  Logging thread started
> [Jul 25 13:07:25][http] Starting local interface HTTPd on port 8080
>
> init.d gibt das aus bei vzlogger restart:
> Restarting smartmetering server: vzlogger[Jul 25 13:07:25][mtr0] New meter initialized (protocol=d0)
> [Jul 25 13:07:25][ch0]  New channel initialized (uuid=...42a90c middleware=http://localhost/volkszaehler.org/htdocs/middleware.php  id=1-0:1.8.0)
> [Jul 25 13:07:25][ch1]  New channel initialized (uuid=...0ced10 middleware=http://localhost/volkszaehler.org/htdocs/middleware.php  id=1-0:2.8.0)
> [Jul 25 13:07:25]       Daemonize process...
>
> Ist das alles so richtig?
> Falls ja, wie komme ich jetzt an die Daten?
> Die middleware soll nicht installiert werden.
>
> Gruß NetFritz
>
>
>
Hallo
Habe mal die vzlogger.conf  "protocol" : "d0" auf "sml" geändert.
Die Schnittstelle mit "stty -F /dev/ttyUSB0 9600" eingestellt.
init.d   vzlogger start
Dann vzlogger.log:
[Jul 25 16:47:18]       Opened logfile /var/log/vzlogger.log
[Jul 25 16:47:18][mtr0] Meter connection established
[Jul 25 16:47:18][mtr0] Meter thread started
[Jul 25 16:47:18][ch0]  Logging thread started
[Jul 25 16:47:18][ch1]  Logging thread started
[Jul 25 16:47:18][http] Starting local interface HTTPd on port 8080
[Jul 25 16:47:20][mtr0] Got 10 new readings from meter:
[Jul 25 16:47:20][mtr0] Reading: id=129-129:199.130.3*255 value=0.00 
ts=1343227640.417
[Jul 25 16:47:20][mtr0] Reading: id=1-0:0.0.9*255 value=0.00 
ts=1343227640.417
[Jul 25 16:47:20][mtr0] Reading: id=1-0:1.8.0*255 value=119552.50 
ts=1343227640.417
[Jul 25 16:47:20][mtr0] Reading: id=1-0:2.8.0*255 value=236985.30 
ts=1343227640.417
[Jul 25 16:47:20][mtr0] Reading: id=1-0:1.8.1*255 value=119552.50 
ts=1343227640.417
[Jul 25 16:47:20][mtr0] Reading: id=1-0:2.8.1*255 value=236985.30 
ts=1343227640.417
[Jul 25 16:47:20][mtr0] Reading: id=1-0:1.8.2*255 value=0.00 
ts=1343227640.417
[Jul 25 16:47:20][mtr0] Reading: id=1-0:15.7.0*255 value=2033.00 
ts=1343227640.417
[Jul 25 16:47:20][mtr0] Reading: id=129-129:199.130.5*255 value=0.00 
ts=1343227640.417
[Jul 25 16:47:20][mtr0] Reading: id=0-0:0.0.0*0 value=0.00 ts=0.000
[Jul 25 16:47:20][mtr0] Updating interval to 2
[Jul 25 16:47:20][ch0]  Adding reading to queue (value=119552.50 
ts=1343227640.417)
[Jul 25 16:47:20][ch0]  JSON request body: [ [ 1343227640417.295898, 
119552.500000 ] ]
[Jul 25 16:47:20][ch0]  Buffer dump (size=1 keep=300): {119552.50!}
[Jul 25 16:47:20][ch1]  Adding reading to queue (value=236985.30 
ts=1343227640.417)
[Jul 25 16:47:20][ch1]  JSON request body: [ [ 1343227640417.298096, 
236985.300000 ] ]
[Jul 25 16:47:20][ch1]  Buffer dump (size=1 keep=300): {236985.30!}

vzlogger scheint zu laufen.
Wie komme ich jetzt an die Daten?
Gruß NetFritz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://volkszaehler.org/pipermail/volkszaehler-dev/attachments/20120725/5f8aa1fb/attachment-0001.html>


More information about the volkszaehler-dev mailing list