[vz-users] middleware DB füllen
NetFritz
NetFritz at gmx.de
Tue Oct 2 23:17:17 CEST 2012
Am 02.10.12 13:54, schrieb NetFritz:
>/ 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.
/Geht das auch mit
wget
http://localhost/volkszaehler.org/htdocs/middleware.php/data/561cb280-0bb0-11e2-adaf-ef7337119c50.json?operation=add&value=56
von der Kommandozeile aus?
Nein wird ja von einen anderen Rechner durchgeführt
>/ "buffer" : 5 /* how long to buffer readings for the local
/>/ interface, in seconds */
/>/
/Ist das nicht ein wenig kurz?
Muss ich mal ändern und dann probieren
>/ "middleware" : "http://localhost/volkszaehler.org/htdocs/middleware.php",
/Also in meinem Log war davon auch nichts zu sehen.
Sieht man denn was im mysql.log?
Muss ich mal schauen.
Mit phpMyAdmin habe ich in der DB eine Eintragungen gefunden,
ausser die ich von Hand eingefügt hatte.(siehe oben)
Gruß Andreas
Habe inzwischen mal den Eintrag
"enabled" : true, in der vzlogger.conf auskommentiert.
"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 */
},
Wenn ich dann den vzogger in der Konsole starte bekomme ich folgende Ausgabe.
root at raspberrypi:/usr/local/bin# ./vzlogger
[Oct 01 22:19:54][mtr0] New meter initialized (protocol=sml)
[Oct 01 22:19:54][ch0] New channel initialized (uuid=...0ced10 middleware=http://localhost/volkszaehler.org/htdocs/middleware.php id=1-0:2.8.0)
[Oct 01 22:19:54][ch1] New channel initialized (uuid=...119c50 middleware=http://192.168.2.24/volkszaehler.org/htdocs/middleware.php id=1-0:1.8.0)
[Oct 01 22:19:54][ch2] New channel initialized (uuid=...42a90d middleware=http://localhost/volkszaehler.org/htdocs/middleware.php id=1-0:15.7.0)
[Oct 01 22:19:54] Opened logfile /var/log/vzlogger.log
[Oct 01 22:19:54][mtr0] Meter connection established
[Oct 01 22:19:54][mtr0] Meter thread started
[Oct 01 22:19:54][ch0] Logging thread started
[Oct 01 22:19:54][ch1] Logging thread started
[Oct 01 22:19:54][ch2] Logging thread started
error: unknown type in sml_value_to_double
error: unknown type in sml_value_to_double
error: unknown type in sml_value_to_double
[Oct 01 22:19:55][mtr0] Got 10 new readings from meter:
[Oct 01 22:19:55][mtr0] Reading: id=129-129:199.130.3*255 value=0.00 ts=1349122795.709
[Oct 01 22:19:55][mtr0] Reading: id=1-0:0.0.9*255 value=0.00 ts=1349122795.710
[Oct 01 22:19:55][mtr0] Reading: id=1-0:1.8.0*255 value=585310.90 ts=1349122795.711
[Oct 01 22:19:55][mtr0] Reading: id=1-0:2.8.0*255 value=915580.10 ts=1349122795.711
[Oct 01 22:19:55][mtr0] Reading: id=1-0:1.8.1*255 value=585310.90 ts=1349122795.711
[Oct 01 22:19:55][mtr0] Reading: id=1-0:2.8.1*255 value=915580.10 ts=1349122795.711
[Oct 01 22:19:55][mtr0] Reading: id=1-0:1.8.2*255 value=0.00 ts=1349122795.711
[Oct 01 22:19:55][mtr0] Reading: id=1-0:15.7.0*255 value=781.40 ts=1349122795.711
[Oct 01 22:19:55][mtr0] Reading: id=129-129:199.130.5*255 value=0.00 ts=1349122795.712
[Oct 01 22:19:55][mtr0] Reading: id=0-0:0.0.0*0 value=0.00 ts=0.000
[Oct 01 22:19:55][mtr0] Updating interval to 1
[Oct 01 22:19:55][ch0] Adding reading to queue (value=915580.10 ts=1349122795.711)
[Oct 01 22:19:55][ch0] JSON request body: [ [ 1349122795710.508057, 915580.100000 ] ]
[Oct 01 22:19:55][ch0] Buffer dump (size=1 keep=0): {915580.10!}
[Oct 01 22:19:55][ch1] Adding reading to queue (value=585310.90 ts=1349122795.711)
[Oct 01 22:19:55][ch1] JSON request body: [ [ 1349122795710.505127, 585310.900000 ] ]
[Oct 01 22:19:55][ch1] Buffer dump (size=1 keep=0): {585310.90!}
[Oct 01 22:19:55][ch2] Adding reading to queue (value=781.40 ts=1349122795.711)
[Oct 01 22:19:55][ch2] JSON request body: [ [ 1349122795710.519043, 781.400000 ] ]
[Oct 01 22:19:55][ch2] Buffer dump (size=1 keep=0): {781.40!}
[Oct 01 22:19:55][ch0] CURL: About to connect() to localhost port 80 (#0)
[Oct 01 22:19:55][ch0] CURL: Trying 127.0.0.1...
[Oct 01 22:19:55][ch0] CURL: connected
[Oct 01 22:19:55][ch0] CURL: Connected to localhost (127.0.0.1) port 80 (#0)
[Oct 01 22:19:55][ch0] CURL: Sent 43 bytes..
[Oct 01 22:19:55][ch0] CURL: upload completely sent off: 43 out of 43 bytes
[Oct 01 22:19:55][ch0] CURL: additional stuff not fine transfer.c:1037: 0 0
[Oct 01 22:19:55][ch1] CURL: About to connect() to 192.168.2.24 port 80 (#0)
[Oct 01 22:19:55][ch1] CURL: Trying 192.168.2.24...
[Oct 01 22:19:55][ch1] CURL: connected
[Oct 01 22:19:55][ch1] CURL: Connected to 192.168.2.24 (192.168.2.24) port 80 (#0)
[Oct 01 22:19:55][ch1] CURL: Sent 43 bytes..
[Oct 01 22:19:55][ch2] CURL: About to connect() to localhost port 80 (#0)
[Oct 01 22:19:55][ch2] CURL: Trying 127.0.0.1...
[Oct 01 22:19:55][ch2] CURL: connected
[Oct 01 22:19:55][ch2] CURL: Connected to localhost (127.0.0.1) port 80 (#0)
[Oct 01 22:19:55][ch2] CURL: Sent 40 bytes..
[Oct 01 22:19:55][ch1] CURL: upload completely sent off: 43 out of 43 bytes
[Oct 01 22:19:55][ch1] CURL: additional stuff not fine transfer.c:1037: 0 0
[Oct 01 22:19:55][ch2] CURL: upload completely sent off: 40 out of 40 bytes
[Oct 01 22:19:55][ch2] CURL: additional stuff not fine transfer.c:1037: 0 0
[Oct 01 22:19:56][ch0] CURL: HTTP 1.1 or later with persistent connection, pipelining supported
[Oct 01 22:19:56][ch0] CURL: Received 139 bytes
[Oct 01 22:19:56][ch0] CURL: Connection #0 to host localhost left intact
[Oct 01 22:19:56][ch0] Error from middleware: Exception: No entity found with UUID: 'fde8f1d0-c5d0-11e0-856e-f9e4360ced10'
[Oct 01 22:19:56][ch0] CURL: Closing connection #0
[Oct 01 22:19:56][ch2] CURL: HTTP 1.1 or later with persistent connection, pipelining supported
[Oct 01 22:19:56][ch2] CURL: Received 139 bytes
[Oct 01 22:19:56][ch2] CURL: Connection #0 to host localhost left intact
[Oct 01 22:19:56][ch2] Error from middleware: Exception: No entity found with UUID: 'a8da012a-9eb4-49ed-b7f3-38c95142a90d'
[Oct 01 22:19:56][ch2] CURL: Closing connection #0
[Oct 01 22:19:56][ch1] CURL: HTTP 1.1 or later with persistent connection, pipelining supported
[Oct 01 22:19:56][ch1] CURL: Received 17 bytes
[Oct 01 22:19:56][ch1] CURL: Connection #0 to host 192.168.2.24 left intact
[Oct 01 22:19:56][ch1] Request succeeded with code: 200
[Oct 01 22:19:56][ch1] CURL: Closing connection #0
root at raspberrypi:/usr/local/bin#
Dann sind die vermissten Eintragungen drin.
Im Frontend und der DB sind dann die Daten auch drin.
Es sind auch drei Fehlermeldungen drin wie hier:
error: unknown type in sml_value_to_double
error: unknown type in sml_value_to_double
error: unknown type in sml_value_to_double
Was die bedeuten kann ich nicht sagen.
Gruß NetFritz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://volkszaehler.org/pipermail/volkszaehler-users/attachments/20121002/b968c2cf/attachment-0001.html>
More information about the volkszaehler-users
mailing list