[vz-dev] Unterschied vzlogger random C und C++

Rainer Gauweiler volkszaehler at moppl.inka.de
Sat Feb 16 12:09:10 CET 2013


Hallo zusammen,

ich verwende auf dem Image folgende Konfig als Beispiel:
"meters" : [
         {
         "protocol" : "random",
         "enabled" : true,
         "interval" : 2,
         "max" : 40.0,           /* has to be double! */
         "min" : -5.0,           /* has to be double! */
         "channel" : {
                 "uuid" : "a301d8d0-903b-1234-94bb-d943d061b6a8",
                 "middleware" : "http://localhost/middleware.php"
                 }
         }
]

Mit der reinen C-Variante funktioniert das ohne Probleme:

[Feb 16 11:54:57]       Opened logfile /var/log/vzlogger.log
[Feb 16 11:54:57][mtr0] Meter connection established
[Feb 16 11:54:57][mtr0] Meter thread started
[Feb 16 11:54:57][ch0]  Logging thread started
[Feb 16 11:54:57][mtr0] Got 1 new readings from meter:
[Feb 16 11:54:57][mtr0] Reading: id= value=20.62 ts=1361012097.672
[Feb 16 11:54:57][ch0]  Adding reading to queue (value=20.62 
ts=1361012097.672)
[Feb 16 11:54:57][ch0]  Buffer dump (size=1 keep=0): {20.62!}
[Feb 16 11:54:57][mtr0] Next reading in 2 seconds
[Feb 16 11:54:57][ch0]  JSON request body: [ [ 1361012097672.489014, 
20.621369 ] ]
[Feb 16 11:54:57][ch0]  CURL: About to connect() to localhost port 80 (#0)
[Feb 16 11:54:57][ch0]  CURL:   Trying 127.0.0.1...
[Feb 16 11:54:57][ch0]  CURL: connected
[Feb 16 11:54:57][ch0]  CURL: Connected to localhost (127.0.0.1) port 80 
(#0)
[Feb 16 11:54:57][ch0]  CURL: Sent 39 bytes..
[Feb 16 11:54:57][ch0]  CURL: upload completely sent off: 39 out of 39 bytes
[Feb 16 11:54:57][ch0]  CURL: additional stuff not fine transfer.c:1037: 0 0
[Feb 16 11:54:57][ch0]  CURL: HTTP 1.1 or later with persistent 
connection, pipelining supported
[Feb 16 11:54:57][ch0]  CURL: Received 28 bytes
[Feb 16 11:54:57][ch0]  CURL: Connection #0 to host localhost left intact
[Feb 16 11:54:57][ch0]  Request succeeded with code: 200

Doch die C++-Variante patzt da:

[Feb 16 11:56:04]       Opened logfile /var/log/vzlogger.log
[Feb 16 11:56:04][]     ===> Start meters.
[Feb 16 11:56:04][mtr0] Meter connection established
[Feb 16 11:56:04][mtr0] Meter thread started
[Feb 16 11:56:04][mtr0] meter is opened. Start channels.
[Feb 16 11:56:04][chn0] Logging thread started
[Feb 16 11:56:04][]     Startup done.
[Feb 16 11:56:04][chn0] Start logging thread for volkszaehler-api. 
Running as daemon: yes
[Feb 16 11:56:04][chn0] Using default api:
[Feb 16 11:56:04][mtr0] Number of readers: 1
[Feb 16 11:56:04][mtr0] Config.daemon: 1
[Feb 16 11:56:04][mtr0] Config.local: 1
[Feb 16 11:56:04][mtr0] Got 1 new readings from meter:
[Feb 16 11:56:04][mtr0] Reading: id=NilItentifier/NilItentifier 
value=20.65 ts=1361012164.048
[Feb 16 11:56:04][mtr0] Reading-THREAD - reading Got an exception : Not 
identifier defined.
[Feb 16 11:56:04][]     Server stopped.

Ist da etwas anderes zu konfigurieren oder ist das ein Bug?

Gruss
      Rainer



More information about the volkszaehler-dev mailing list