[vz-users] vzlogger

Michael mijukad at gmail.com
Fri Apr 18 21:17:03 CEST 2014


Hallo Udo,

 

das vom 29.3.:

2014-03-29-raspbian-vz-05-3G.img

 

Das was im Wiki als Image für die "Erweiterung" angegeben war, ist älter (vom 22.3.) und in dem verwendeten waren viele Dinge schon als "enthalten" kommentiert.

 

Das läuft jetzt soweit auch, habe sehr vorsichtig die "vzlogger.conf" um den ttyUSB0 Kanal erweitert. Das Parsing läuft auch jetzt ohne Fehler durch:

 

[Apr 18 20:58:08][mtr1] Got 0 nepi at raspberrypi /var/log $ sudo vzlogger -c /etc/vzlogger.conf

[Apr 18 21:03:42][mtr0] Creating new meter with protocol d0.

[Apr 18 21:03:42][mtr0] Meter configured. enabled

[Apr 18 21:03:42]       New meter initialized (protocol=d0)

[Apr 18 21:03:42]       Configure channel.

[Apr 18 21:03:42][chn0] New channel initialized (uuid=...0c7b49 protocol=volkszaehler id=1-0:1.8.0*255)

[Apr 18 21:03:42][mtr1] Creating new meter with protocol d0.

[Apr 18 21:03:42][mtr1] Meter configured. enabled

[Apr 18 21:03:42]       New meter initialized (protocol=d0)

[Apr 18 21:03:42]       Configure channel.

[Apr 18 21:03:42][chn1] New channel initialized (uuid=...5f7d77 protocol=volkszaehler id=1-0:1.8.0*255)

[Apr 18 21:03:42]       Have 2 meters.

[Apr 18 21:03:42][main] foreground=0, daemon=1, local=1

[Apr 18 21:03:42]       Daemonize process...

pi at raspberrypi /var/log $

 

nach bereinigten und neu gesetzten Kanälen:



 

Der ttyAMA0 läuft.

Der ttyUSB0 wird einmal korrekt in der Fußzeile mit Werten angezeigt, dann treten jedoch Fehler auf und es entsteht keine Linie.

Das ‚vzlogger.log‘ zeigt:

 

[Apr 18 20:58:08][d0]   Something unexpected happened: read:336!

[Apr 18 20:58:08][mtr1] Got 0 new readings from meter:

[Apr 18 20:58:08][d0]   Something unexpected happened: read:336!

[Apr 18 20:58:08][mtr1] Got 0 new readings from meter:

[Apr 18 20:58:08][d0]   Something unexpected happened: read:336!

[Apr 18 20:58:08][mtr1] Got 0 new readings from meter:

[Apr 18 20:58:08][d0]   Something unexpected happened: read:336!

 

Die beiden Köpfe liefern jedoch korrekte Daten von gleichen Easymeter Q3DA Zählern:

 

pi at raspberrypi /var/log $ cat /dev/ttyAMA0

1-0:1.8.0*255(00002055.5531357*kWh)

1-0:21.7.255*255(000000.00*W)

1-0:41.7.255*255(002084.66*W)

1-0:61.7.255*255(000000.00*W)

1-0:1.7.255*255(002084.66*W)

1-0:96.5.5*255(82)

0-0:96.1.255*255(1ESY1130001026)

!

/ESY5Q3DA1004 V3.03

 

pi at raspberrypi /var/log $ cat /dev/ttyUSB0

1-0:0.0.0*255(0000000089211174)

1-0:1.8.0*255(00006276.4350156*kWh)

1-0:21.7.255*255(000098.57*W)

1-0:41.7.255*255(000099.44*W)

1-0:61.7.255*255(000167.44*W)

1-0:1.7.255*255(000365.45*W)

1-0:96.5.5*255(82)

0-0:96.1.255*255(1ESY1130001025)

!

/ESY5Q3DA1004 V3.03

 

Die vzlogger.config lautet:

 

pi at raspberrypi /var/log $ cat /etc/vzlogger.conf

/**

* 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": 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" : 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" : true,       /* disabled meters will be ignored */

                              "protocol" : "d0",     /* see 'vzlogger -h' for list of available proto$ */

                              "device" : "/dev/ttyAMA0",

                              "parity" : "7E1",

                              "baudrate" : 9600,

                              "aggtime" : 60,     /* aggregate all signals and give one update to middleware every 'aggtime' seconds */

                              "aggfixedinterval" : false,          /* round all timestamps to middleware to nearest aggtime */

                              "channels": [{

                                            "uuid" : "66e19100-c726-11e3-b100-75c9ee0c7b49",

                                            "middleware" : "http://localhost/middleware.php",

                                            "identifier" : "1-0:1.8.0*255", /* Gesamtstromverbrauch$ */

                                            "aggmode" : "MAX"   /* add all s0 intervals in the aggregation. Possible Modes: SUM, AVG, MAXIMUM and NONE*/

                                         }]

 

        } // meter

        ,

        {

                              "enabled" : true,       /* disabled meters will be ignored */

                              "protocol" : "d0",     /* see 'vzlogger -h' for list of available proto$ */

                              "device" : "/dev/ttyUSB0",

                             "parity" : "7E1",

                              "baudrate" : 9600,

                              "aggtime" : 60,     /* aggregate all signals and give one update to middleware every 'aggtime' seconds */

                              "aggfixedinterval" : false,          /* round all timestamps to middleware to nearest aggtime */

                              "channels": [{

                                            "uuid" : "5263aee0-c726-11e3-8df3-afb7655f7d77",

                                            "middleware" : "http://localhost/middleware.php",

                                            "identifier" : "1-0:1.8.0*255", /* Gesamtstromverbrauch$ */

                                            "aggmode" : "MAX"   /* add all s0 intervals in the aggregation. Possible Modes: SUM, AVG, MAXIMUM and NONE*/

                                         }]

 

        }

]} // end of config

 

 

 

 

 

-----Ursprüngliche Nachricht-----
Von: volkszaehler-users-bounces at demo.volkszaehler.org [mailto:volkszaehler-users-bounces at demo.volkszaehler.org] Im Auftrag von Udo1
Gesendet: Freitag, 18. April 2014 20:19
An: volkszaehler.org - users
Betreff: Re: [vz-users] vzlogger

 

Hallo Michael,

 

Am 18.04.2014 18:30, schrieb Michael:

> also, ich verstricke mich immer tiefer im System.

welches Image benutzt du eigentlich?

 

Gruß

Udo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20140418/50bf9361/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 19614 bytes
Desc: not available
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20140418/50bf9361/attachment-0001.jpg>


More information about the volkszaehler-users mailing list