[vz-users] middleware DB füllen

NetFritz NetFritz at gmx.de
Tue Oct 2 13:54:06 CEST 2012


Hallo
Habe nun vzlogger und middelware installiert.
Einen Kanal mit UUID erstellt und im Frontend eingefügt.
Der vzlogger schreibt keine Daten in die DB.
Von Hand kann ich so Daten einfügen.
http://192.168.2.24/volkszaehler.org/htdocs/middleware.php/data/561cb280-0bb0-11e2-adaf-ef7337119c50.json?operation=add&value=56
die ich dann im Frontend sehen kann.
Meine vzlogger.conf sieht so 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
  *
  * laueft am EMH ED300L Avacon Zaehler
  */

{
"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,           /* 7888 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" : 5             /* how long to buffer readings for the 
local interface, in seconds */
},
/* EMH ED300L Zähler   */
"meters" : [{
         "protocol" : "sml",     /* see 'vzlogger -h' for list of 
available protocols */
         "device" : "/dev/ttyUSB0",
         "channels": [{
                    "uuid" : "a8da012a-9eb4-49ed-b7f3-38c95142a90d",
                    "middleware" : 
"http://localhost/volkszaehler.org/htdocs/middleware.php",
                          "identifier" : "1-0:15.7.0", /* Leistung */
                      },{
                    "uuid" : "561cb280-0bb0-11e2-adaf-ef7337119c50",
                    "middleware" : 
"http://localhost/volkszaehler.org/htdocs/middleware.php",
                    "identifier" : "1-0:1.8.0", /* Wirk- Energie Total 
Bezug */
                      },{

                          "uuid" : "fde8f1d0-c5d0-11e0-856e-f9e4360ced10",
                          "middleware" : 
"http://localhost/volkszaehler.org/htdocs/middleware.php",
                          "identifier" : "1-0:2.8.0" /* Wirk- Energie 
Total Lieferung*/
                     }]
          }
]}

Die vzlogger.log sieht so aus.
[Oct 01 13:00:22][mtr0] Got 10 new readings from meter:
[Oct 01 13:00:22][mtr0] Reading: id=129-129:199.130.3*255 value=0.00 
ts=1349089222.776
[Oct 01 13:00:22][mtr0] Reading: id=1-0:0.0.9*255 value=0.00 
ts=1349089222.776
[Oct 01 13:00:22][mtr0] Reading: id=1-0:1.8.0*255 value=581696.20 
ts=1349089222.776
[Oct 01 13:00:22][mtr0] Reading: id=1-0:2.8.0*255 value=914657.10 
ts=1349089222.776
[Oct 01 13:00:22][mtr0] Reading: id=1-0:1.8.1*255 value=581696.20 
ts=1349089222.776
[Oct 01 13:00:22][mtr0] Reading: id=1-0:2.8.1*255 value=914657.10 
ts=1349089222.776
[Oct 01 13:00:22][mtr0] Reading: id=1-0:1.8.2*255 value=0.00 
ts=1349089222.776
[Oct 01 13:00:22][mtr0] Reading: id=1-0:15.7.0*255 value=40.30 
ts=1349089222.776
[Oct 01 13:00:22][mtr0] Reading: id=129-129:199.130.5*255 value=0.00 
ts=1349089222.776
[Oct 01 13:00:22][mtr0] Reading: id=0-0:0.0.0*0 value=0.00 ts=0.000
[Oct 01 13:00:22][mtr0] Updating interval to 4
[Oct 01 13:00:22][ch0]  Adding reading to queue (value=914657.10 
ts=1349089222.776)
[Oct 01 13:00:22][ch0]  Buffer dump (size=1 keep=1): {914657.10}
[Oct 01 13:00:22][ch1]  Adding reading to queue (value=581696.20 
ts=1349089222.776)
[Oct 01 13:00:22][ch1]  Buffer dump (size=1 keep=1): {581696.20}
[Oct 01 13:00:22][ch2]  Adding reading to queue (value=40.30 
ts=1349089222.776)
[Oct 01 13:00:22][ch2]  Buffer dump (size=1 keep=1): {40.30}

Danach wiederholt sich der vzlogger.log eintrag.
Fehlt in der log nicht der eintrag von dem Aufruf der middelware
"middleware" : "http://localhost/volkszaehler.org/htdocs/middleware.php",
Gruß NetFritz




More information about the volkszaehler-users mailing list