[vz-users] S0 Zähler will nicht

Detlef Neubauer detlef.neubauer at wzrz.de
Fri Jan 18 19:57:59 CET 2013


Also der S-Zähler will schon, nur vzlogger will nicht

Also, erst mal Test wie in
http://wiki.volkszaehler.org/hardware/controllers/s0-an-rs232#alternative
beschrieben, funktioniert.

# strace -ttt -e read cat  < /dev/ttyUSB2 > /dev/null
1358534552.312638 read(3,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\226\1\0004\0\0\0"...,
512) = 512
1358534552.315652 read(0, "\0", 32768)  = 1
1358534586.995984 read(0, "\0", 32768)  = 1
1358534663.138435 read(0, "\0", 32768)  = 1
1358534740.802676 read(0,

Dann eine vzlogger.tests0 zum testen

/**
 * 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": false,                /* 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" : 80,            /* the TCP port for the local HTTPd */
        "index" : true,         /* should we provide a index listing of
available channels? */
        "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" : "s0",      /* use 'vzlogger -h' for list of available
protocols */
        "device" : "/dev/ttyUSB2",
        }
]}

Funktioniert auch.

[Jan 18 19:36:51][mtr0] Creating new meter with protocol s0.
[Jan 18 19:36:51][mtr0] Meter configured.
[Jan 18 19:36:51]       New meter initialized (protocol=s0)
[Jan 18 19:36:51]       Have 1 meters.
[Jan 18 19:36:51][main] foreground=1, daemon=0, local=0
[Jan 18 19:36:51]       NOT Daemonize process...
[Jan 18 19:36:51]       Opened logfile /var/log/vzlogger.log
[Jan 18 19:36:51][]     ===> Start meters.
[Jan 18 19:36:51][mtr0] Meter connection established
[Jan 18 19:36:51][mtr0] Meter thread started
[Jan 18 19:36:51][mtr0] meter is opened. Start channels.
[Jan 18 19:36:51][]     Startup done.
[Jan 18 19:36:51][mtr0] Number of readers: 3
[Jan 18 19:36:51][mtr0] Config.daemon: 0
[Jan 18 19:36:51][mtr0] Config.local: 0
[Jan 18 19:36:54][s0]   Reading S0 - n=3 power=2074.056491 
counter=2074.056491
[Jan 18 19:36:54][mtr0] Got 1 new readings from meter:
[Jan 18 19:36:54][mtr0] Reading: id=Counter/StringItentifier: value=1.00
ts=1358534214.077
[Jan 18 19:36:57][s0]   Reading S0 - n=3 power=2071.680133 
counter=2071.680133
[Jan 18 19:36:57][mtr0] Got 1 new readings from meter:
[Jan 18 19:36:57][mtr0] Reading: id=Counter/StringItentifier: value=2.00
ts=1358534217.542
[Jan 18 19:37:01][s0]   Reading S0 - n=3 power=2075.271241 
counter=2075.271241
[Jan 18 19:37:01][mtr0] Got 1 new readings from meter:


Jetzt die vzlogger.test mit UUID usw. Daraus nur den geänderten Teil.

"meters" : [{
        "enabled" : true,       /* disabled meters will be ignored */
        "protocol" : "s0",      /* use 'vzlogger -h' for list of available
protocols */
        "device" : "/dev/ttyUSB2",
        "channel" : {
                "uuid" : "ccc4efc0-6193-11e2-bbe4-55be16b5c5ac",
                "middleware" : "http://localhost/middleware.php"
        }

vzlogger stürzt ab

[Jan 18 19:50:25]       Opened logfile /var/log/vzlogger.log
[Jan 18 19:50:25][]     ===> Start meters.
[Jan 18 19:50:25][mtr0] Meter connection established
[Jan 18 19:50:25][mtr0] Meter thread started
[Jan 18 19:50:25][mtr0] meter is opened. Start channels.
[Jan 18 19:50:25][chn0] Logging thread started
[Jan 18 19:50:25][]     Startup done.
[Jan 18 19:50:25][chn0] Start logging thread for volkszaehler-api. Running
as daemon: no
[Jan 18 19:50:25][chn0] Using default api:
[Jan 18 19:50:25][mtr0] Number of readers: 3
[Jan 18 19:50:25][mtr0] Config.daemon: 0
[Jan 18 19:50:25][mtr0] Config.local: 0
[Jan 18 19:51:19]       terminating on signal 2.
[Jan 18 19:51:19]       Closing connections to terminate
[Jan 18 19:51:19][]     Server stopped.
[Jan 18 19:51:56]       Opened logfile /var/log/vzlogger.log
[Jan 18 19:51:56][]     ===> Start meters.
[Jan 18 19:51:56][mtr0] Meter connection established
[Jan 18 19:51:56][mtr0] Meter thread started
[Jan 18 19:51:56][mtr0] meter is opened. Start channels.
[Jan 18 19:51:56][chn0] Logging thread started
[Jan 18 19:51:56][]     Startup done.
[Jan 18 19:51:56][chn0] Start logging thread for volkszaehler-api. Running
as daemon: no
[Jan 18 19:51:56][chn0] Using default api:
[Jan 18 19:51:56][mtr0] Number of readers: 3
[Jan 18 19:51:56][mtr0] Config.daemon: 0
[Jan 18 19:51:56][mtr0] Config.local: 0
[Jan 18 19:53:26][s0]   Reading S0 - n=3 power=46.650065  counter=46.650065
[Jan 18 19:53:26][mtr0] Got 1 new readings from meter:
[Jan 18 19:53:26][mtr0] Reading: id=Counter/StringItentifier: value=1.00
ts=1358535206.170
[Jan 18 19:53:26][mtr0] Reading-THREAD - reading Got an exception : Not
identifier defined.
[Jan 18 19:53:26][]     Server stopped.

Warum meckert vzlogger "Not identifier defined." Was will er für einen
identifier?

Kodo DN



More information about the volkszaehler-users mailing list