[vz-users] middleware DB füllen

NetFritz NetFritz at gmx.de
Wed Oct 3 10:06:30 CEST 2012


Hallo
Habe enabled wieder auskommentiert.
//  "enabled" : true,

Die UUID vom Frontend erzeugen lassen und in der conf eingetragen.
Meine conf sieht jetzt 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" : 600             /* how long to buffer readings for 
the local interface, in seconds */
},
/* Eon-Avacon EMH ED300L Zähler   Schnittstelle ewtl. mit  stty -F 
/dev/usbserial-FTGC6F43 9600  einstellen */
"meters" : [{
         "protocol" : "sml",     /* see 'vzlogger -h' for list of 
available protocols */
         "device" : "/dev/ttyUSB0",
         "channels": [{
                    "uuid" : "e46e8780-0c5a-11e2-9397-592f0a9d8872",
                    "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" : "9df6f620-0c5a-11e2-8e67-ab25f20f2702",
                          "middleware" : 
"http://localhost/volkszaehler.org/htdocs/middleware.php",
                          "identifier" : "1-0:2.8.0" /* Wirk- Energie 
Total Lieferung*/
                     }]

          }
]}

Starte ich nun den vzlogger in der Konsole läuft er nur einmal durch.
Hier der Eintrag aus der log:

[Oct 02 09:05:28]       Opened logfile /var/log/vzlogger.log
[Oct 02 09:05:28][mtr0] Meter connection established
[Oct 02 09:05:28][mtr0] Meter thread started
[Oct 02 09:05:28][ch0]  Logging thread started
[Oct 02 09:05:28][ch1]  Logging thread started
[Oct 02 09:05:28][ch2]  Logging thread started
[Oct 02 09:05:29][mtr0] Got 10 new readings from meter:
[Oct 02 09:05:29][mtr0] Reading: id=129-129:199.130.3*255 value=0.00 
ts=1349161529.609
[Oct 02 09:05:29][mtr0] Reading: id=1-0:0.0.9*255 value=0.00 
ts=1349161529.610
[Oct 02 09:05:29][mtr0] Reading: id=1-0:1.8.0*255 value=589976.60 
ts=1349161529.610
[Oct 02 09:05:29][mtr0] Reading: id=1-0:2.8.0*255 value=915580.10 
ts=1349161529.610
[Oct 02 09:05:29][mtr0] Reading: id=1-0:1.8.1*255 value=589976.60 
ts=1349161529.610
[Oct 02 09:05:29][mtr0] Reading: id=1-0:2.8.1*255 value=915580.10 
ts=1349161529.610
[Oct 02 09:05:29][mtr0] Reading: id=1-0:1.8.2*255 value=0.00 
ts=1349161529.610
[Oct 02 09:05:29][mtr0] Reading: id=1-0:15.7.0*255 value=181.70 
ts=1349161529.610
[Oct 02 09:05:29][mtr0] Reading: id=129-129:199.130.5*255 value=0.00 
ts=1349161529.611
[Oct 02 09:05:29][mtr0] Reading: id=0-0:0.0.0*0 value=0.00 ts=0.000
[Oct 02 09:05:29][mtr0] Updating interval to 1
[Oct 02 09:05:29][ch0]  Adding reading to queue (value=915580.10 
ts=1349161529.610)
[Oct 02 09:05:29][ch0]  JSON request body: [ [ 1349161529609.982910, 
915580.100000 ] ]
[Oct 02 09:05:29][ch0]  Buffer dump (size=1 keep=0): {915580.10!}
[Oct 02 09:05:29][ch1]  Adding reading to queue (value=589976.60 
ts=1349161529.610)
[Oct 02 09:05:29][ch1]  JSON request body: [ [ 1349161529609.980957, 
589976.600000 ] ]
[Oct 02 09:05:29][ch1]  Buffer dump (size=1 keep=0): {589976.60!}
[Oct 02 09:05:29][ch2]  Adding reading to queue (value=181.70 
ts=1349161529.610)
[Oct 02 09:05:29][ch2]  JSON request body: [ [ 1349161529609.993896, 
181.700000 ] ]
[Oct 02 09:05:29][ch2]  Buffer dump (size=1 keep=0): {181.70!}
[Oct 02 09:05:29][ch2]  CURL: About to connect() to localhost port 80 (#0)
[Oct 02 09:05:29][ch2]  CURL:   Trying 127.0.0.1...
[Oct 02 09:05:29][ch1]  CURL: About to connect() to localhost port 80 (#0)
[Oct 02 09:05:29][ch0]  CURL: About to connect() to localhost port 80 (#0)
[Oct 02 09:05:29][ch0]  CURL:   Trying 127.0.0.1...
[Oct 02 09:05:29][ch2]  CURL: connected
[Oct 02 09:05:29][ch0]  CURL: connected
[Oct 02 09:05:29][ch0]  CURL: Connected to localhost (127.0.0.1) port 80 
(#0)
[Oct 02 09:05:29][ch1]  CURL:   Trying 127.0.0.1...
[Oct 02 09:05:29][ch1]  CURL: connected
[Oct 02 09:05:29][ch2]  CURL: Connected to localhost (127.0.0.1) port 80 
(#0)
[Oct 02 09:05:29][ch2]  CURL: Sent 40 bytes..
[Oct 02 09:05:29][ch1]  CURL: Connected to localhost (127.0.0.1) port 80 
(#0)
[Oct 02 09:05:29][ch2]  CURL: upload completely sent off: 40 out of 40 bytes
[Oct 02 09:05:29][ch2]  CURL: additional stuff not fine transfer.c:1037: 0 0
[Oct 02 09:05:29][ch0]  CURL: Sent 43 bytes..
[Oct 02 09:05:29][ch0]  CURL: upload completely sent off: 43 out of 43 bytes
[Oct 02 09:05:29][ch0]  CURL: additional stuff not fine transfer.c:1037: 0 0
[Oct 02 09:05:29][ch1]  CURL: Sent 43 bytes..
[Oct 02 09:05:29][ch1]  CURL: upload completely sent off: 43 out of 43 bytes
[Oct 02 09:05:29][ch1]  CURL: additional stuff not fine transfer.c:1037: 0 0
[Oct 02 09:05:30][ch1]  CURL: HTTP 1.1 or later with persistent 
connection, pipelining supported
[Oct 02 09:05:30][ch1]  CURL: Received 17 bytes
[Oct 02 09:05:30][ch1]  CURL: Connection #0 to host localhost left intact
[Oct 02 09:05:30][ch1]  Request succeeded with code: 200
[Oct 02 09:05:30][ch1]  CURL: Closing connection #0
[Oct 02 09:05:30][ch0]  CURL: HTTP 1.1 or later with persistent 
connection, pipelining supported
[Oct 02 09:05:30][ch0]  CURL: Received 17 bytes
[Oct 02 09:05:30][ch0]  CURL: Connection #0 to host localhost left intact
[Oct 02 09:05:30][ch0]  Request succeeded with code: 200
[Oct 02 09:05:30][ch0]  CURL: Closing connection #0
[Oct 02 09:05:30][ch2]  CURL: HTTP 1.1 or later with persistent 
connection, pipelining supported
[Oct 02 09:05:30][ch2]  CURL: Received 17 bytes
[Oct 02 09:05:30][ch2]  CURL: Connection #0 to host localhost left intact
[Oct 02 09:05:30][ch2]  Request succeeded with code: 200
[Oct 02 09:05:30][ch2]  CURL: Closing connection #0

In der DB und im Frontend sind die Daten vorhanden.
Warum läuft der vzlogger nicht durch?

/Was mir aber aufgefallen ist, Du hast bei Deinen drei Channels zweimal
localhost und einmal eine IP-Adresse stehen. Wenn Du alle Daten in die
DB auf dem Rasp schicken möchtest, ist localhost o.k./
Die IP hatte ich nur zum testen drin.


/Meiner stürzt leider immer noch zweimal am Tag ab, trotz der Anpassung
der Variablen, wie von Dir empfohlen. Das muß ich noch näher untersuchen./
Wie betreibst Du den Raspberry, ich habe meinen im Keller ohne Monitor,
Tastatur und Maus laufen.
Ich hatte das Problem das der Raspberry nach der anpassung die Tastatur nicht
mehr mochte.
Gruß NetFritz




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://volkszaehler.org/pipermail/volkszaehler-users/attachments/20121003/0800f379/attachment-0001.html>


More information about the volkszaehler-users mailing list