Hallo,
habe was bemerkt.
Wenn ich den vzlogger starte dann ist immer "crtscts" im ssty -F
aktiv.
Dann geht nix.
Ich setze dann mit # stty -F /dev/ttyUSB0 -crtscts
diese Option weg und plötzlich spuckt mein Zähler daten aus.
VZlogger meldet folgenden Output:
root@raspberrypi:/data/vzlogger# vzlogger -c /etc/vzlogger.conf
[Jan 07 14:09:35] Ignoring invalid field or type: debug=100
(int)
[Jan 07 14:09:35][mtr0] Creating new meter with protocol d0.
[Jan 07 14:09:35][d0] pullseq len:5 found
[Jan 07 14:09:35][mtr0] Meter configured. enabled
[Jan 07 14:09:35] New meter initialized (protocol=d0)
[Jan 07 14:09:35] Configure channel.
[Jan 07 14:09:35][chn0] New channel initialized (uuid=...52365e
protocol=mysmartgrid id=255-255:1.8.1)
[Jan 07 14:09:35] Have 1 meters.
[Jan 07 14:09:35][main] foreground=1, daemon=0, local=0
[Jan 07 14:09:35] NOT Daemonize process...
[Jan 07 14:09:35][] ===> Start meters.
[Jan 07 14:09:35][mtr0] Meter connection established
[Jan 07 14:09:35][mtr0] Meter thread started
[Jan 07 14:09:35][mtr0] meter is opened. Start channels.
[Jan 07 14:09:35][chn0] Logging thread started
[Jan 07 14:09:35][] Startup done.
[Jan 07 14:09:35][chn0] Start logging thread for mysmartgrid-api.
Running as daemon: no
[Jan 07 14:09:35][chn0] ===> Create MySmartGrid-API
[Jan 07 14:09:35][chn0] msg_api_init()
http://localhost/middleware.php/sensor/84c148f060e411e3ae1813537b52365e
[Jan 07 14:09:35][mtr0] Number of readers: 32
[Jan 07 14:09:35][mtr0] Config.daemon: 0
[Jan 07 14:09:35][mtr0] Config.local: 0
[Jan 07 14:09:35][d0] sending pullsequenz send (len:5 is:5).
[Jan 07 14:09:35][chn0] Using MSG-Api.
[Jan 07 14:09:45][d0] Meter supports baudrate of 9600
[Jan 07 14:09:48][d0] Parsed reading (OBIS code=0.0.0,
value=11111111, unit=)
[Jan 07 14:09:49][d0] Parsed reading (OBIS code=0.1.0, value=13,
unit=)
[Jan 07 14:10:01][d0] Parsed reading (OBIS code=1.8.1,
value=002502.1, unit=kWh)
[Jan 07 14:10:11][d0] Parsed reading (OBIS code=2.8.1,
value=000000.0, unit=kWh)
[Jan 07 14:10:21][d0] Parsed reading (OBIS code=0.9.1,
value=00:26:35, unit=)
[Jan 07 14:10:21][d0] Parsed reading (OBIS code=0.9.2,
value=01-01-03, unit=)
[Jan 07 14:10:22][d0] Parsed reading (OBIS code=0.2.0,
value=B14, unit=)
[Jan 07 14:10:22][d0] Parsed reading (OBIS code=0.2.1,
value=TEST, unit=)
[Jan 07 14:10:23][d0] Parsed reading (OBIS code=0.2.2,
value=999, unit=)
[Jan 07 14:10:23][d0] Parsed reading (OBIS code=C.2.1,
value=00-01-01 00:00, unit=)
[Jan 07 14:10:23][d0] --> skipped because of parse errors
[Jan 07 14:10:24][d0] Read package with 9 tuples (vendor=LGZ,
baudrate=5, identification=\2ZMD3102400.B14)
[Jan 07 14:10:24][mtr0] Got 9 new readings from meter:
[Jan 07 14:10:24][mtr0] Reading:
id=255-255:0.0.0*255/ObisItentifier:255-255:0.0.0*255
value=11111111.00 ts=1389100188.854
[Jan 07 14:10:24][mtr0] Reading:
id=255-255:0.1.0*255/ObisItentifier:255-255:0.1.0*255 value=13.00
ts=1389100189.240
[Jan 07 14:10:24][mtr0] Reading:
id=255-255:1.8.1*255/ObisItentifier:255-255:1.8.1*255
value=2502.10 ts=1389100201.685
[Jan 07 14:10:24][mtr0] Reading:
id=255-255:2.8.1*255/ObisItentifier:255-255:2.8.1*255 value=0.00
ts=1389100211.515
[Jan 07 14:10:24][mtr0] Reading:
id=255-255:0.9.1*255/ObisItentifier:255-255:0.9.1*255 value=0.00
ts=1389100221.174
[Jan 07 14:10:24][mtr0] Reading:
id=255-255:0.9.2*255/ObisItentifier:255-255:0.9.2*255 value=1.00
ts=1389100221.741
[Jan 07 14:10:24][mtr0] Reading:
id=255-255:0.2.0*255/ObisItentifier:255-255:0.2.0*255 value=0.00
ts=1389100222.164
[Jan 07 14:10:24][mtr0] Reading:
id=255-255:0.2.1*255/ObisItentifier:255-255:0.2.1*255 value=0.00
ts=1389100222.623
[Jan 07 14:10:24][mtr0] Reading:
id=255-255:0.2.2*255/ObisItentifier:255-255:0.2.2*255 value=999.00
ts=1389100223.057
[Jan 07 14:10:24][chn0] Adding reading to queue (value=2502.10
ts=1389100201.685)
[Jan 07 14:10:24][chn0] ==> 1389100201, 2502.100098 - 2502100
[Jan 07 14:10:24][chn0] JSON request body is null. Nothing to send
now.
[Jan 07 14:10:24][chn0] Buffer dump (size=0 keep=32): {}
[Jan 07 14:10:24][mtr0] Next reading in 61 seconds
Es scheint als ob der Obis Wert richtig gelesen wird, aber
anscheinend kein JSON zur Middleware da is.
Meine Config:
/**
* 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, /* run in background */
"verbosity" : 15, /* between 0 and 15 */
"debug" : 100,
//"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 protocols */
"device" : "/dev/ttyUSB0",
"interval" : 61,
"baudrate" : 300,
"parity" : "7E1",
"pullseq" : "2F3F210D0A",
// "resolution" : 1,
"channels" : [{
"protocol" : "mysmartgrid", /* use MySmartgrid as
middleware protocol */
"type" : "sensor",
"device" :
"52709939-4183-472e-a3bb-78d944da9937",
"uuid" :
"84c148f0-60e4-11e3-ae18-13537b52365e",
"secretKey" :
"57c56da4-5932-497c-bd80-6cb210c0b891",
// "interval" : 300, /* */
"middleware" :
"http://localhost/middleware.php",
/* identifier for measurement: 1-0:1.8.0 */
//"identifier" : "1.8.1", /* see 'vzlogger -v20' for
an output with all available identifiers/OBIS ids */
"identifier" : "255-255:1.8.1", /* see 'vzlogger
-v20' for an output with all available identifiers/OBIS ids */
//"identifier" : "1-0:1.8.0", /* see 'vzlogger -v20'
for an output with all available identifiers/OBIS ids */
"scaler" : 1000, /* d0 counter is in kWh, so
scaling is 1000 */
}]
}
]}
gruss
Michael
Am 04.01.14 12:35, schrieb Michael Wulz: