[vz-dev] Konfiguration vzlogger mit lokaler serieller Schnittstelle (WAS: IR-Datenkopf und vzlogger anschließen)

Martin Werthmöller mw+volkszaehler.org at werthmoeller.de
Thu Dec 22 21:49:41 CET 2011


Am Do, 22 Dez 2011 um 19:52 GMT +0100 schrieb Martin Werthmöller:

Hallo,

ich habe den vzlogger mit der unten aufgeführten Konfiguration mal mit
-v20 gestartet. Anbei der Output:


# vzlogger --config /usr/local/etc/vzlogger.conf -v20
[Dec 22 21:45:59]       Start parsing configuration from /usr/local/etc/vzlogger.conf
[Dec 22 21:45:59][mtr0] New meter initialized (protocol=sml)
[Dec 22 21:45:59][ch0]  New channel initialized (uuid=...b1b41dmiddleware=http://localhost/volkszaehler/middleware.php id=1-0:1.8.0*255 counter=no)
[Dec 22 21:45:59][ch1]  New channel initialized (uuid=...79ae76 middleware=http://localhost/volkszaehler/middleware.php id=1-0:1.8.255*255 counter=yes)
[Dec 22 21:45:59][ch2]  New channel initialized (uuid=...8e54ab middleware=http://localhost/volkszaehler/middleware.php id=1-0:1.7.255*255 counter=no)
[Dec 22 21:45:59]       Opened logfile /var/log/vzlogger.log
[Dec 22 21:45:59][mtr0] Meter connection established
[Dec 22 21:45:59][mtr0] Meter thread started
[Dec 22 21:45:59][ch0]  Logging thread started
[Dec 22 21:45:59][ch1]  Logging thread started
[Dec 22 21:45:59][ch2]  Logging thread started
[Dec 22 21:46:07][mtr0] Got 12 new readings from meter:
[Dec 22 21:46:07][mtr0] Reading: id=129-129:199.130.3*255 value=0.00 ts=1324586767.148
[Dec 22 21:46:07][mtr0] Reading: id=1-0:0.0.9*255 value=0.00 pts=1324586767.148
[Dec 22 21:46:07][mtr0] Reading: id=1-0:1.8.0*255 value=652013.31 ts=1324586767.148
[Dec 22 21:46:07][mtr0] Reading: id=1-0:1.8.1*255 value=652013.31 ts=1324586767.148
[Dec 22 21:46:07][mtr0] Reading: id=1-0:1.8.2*255 value=0.00 ts=1324586767.148
[Dec 22 21:46:07][mtr0] Reading: id=1-0:15.7.0*255 value=39.00 ts=1324586767.148
[Dec 22 21:46:07][mtr0] Reading: id=1-0:21.7.0*255 value=36.00 ts=1324586767.148
[Dec 22 21:46:07][mtr0] Reading: id=1-0:41.7.0*255 value=0.00 ts=1324586767.148
[Dec 22 21:46:07][mtr0] Reading: id=1-0:61.7.0*255 value=2.00 ts=1324586767.148
[Dec 22 21:46:07][mtr0] Reading: id=1-0:96.5.5*255 value=3840.00 ts=1324586767.148
[Dec 22 21:46:07][mtr0] Reading: id=129-129:199.130.5*255 value=0.00 ts=1324586767.148
[Dec 22 21:46:07][mtr0] Reading: id=0-0:0.0.0*0 value=0.00 ts=0.000
[Dec 22 21:46:07][mtr0] Updating interval to 8
[Dec 22 21:46:07][ch0]  Adding reading to queue (value=652013.31 delta=0.00 ts=1324586767.148)
[Dec 22 21:46:07][ch0]  Buffer dump: |!652013.31| (size=1, keep=0)
[Dec 22 21:46:07][ch0]  JSON request body: [ [ 1324586767148.462891, 652013.312500 ] ]
[Dec 22 21:46:07][ch1]  Adding reading to queue (value=652013.31 delta=0.00 ts=1324586767.148)
[Dec 22 21:46:07][ch1]  Adding reading to queue (value=652013.31 delta=0.00 ts=1324586767.148)
[Dec 22 21:46:07][ch1]  Adding reading to queue (value=0.00 delta=-652013.31 ts=1324586767.148)
[Dec 22 21:46:07][ch1]  Buffer dump: |!0.00|0.00|-652013.31| (size=3, keep=0)
[Dec 22 21:46:07][ch2]  Buffer dump: | (size=0, keep=0)
[Dec 22 21:46:07][ch1]  JSON request body: [ [ 1324586767148.462891, 0.000000 ], [ 1324586767148.464844, 0.000000 ], [ 1324586767148.467041, -652013.312500 ] ]
[Dec 22 21:46:07][ch1]  CURL: About to connect() to localhost port 80 (#0)
[Dec 22 21:46:07][ch1]  CURL:   Trying 127.0.0.1... 
[Dec 22 21:46:07][ch0]  CURL: About to connect() to localhost port 80 (#0)
[Dec 22 21:46:07][ch0]  CURL:   Trying 127.0.0.1... 
[Dec 22 21:46:07][ch1]  CURL: connected
[Dec 22 21:46:07][ch1]  CURL: Connected to localhost (127.0.0.1) port 80 (#0)
[Dec 22 21:46:07][ch0]  CURL: connected
[Dec 22 21:46:07][ch0]  CURL: Connected to localhost (127.0.0.1) port 80 (#0)
[Dec 22 21:46:07][ch1]  CURL: Sent 116 bytes.. 
[Dec 22 21:46:07][ch0]  CURL: Sent 43 bytes.. 
[Dec 22 21:46:07][ch1]  CURL: Received 187 bytes
[Dec 22 21:46:07][ch1]  CURL: Closing connection #0
[Dec 22 21:46:07][ch1]  Error from middleware: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '12-1324586767148' for key 'ts_uniq'
[Dec 22 21:46:07][ch0]  CURL: Received 17 bytes
[Dec 22 21:46:07][ch0]  CURL: Connection #0 to host localhost left intact
[Dec 22 21:46:07][ch0]  Request succeeded with code: 200
[Dec 22 21:46:07][ch0]  CURL: Closing connection #0



> ------------------------------------------------------------------------
> # cat /usr/local/etc/vzlogger.conf
> {
>     "retry" : 30,
>     //"verbosity" : 5,      /* between 0 and 15 */
>     "log" : "/var/log/vzlogger.log",
> 
>     "meters" : [{
>         "enabled" : true,
>         "device" : "/dev/ttyUSB0",
>         "protocol" : "sml",
>     //    "host" : "localhost:7331",
>         "channels": [{
>             "uuid" : "53fe5d70-2c12-11e1-946d-073fd78e54ab",
>             "middleware" :
> "http://localhost/volkszaehler/middleware.php",
>             "identifier" : "power",
>             }, {
>             "uuid" : "66c1f750-2c12-11e1-8d7b-099aa679ae76",
>             "middleware" :
> "http://localhost/volkszaehler/middleware.php",
>             "identifier" : "counter",
>             "counter" : true,
>             }, {
>             "uuid" : "72b37b40-2c12-11e1-a049-a34b0cb1b41d",
>             "middleware" :
> "http://localhost/volkszaehler/middleware.php",
>             "identifier" : "1-0:1.8.0",
>             }],
>     }]
> }
> ------------------------------------------------------------------------
> 
> 
> 
> 
> Viele Gruesse,
> martin!
> _______________________________________________
> volkszaehler-dev mailing list
> volkszaehler-dev at lists.volkszaehler.org
> https://volkszaehler.org/mailman/listinfo/volkszaehler-dev

 
Viele Gruesse,
martin!


More information about the volkszaehler-dev mailing list