[vz-dev] vzlogger an raspberry tut nicht

Dietmar Spielhofer dietmar.spielhofer at inode.at
Sun Mar 31 22:24:57 CEST 2013


Hallo,
habe das raspberry-image vom 10.2.2013 aufgesetzt, und entsprechend
http://wiki.volkszaehler.org/howto/raspberry_pi_image konfiguriert.
Ich habe zwei s0-Zähler auf der Platine von Udo laufen.
Nachdem es nicht gleich so richtig tut, bin ich am debuggen gemäß Wiki.

Output von vzlogger -f:

root at raspberrypi:/var/www/volkszaehler.org/htdocs# vzlogger -f
[Mar 31 22:06:42][mtr0] Creating new meter with protocol random.
[Mar 31 22:06:42][mtr0] Meter configured.
[Mar 31 22:06:42]       New meter initialized (protocol=random)
[Mar 31 22:06:42]       Configure channel.
[Mar 31 22:06:42][chn0] New channel initialized (uuid=...61b6a8 
protocol=volkszaehler id=(none))
[Mar 31 22:06:42]       Have 1 meters.
[Mar 31 22:06:42][main] foreground=1, daemon=1, local=1
[Mar 31 22:06:42]       NOT Daemonize process...
[Mar 31 22:06:42]       Opened logfile /var/log/vzlogger.log
[Mar 31 22:06:42][]     ===> Start meters.
[Mar 31 22:06:42][mtr0] Meter connection established
[Mar 31 22:06:42][mtr0] Meter thread started
[Mar 31 22:06:42][mtr0] meter is opened. Start channels.
[Mar 31 22:06:42][chn0] Logging thread started
[Mar 31 22:06:42][]     Startup done.
[Mar 31 22:06:42][mtr0] Number of readers: 1
[Mar 31 22:06:42][mtr0] Config.daemon: 1
[Mar 31 22:06:42][mtr0] Config.local: 1
[Mar 31 22:06:42][mtr0] Got 1 new readings from meter:
[Mar 31 22:06:42][chn0] Start logging thread for volkszaehler-api. 
Running as daemon: yes
[Mar 31 22:06:42][chn0] Using default api:
[Mar 31 22:06:42][mtr0] Reading: id=NilItentifier/NilItentifier 
value=20.53 ts=1364760402.648
[Mar 31 22:06:42][mtr0] Reading-THREAD - reading Got an exception : Not 
identifier defined.
[Mar 31 22:06:42][]     Server stopped.
*** glibc detected *** vzlogger: free(): corrupted unsorted chunks: 
0x00f79dc8 ***
Aborted

Die vzlogger.conf sieht folgendermaßen aus:

/**
  * 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": false,        /* run periodically */
//"foreground" : true,        /* dont run in background (prevents 
forking) */
//"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 */
     "protocol" : "sml",    /* see 'vzlogger -h' for list of available 
protocols */
     "host" : "meinzaehler.dyndns.info:7331",
     "channels": [{
         "uuid" : "18377500-9a2b-11e2-84e0-fd8eea56545a0",
         "middleware" : "http://localhost/middleware.php",
         "identifier" : "counter" /* alias for '1-0:1.7.ff', see 
'vzlogger -h' for list of available aliases */
         }, {
         "uuid" : "7ac6f6f0-9a2b-11e2-b0d1-2d188cedb11a",
         "middleware" : "http://localhost/middleware.php",
         "identifier" : "counter"
         }
         ]
     }, {
     "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://demo.volkszaehler.org/middleware.php"
         }
     }, {
     "protocol" : "s0",
     "device" : "/dev/ttyUSB0",
     "channel" : {
         "uuid" : "d495a390-f747-11e0-b3ca-f7890e45c7b2",
         "middleware" : "http://demo.volkszaehler.org/middleware.php"
         }
     },
     {
     "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 */
     },
     {
     "protocol" : "fluksov2",
     "fifo" : "/var/spid/delta/out",
     "channel" : {
         "uuid" : "3b4da450-42a8-11e1-8b8d-c526d853edec",
         "middleware" : "http://demo.volkszaehler.org/middleware.php",
         "identifier" : "sensor0/power" /* or "sensor2/consumption" e.g. */
         }
     }
]}

Die beiden Kanäle wurden über das Webinterface eingerichtet.

Interessanterweise wird bei öfterm Aufruf immer wieder ein anderer Wert 
angezeigt:
[Mar 31 22:06:42][mtr0] Reading: id=NilItentifier/NilItentifier 
value=20.53 ts=1364760402.648
[Mar 31 22:15:53][mtr0] Reading: id=NilItentifier/NilItentifier 
value=20.43 ts=1364760953.105
[Mar 31 22:16:14][mtr0] Reading: id=NilItentifier/NilItentifier 
value=19.13 ts=1364760974.420

Prinzipiell dürfte der s0-Zähler also gefundn werden und auch Daten liefen
Beim phpMyAdmin sind in der Tabelle data auch aktuelle Timestamps zu 
sehen, allerdings ist der value immer '1'.

Ist in der config ein Wurm?
Any hints?

Danke im voraus!
lg Dietmar





More information about the volkszaehler-dev mailing list