[vz-users] Frage zum Frontend/ mehrere Kanäle
Malte Weber
malte at mwwz.de
Thu Jan 30 22:42:01 CET 2014
Hallo und guten Abend,
ich habe heute trotz längerem Hin- und Herprobieren ein Problem mit dem Volkszähler-Frontend entdeckt und hoffe, daß Ihr mir helfen könnt.
Zunächst erst einmal Grundsätzliches zu meinem Setup:
Raspberry PI mit dem fertigen Image (http://wiki.volkszaehler.org/howto/raspberry_pi_image)
USB-IR-Lesekopf von Udo
Stromzähler von EMH eHZ
Ich möchte gerne so viele Informationen wie möglich aus dem Zähler auslesen. Folgendes habe ich bisher erreicht:
a) vzlogger nimmt die Daten aus dem Zähler auf:
====
[Jan 30 22:34:36][mtr0] Got 8 new readings from meter:
[Jan 30 22:34:36][mtr0] Reading: id=129-129:199.130.3*255/ObisItentifier:129-129:199.130.3*255 value=0.00 ts=1391117676.643
[Jan 30 22:34:36][mtr0] Reading: id=1-0:0.0.9*255/ObisItentifier:1-0:0.0.9*255 value=0.00 ts=1391117676.643
[Jan 30 22:34:36][mtr0] Reading: id=1-0:1.8.0*255/ObisItentifier:1-0:1.8.0*255 value=2151392.50 ts=1391117676.643
[Jan 30 22:34:36][mtr0] Reading: id=1-0:1.8.1*255/ObisItentifier:1-0:1.8.1*255 value=2151392.50 ts=1391117676.643
[Jan 30 22:34:36][mtr0] Reading: id=1-0:1.8.2*255/ObisItentifier:1-0:1.8.2*255 value=0.00 ts=1391117676.643
[Jan 30 22:34:36][mtr0] Reading: id=1-0:16.7.0*255/ObisItentifier:1-0:16.7.0*255 value=556.50 ts=1391117676.643
[Jan 30 22:34:36][mtr0] Reading: id=129-129:199.130.5*255/ObisItentifier:129-129:199.130.5*255 value=0.00 ts=20766460.000
[Jan 30 22:34:36][mtr0] Reading: id=0-0:0.0.0*0/ObisItentifier:0-0:0.0.0*0 value=0.00 ts=0.000
[Jan 30 22:34:36][chn0] Adding reading to queue (value=2151392.50 ts=1391117676.643)
[Jan 30 22:34:36][chn1] Adding reading to queue (value=556.50 ts=1391117676.643)
[Jan 30 22:34:36][chn0] ==> number of tuples: 1
[Jan 30 22:34:36][chn0] compare: 0 1391117676643 1391117676643.471924
[Jan 30 22:34:36][chn0] JSON request body: [ [ 1391117676643.471924, 2151392.500000 ] ]
[Jan 30 22:34:36][chn0] Buffer dump (size=0 keep=0): {}
[Jan 30 22:34:36][chn1] ==> number of tuples: 1
[Jan 30 22:34:36][chn1] compare: 0 1391117676643 1391117676643.488770
[Jan 30 22:34:36][chn1] JSON request body: [ [ 1391117676643.488770, 556.500000 ] ]
[Jan 30 22:34:36][chn1] Buffer dump (size=0 keep=0): {}
[Jan 30 22:34:36][chn0] CURL: About to connect() to localhost port 80 (#0)
[Jan 30 22:34:36][chn0] CURL: Trying 127.0.0.1...
[Jan 30 22:34:36][chn1] CURL: About to connect() to localhost port 80 (#0)
[Jan 30 22:34:36][chn1] CURL: Trying 127.0.0.1...
[Jan 30 22:34:36][chn0] CURL: connected
[Jan 30 22:34:36][chn0] CURL: Connected to localhost (127.0.0.1) port 80 (#0)
[Jan 30 22:34:36][chn1] CURL: connected
[Jan 30 22:34:36][chn1] CURL: Connected to localhost (127.0.0.1) port 80 (#0)
[Jan 30 22:34:36][chn0] CURL: Sent 44 bytes..
[Jan 30 22:34:36][chn0] CURL: Sent '[ [ 1391117676643.471924, 2151392.500000 ] ]' bytes
[Jan 30 22:34:36][chn0] CURL: upload completely sent off: 44 out of 44 bytes
[Jan 30 22:34:36][chn0] CURL: additional stuff not fine transfer.c:1037: 0 0
[Jan 30 22:34:36][chn1] CURL: Sent 40 bytes..
[Jan 30 22:34:36][chn1] CURL: Sent '[ [ 1391117676643.488770, 556.500000 ] ]' bytes
[Jan 30 22:34:36][chn1] CURL: upload completely sent off: 40 out of 40 bytes
[Jan 30 22:34:36][chn1] CURL: additional stuff not fine transfer.c:1037: 0 0
[Jan 30 22:34:37][chn0] CURL: HTTP 1.1 or later with persistent connection, pipelining supported
[Jan 30 22:34:37][chn0] CURL: Received 28 bytes
[Jan 30 22:34:37][chn0] CURL: Received '11
{"version":"0.3"}
===
D.H. die Werte für Zählerstand (1.8.0) und Wirkleistung (16.7.0) werden korrekt eingelesen und dargestellt.
In der Datenbank und Middleware kommen die Werte auch korrekt an:
id channel_id timestamp value
Edit Inline Edit Copy Delete 601 8 1391117660201 2151389.7
Edit Inline Edit Copy Delete 602 9 1391117661682 476.5
Edit Inline Edit Copy Delete 603 8 1391117661682 2151389.9
Edit Inline Edit Copy Delete 604 8 1391117663287 2151390.3
Edit Inline Edit Copy Delete 605 9 1391117663287 935.2
Edit Inline Edit Copy Delete 606 9 1391117665083 580
Edit Inline Edit Copy Delete 607 8 1391117665083 2151390.7
Edit Inline Edit Copy Delete 608 8 1391117676643 2151392.5
Edit Inline Edit Copy Delete 609 9 1391117676643 556.5
Edit Inline Edit Copy Delete 610 9 1391117746089 555.8
Edit Inline Edit Copy Delete 611 8 1391117746089 2151403.3
Edit Inline Edit Copy Delete 612 8 1391117747989 2151403.6
Edit Inline Edit Copy Delete 613 9 1391117747989 557.4
Edit Inline Edit Copy Delete 614 8 1391117749921 2151403.9
Edit Inline Edit Copy Delete 615 9 1391117749921 558.6
Edit Inline Edit Copy Delete 616 8 1391117751852 2151404.2
Edit Inline Edit Copy Delete 617 9 1391117751852 558.9
Edit Inline Edit Copy Delete 618 9 1391117753754 558.6
Edit Inline Edit Copy Delete 619 8 1391117753754 2151404.5
Edit Inline Edit Copy Delete 620 9 1391117755696 556.8
Edit Inline Edit Copy Delete 621 8 1391117755696 2151404.8
Edit Inline Edit Copy Delete 622 8 1391117757376 2151405.1
Edit Inline Edit Copy Delete 623 9 1391117757376 551.8
Edit Inline Edit Copy Delete 624 8 1391117759067 2151405.6
Edit Inline Edit Copy Delete 625 9 1391117759067 1048.8
Edit Inline Edit Copy Delete 626 9 1391117760852 796.9
Edit Inline Edit Copy Delete 627 8 1391117760852 2151406
Edit Inline Edit Copy Delete 628 8 1391117762216 2151406.3
Wenn ich dann aber im Frontend beide Kanäle anlege, kriege ich zwei deckungsgleiche Linien angezeigt und im Footer sind auch beide Wertereihen gleich bzw. ähnlich (hier nur unterschiedlich, weil die Aufzeichnungen etwas zeitlich versetzt waren)
Momentanleistung Elektrische Energie (Leistungswerte) 476.5 W 1.05 kW 679.7 W 715.7 W 46.15 Wh
Zähler Elektrische Energie (Zaehlerstaende) 401.11 W 1.11 kW 487.93 W 709.13 W 235.5 Wh
Erstaunlicherweise kommt das auch vor, wenn ich den Kanal "Momentanleistung" komplett lösche.
Hat jemand eine Idee, woher die Werte kommen bzw. was ich einstellen muss, um die Zählerstände korrekt im Diagramm angezeigt zu bekommen?
Hier noch die vzlogger.conf:
====
{
"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" : "sml",
"device" : "/dev/ttyUSB0",
"enabled" : true,
"channels" : [{
"uuid" : "b946a100-89f1-11e3-8a08-058d6aa14709",
"middleware" : "http://localhost/volkszaehler.org/htdocs/middleware.php",
"identifier" : "1-0:1.8.0*255",
"middleware" : "http://localhost/middleware.php"
}, {
"uuid" : "2592e4a0-89f6-11e3-96ac-41b210ff861f",
"middleware" : "http://localhost/volkszaehler.org/htdocs/middleware.php",
"identifier" : "1-0:16.7.0*255",
"middleware" : "http://localhost/middleware.php"
}]
}
]}
====
Vielen Dank und Grüße,
Malte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20140130/78966da7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: s_fulltext.png
Type: image/png
Size: 244 bytes
Desc: not available
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20140130/78966da7/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: b_edit.png
Type: image/png
Size: 444 bytes
Desc: not available
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20140130/78966da7/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: b_inline_edit.png
Type: image/png
Size: 618 bytes
Desc: not available
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20140130/78966da7/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: b_insrow.png
Type: image/png
Size: 228 bytes
Desc: not available
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20140130/78966da7/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: b_drop.png
Type: image/png
Size: 715 bytes
Desc: not available
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20140130/78966da7/attachment-0009.png>
More information about the volkszaehler-users
mailing list