[vz-users] Timeouts beim Auslesen meines Landis Gyr Zählers LGZ5ZMF100AC.M13

Frank Haverkamp f.haverkamp at gmail.com
Fri Jan 23 21:36:10 CET 2015


Hallo,

ich habe einen Landis Gyer Stromzähler. Ich verwende einen USB
Lesekopf von Udo an meinem Raspberry Pi. Folgendes konnte ich mit
unten stehendem Script auslesen:

pi at raspberrypi ~ $ cat < /dev/ttyUSB0 | od -tx1 -ta
0000000  2f  4c  47  5a  35  5a  4d  46  31  30  30  41  43  2e  4d  31
          /   L   G   Z   5   Z   M   F   1   0   0   A   C   .   M   1
0000020  33  0d  0a  02  46  2e  46  28  30  30  29  0d  0a  30  2e  30
          3  cr  nl stx   F   .   F   (   0   0   )  cr  nl   0   .   0
0000040  28  37  34  31  31  39  20  20  20  20  20  20  20  20  20  20
          (   7   4   1   1   9  sp  sp  sp  sp  sp  sp  sp  sp  sp  sp
0000060  20  29  0d  0a  43  2e  31  2e  30  28  39  30  35  36  30  36
         sp   )  cr  nl   C   .   1   .   0   (   9   0   5   6   0   6
0000100  37  30  29  0d  0a  43  2e  31  2e  31  28  20  20  20  20  20
          7   0   )  cr  nl   C   .   1   .   1   (  sp  sp  sp  sp  sp
0000120  20  20  20  29  0d  0a  31  2e  38  2e  30  28  30  32  33  35
         sp  sp  sp   )  cr  nl   1   .   8   .   0   (   0   2   3   5
0000140  39  31  2e  39  39  36  2a  6b  57  68  29  0d  0a  31  2e  38
          9   1   .   9   9   6   *   k   W   h   )  cr  nl   1   .   8
0000160  2e  31  28  30  32  33  35  39  31  2e  39  39  36  2a  6b  57
          .   1   (   0   2   3   5   9   1   .   9   9   6   *   k   W
0000200  68  29  0d  0a  31  2e  38  2e  32  28  30  30  30  30  30  30
          h   )  cr  nl   1   .   8   .   2   (   0   0   0   0   0   0
0000220  2e  30  30  30  2a  6b  57  68  29  0d  0a  32  2e  38  2e  30
          .   0   0   0   *   k   W   h   )  cr  nl   2   .   8   .   0
0000240  28  30  30  30  30  30  30  2e  30  30  30  2a  6b  57  68  29
          (   0   0   0   0   0   0   .   0   0   0   *   k   W   h   )
0000260  0d  0a  43  2e  37  2e  30  28  30  30  30  39  29  0d  0a  33
         cr  nl   C   .   7   .   0   (   0   0   0   9   )  cr  nl   3
0000300  32  2e  37  28  32  33  35  2a  56  29  0d  0a  35  32  2e  37
          2   .   7   (   2   3   5   *   V   )  cr  nl   5   2   .   7
0000320  28  32  33  35  2a  56  29  0d  0a  37  32  2e  37  28  32  33
          (   2   3   5   *   V   )  cr  nl   7   2   .   7   (   2   3
0000340  35  2a  56  29  0d  0a  43  2e  35  2e  30  28  30  30  29  0d
          5   *   V   )  cr  nl   C   .   5   .   0   (   0   0   )  cr
0000360  0a  21  0d  0a  03  6a  21  0d  0a  03  4f  7f  7f  7f  7f  7f
         nl   !  cr  nl etx   j   !  cr  nl etx   O del del del del del
0000400  7f  7f  7f  7f  7f  7f  7f  7f  7f  7f  7f  7f  7f  7f  7f  7f
        del del del del del del del del del del del del del del del del

pi at raspberrypi ~ $ cat < /dev/ttyUSB0 | strings
/LGZ5ZMF100AC.M13
F.F(00)
0.0(74119           )
C.1.0(90560670)
C.1.1(        )
1.8.0(023591.239*kWh)
1.8.1(023591.239*kWh)
1.8.2(000000.000*kWh)
2.8.0(000000.000*kWh)
C.7.0(0009)
32.7(235*V)
52.7(232*V)
72.7(235*V)
C.5.0(00)

Die Ausgabe habe ich durch folgendes Script ausgelöst, welches ich mir
aus den Beiträgen der Mailingliste zusammengestellt habe:

#!/bin/bash
#
http://t198809.network-volkszaehler-user.networkforum.info/landis-gyr-e350-zxf100ax-cx-t198809.html

# Default
stty -F /dev/ttyUSB0 sane

# Mode einstellen
stty -F /dev/ttyUSB0 300 parenb -parodd cs7 -cstopb raw hupcl cread \
 clocal -crtscts -ignbrk -brkint -ignpar -parmrk inpck -istrip -inlcr \
 -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8 -opost -olcuc
\
 -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab1 bs0 vt0 ff1
-isig \
 -icanon iexten -echo echoe echok -echonl -noflsh -xcase -tostop
-echoprt \
 echoctl echoke

# Ausgabe von ttyUSB0 anzeigen ... und jetzt den Kopf ansprechen
echo $'\x2f\x3f\x21\x0d' > /dev/ttyUSB0
sleep 2
echo $'\x06\x30\x30\x30\x0d' > /dev/ttyUSB0


Nachdem das wohl erfolgreich funktionert hat, habe ich versucht
vzlogger zum automatischen Auslesen einzusetzen.

Auszug aus /var/log/vzlogger.log. Am Anfang ist, wenn ich das richtig
interpretiere, eine erfolgreiche Kommunikation zu sehen. Am Ende
schlägt es fehl und die Ausgaben des Zählers können nicht erfolgreich
analysiert werden. Letzteres passiert mehrfach hintereinander. Nach
einiger Zeit ist wieder eine erfolgreiche Kommunikation zu sehen.

[Jan 23 19:29:19][mtr0] Next reading in 30 seconds
[Jan 23 19:29:49][d0]   sending pullsequenz send (len:5 is:5).
[Jan 23 19:29:51][d0]   Pull answer (vendor=LGZ, baudrate=5,
identification=ZMF100AC.M13)
[Jan 23 19:29:51][d0]   Sending ack sequence send (len:6 is:6,000
).
[Jan 23 19:30:00][d0]   DEBUG OBIS_CODE byte  hex= 7F 
[Jan 23 19:30:15][d0]   nothing received for more than 10 seconds
[Jan 23 19:30:15][d0]   read timed out!, context: 6, bytes read: 1, last
byte 0x7f
[Jan 23 19:30:15][mtr0] Got 0 new readings from meter:
[Jan 23 19:30:15][chn0] Buffer dump (size=0 keep=20): {}
[Jan 23 19:30:15][chn1] Buffer dump (size=0 keep=20): {}
[Jan 23 19:30:15][chn2] Buffer dump (size=0 keep=20): {}
[Jan 23 19:30:15][chn3] Buffer dump (size=0 keep=20): {}
[Jan 23 19:30:15][chn4] Buffer dump (size=0 keep=20): {}
[Jan 23 19:30:15][chn5] Buffer dump (size=0 keep=20): {}
[Jan 23 19:30:15][mtr0] Next reading in 30 seconds
[Jan 23 19:30:45][d0]   sending pullsequenz send (len:5 is:5).
[Jan 23 19:30:47][d0]   Pull answer (vendor=LGZ, baudrate=5,
identification=ZMF100AC.M13)
[Jan 23 19:30:47][d0]   Sending ack sequence send (len:6 is:6,000
).
[Jan 23 19:30:48][d0]   DEBUG OBIS_CODE byte  hex= 2 
[Jan 23 19:30:48][d0]   DEBUG OBIS_CODE byte F hex= 46 
[Jan 23 19:30:48][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:48][d0]   DEBUG OBIS_CODE byte F hex= 46 
[Jan 23 19:30:48][d0]   DEBUG OBIS_CODE byte ( hex= 28 
[Jan 23 19:30:48][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:48][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:48][d0]   DEBUG VALUE byte= ) hex= 29 
[Jan 23 19:30:48][d0]   Parsed reading (OBIS code=F.F, value=00, unit=)
[Jan 23 19:30:48][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:48][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:49][d0]   DEBUG OBIS_CODE byte 0 hex= 30 
[Jan 23 19:30:49][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:49][d0]   DEBUG OBIS_CODE byte 0 hex= 30 
[Jan 23 19:30:49][d0]   DEBUG OBIS_CODE byte ( hex= 28 
[Jan 23 19:30:49][d0]   DEBUG VALUE byte= 7 hex= 37 
[Jan 23 19:30:49][d0]   DEBUG VALUE byte= 4 hex= 34 
[Jan 23 19:30:49][d0]   DEBUG VALUE byte= 1 hex= 31 
[Jan 23 19:30:49][d0]   DEBUG VALUE byte= 1 hex= 31 
[Jan 23 19:30:49][d0]   DEBUG VALUE byte= 9 hex= 39 
[Jan 23 19:30:49][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:49][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:49][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:49][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:49][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:49][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:49][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:49][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:49][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:49][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:49][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:49][d0]   DEBUG VALUE byte= ) hex= 29 
[Jan 23 19:30:49][d0]   Parsed reading (OBIS code=0.0,
value=74119           , unit=)
[Jan 23 19:30:49][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:49][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:49][d0]   DEBUG OBIS_CODE byte C hex= 43 
[Jan 23 19:30:49][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:49][d0]   DEBUG OBIS_CODE byte 1 hex= 31 
[Jan 23 19:30:50][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:50][d0]   DEBUG OBIS_CODE byte 0 hex= 30 
[Jan 23 19:30:50][d0]   DEBUG OBIS_CODE byte ( hex= 28 
[Jan 23 19:30:50][d0]   DEBUG VALUE byte= 9 hex= 39 
[Jan 23 19:30:50][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:50][d0]   DEBUG VALUE byte= 5 hex= 35 
[Jan 23 19:30:50][d0]   DEBUG VALUE byte= 6 hex= 36 
[Jan 23 19:30:50][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:50][d0]   DEBUG VALUE byte= 6 hex= 36 
[Jan 23 19:30:50][d0]   DEBUG VALUE byte= 7 hex= 37 
[Jan 23 19:30:50][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:50][d0]   DEBUG VALUE byte= ) hex= 29 
[Jan 23 19:30:50][d0]   Parsed reading (OBIS code=C.1.0, value=90560670,
unit=)
[Jan 23 19:30:50][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:50][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:50][d0]   DEBUG OBIS_CODE byte C hex= 43 
[Jan 23 19:30:50][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:50][d0]   DEBUG OBIS_CODE byte 1 hex= 31 
[Jan 23 19:30:50][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:50][d0]   DEBUG OBIS_CODE byte 1 hex= 31 
[Jan 23 19:30:50][d0]   DEBUG OBIS_CODE byte ( hex= 28 
[Jan 23 19:30:50][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:50][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:50][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:50][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:50][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:50][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:50][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:50][d0]   DEBUG VALUE byte=   hex= 20 
[Jan 23 19:30:51][d0]   DEBUG VALUE byte= ) hex= 29 
[Jan 23 19:30:51][d0]   Parsed reading (OBIS code=C.1.1, value=        ,
unit=)
[Jan 23 19:30:51][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:51][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:51][d0]   DEBUG OBIS_CODE byte 1 hex= 31 
[Jan 23 19:30:51][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:51][d0]   DEBUG OBIS_CODE byte 8 hex= 38 
[Jan 23 19:30:51][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:51][d0]   DEBUG OBIS_CODE byte 0 hex= 30 
[Jan 23 19:30:51][d0]   DEBUG OBIS_CODE byte ( hex= 28 
[Jan 23 19:30:51][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:51][d0]   DEBUG VALUE byte= 2 hex= 32 
[Jan 23 19:30:51][d0]   DEBUG VALUE byte= 3 hex= 33 
[Jan 23 19:30:51][d0]   DEBUG VALUE byte= 6 hex= 36 
[Jan 23 19:30:51][d0]   DEBUG VALUE byte= 3 hex= 33 
[Jan 23 19:30:51][d0]   DEBUG VALUE byte= 8 hex= 38 
[Jan 23 19:30:51][d0]   DEBUG VALUE byte= . hex= 2e 
[Jan 23 19:30:51][d0]   DEBUG VALUE byte= 4 hex= 34 
[Jan 23 19:30:51][d0]   DEBUG VALUE byte= 5 hex= 35 
[Jan 23 19:30:51][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:51][d0]   DEBUG VALUE byte= * hex= 2a 
[Jan 23 19:30:51][d0]   Parsed reading (OBIS code=1.8.0,
value=023638.450, unit=kWh)
[Jan 23 19:30:51][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:51][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:52][d0]   DEBUG OBIS_CODE byte 1 hex= 31 
[Jan 23 19:30:52][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:52][d0]   DEBUG OBIS_CODE byte 8 hex= 38 
[Jan 23 19:30:52][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:52][d0]   DEBUG OBIS_CODE byte 1 hex= 31 
[Jan 23 19:30:52][d0]   DEBUG OBIS_CODE byte ( hex= 28 
[Jan 23 19:30:52][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:52][d0]   DEBUG VALUE byte= 2 hex= 32 
[Jan 23 19:30:52][d0]   DEBUG VALUE byte= 3 hex= 33 
[Jan 23 19:30:52][d0]   DEBUG VALUE byte= 6 hex= 36 
[Jan 23 19:30:52][d0]   DEBUG VALUE byte= 3 hex= 33 
[Jan 23 19:30:52][d0]   DEBUG VALUE byte= 8 hex= 38 
[Jan 23 19:30:52][d0]   DEBUG VALUE byte= . hex= 2e 
[Jan 23 19:30:52][d0]   DEBUG VALUE byte= 4 hex= 34 
[Jan 23 19:30:52][d0]   DEBUG VALUE byte= 5 hex= 35 
[Jan 23 19:30:52][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:52][d0]   DEBUG VALUE byte= * hex= 2a 
[Jan 23 19:30:52][d0]   Parsed reading (OBIS code=1.8.1,
value=023638.450, unit=kWh)
[Jan 23 19:30:52][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:52][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:52][d0]   DEBUG OBIS_CODE byte 1 hex= 31 
[Jan 23 19:30:52][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:52][d0]   DEBUG OBIS_CODE byte 8 hex= 38 
[Jan 23 19:30:53][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:53][d0]   DEBUG OBIS_CODE byte 2 hex= 32 
[Jan 23 19:30:53][d0]   DEBUG OBIS_CODE byte ( hex= 28 
[Jan 23 19:30:53][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:53][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:53][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:53][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:53][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:53][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:53][d0]   DEBUG VALUE byte= . hex= 2e 
[Jan 23 19:30:53][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:53][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:53][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:53][d0]   DEBUG VALUE byte= * hex= 2a 
[Jan 23 19:30:53][d0]   Parsed reading (OBIS code=1.8.2,
value=000000.000, unit=kWh)
[Jan 23 19:30:53][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:53][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:53][d0]   DEBUG OBIS_CODE byte 2 hex= 32 
[Jan 23 19:30:53][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:53][d0]   DEBUG OBIS_CODE byte 8 hex= 38 
[Jan 23 19:30:53][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:53][d0]   DEBUG OBIS_CODE byte 0 hex= 30 
[Jan 23 19:30:53][d0]   DEBUG OBIS_CODE byte ( hex= 28 
[Jan 23 19:30:53][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:53][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:54][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:54][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:54][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:54][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:54][d0]   DEBUG VALUE byte= . hex= 2e 
[Jan 23 19:30:54][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:54][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:54][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:54][d0]   DEBUG VALUE byte= * hex= 2a 
[Jan 23 19:30:54][d0]   Parsed reading (OBIS code=2.8.0,
value=000000.000, unit=kWh)
[Jan 23 19:30:54][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:54][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:54][d0]   DEBUG OBIS_CODE byte C hex= 43 
[Jan 23 19:30:54][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:54][d0]   DEBUG OBIS_CODE byte 7 hex= 37 
[Jan 23 19:30:54][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:54][d0]   DEBUG OBIS_CODE byte 0 hex= 30 
[Jan 23 19:30:54][d0]   DEBUG OBIS_CODE byte ( hex= 28 
[Jan 23 19:30:54][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:54][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:54][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:54][d0]   DEBUG VALUE byte= 9 hex= 39 
[Jan 23 19:30:54][d0]   DEBUG VALUE byte= ) hex= 29 
[Jan 23 19:30:54][d0]   Parsed reading (OBIS code=C.7.0, value=0009,
unit=)
[Jan 23 19:30:54][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:54][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:55][d0]   DEBUG OBIS_CODE byte 3 hex= 33 
[Jan 23 19:30:55][d0]   DEBUG OBIS_CODE byte 2 hex= 32 
[Jan 23 19:30:55][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:55][d0]   DEBUG OBIS_CODE byte 7 hex= 37 
[Jan 23 19:30:55][d0]   DEBUG OBIS_CODE byte ( hex= 28 
[Jan 23 19:30:55][d0]   DEBUG VALUE byte= 2 hex= 32 
[Jan 23 19:30:55][d0]   DEBUG VALUE byte= 3 hex= 33 
[Jan 23 19:30:55][d0]   DEBUG VALUE byte= 3 hex= 33 
[Jan 23 19:30:55][d0]   DEBUG VALUE byte= * hex= 2a 
[Jan 23 19:30:55][d0]   Ignored reading (OBIS code=32.7, value=233,
unit=V)
[Jan 23 19:30:55][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:55][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:55][d0]   DEBUG OBIS_CODE byte 5 hex= 35 
[Jan 23 19:30:55][d0]   DEBUG OBIS_CODE byte 2 hex= 32 
[Jan 23 19:30:55][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:55][d0]   DEBUG OBIS_CODE byte 7 hex= 37 
[Jan 23 19:30:55][d0]   DEBUG OBIS_CODE byte ( hex= 28 
[Jan 23 19:30:55][d0]   DEBUG VALUE byte= 2 hex= 32 
[Jan 23 19:30:55][d0]   DEBUG VALUE byte= 3 hex= 33 
[Jan 23 19:30:55][d0]   DEBUG VALUE byte= 4 hex= 34 
[Jan 23 19:30:55][d0]   DEBUG VALUE byte= * hex= 2a 
[Jan 23 19:30:55][d0]   Ignored reading (OBIS code=52.7, value=234,
unit=V)
[Jan 23 19:30:55][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:55][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:56][d0]   DEBUG OBIS_CODE byte 7 hex= 37 
[Jan 23 19:30:56][d0]   DEBUG OBIS_CODE byte 2 hex= 32 
[Jan 23 19:30:56][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:56][d0]   DEBUG OBIS_CODE byte 7 hex= 37 
[Jan 23 19:30:56][d0]   DEBUG OBIS_CODE byte ( hex= 28 
[Jan 23 19:30:56][d0]   DEBUG VALUE byte= 2 hex= 32 
[Jan 23 19:30:56][d0]   DEBUG VALUE byte= 3 hex= 33 
[Jan 23 19:30:56][d0]   DEBUG VALUE byte= 3 hex= 33 
[Jan 23 19:30:56][d0]   DEBUG VALUE byte= * hex= 2a 
[Jan 23 19:30:56][d0]   Ignored reading (OBIS code=72.7, value=233,
unit=V)
[Jan 23 19:30:56][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:56][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:56][d0]   DEBUG OBIS_CODE byte C hex= 43 
[Jan 23 19:30:56][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:56][d0]   DEBUG OBIS_CODE byte 5 hex= 35 
[Jan 23 19:30:56][d0]   DEBUG OBIS_CODE byte . hex= 2E 
[Jan 23 19:30:56][d0]   DEBUG OBIS_CODE byte 0 hex= 30 
[Jan 23 19:30:56][d0]   DEBUG OBIS_CODE byte ( hex= 28 
[Jan 23 19:30:56][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:56][d0]   DEBUG VALUE byte= 0 hex= 30 
[Jan 23 19:30:56][d0]   DEBUG VALUE byte= ) hex= 29 
[Jan 23 19:30:56][d0]   Parsed reading (OBIS code=C.5.0, value=00,
unit=)
[Jan 23 19:30:56][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:56][d0]   DEBUG OBIS_CODE byte 
 hex= A 
[Jan 23 19:30:57][d0]   Read package with 10 tuples (vendor=LGZ,
baudrate=5, identification=ZMF100AC.M13)
[Jan 23 19:30:57][mtr0] Got 10 new readings from meter:
[Jan 23 19:30:57][mtr0] Reading:
id=255-255:97.97.255*255/ObisItentifier:255-255:97.97.255*255 value=0.00
ts=1422041448.815
[Jan 23 19:30:57][mtr0] Reading:
id=255-255:0.0.255*255/ObisItentifier:255-255:0.0.255*255 value=74119.00
ts=1422041449.676
[Jan 23 19:30:57][mtr0] Reading:
id=255-255:96.1.0*255/ObisItentifier:255-255:96.1.0*255
value=90560670.00 ts=1422041450.379
[Jan 23 19:30:57][mtr0] Reading:
id=255-255:96.1.1*255/ObisItentifier:255-255:96.1.1*255 value=0.00
ts=1422041451.015
[Jan 23 19:30:57][mtr0] Reading:
id=255-255:1.8.0*255/ObisItentifier:255-255:1.8.0*255 value=23638.45
ts=1422041451.856
[Jan 23 19:30:57][mtr0] Reading:
id=255-255:1.8.1*255/ObisItentifier:255-255:1.8.1*255 value=23638.45
ts=1422041452.699
[Jan 23 19:30:57][mtr0] Reading:
id=255-255:1.8.2*255/ObisItentifier:255-255:1.8.2*255 value=0.00
ts=1422041453.581
[Jan 23 19:30:57][mtr0] Reading:
id=255-255:2.8.0*255/ObisItentifier:255-255:2.8.0*255 value=0.00
ts=1422041454.410
[Jan 23 19:30:57][mtr0] Reading:
id=255-255:96.7.0*255/ObisItentifier:255-255:96.7.0*255 value=9.00
ts=1422041454.916
[Jan 23 19:30:57][mtr0] Reading:
id=255-255:96.5.0*255/ObisItentifier:255-255:96.5.0*255 value=0.00
ts=1422041456.850
[Jan 23 19:30:57][chn0] Buffer dump (size=0 keep=20): {}
[Jan 23 19:30:57][chn1] Buffer dump (size=0 keep=20): {}
[Jan 23 19:30:57][chn2] Buffer dump (size=0 keep=20): {}
[Jan 23 19:30:57][chn3] Buffer dump (size=0 keep=20): {}
[Jan 23 19:30:57][chn4] Buffer dump (size=0 keep=20): {}
[Jan 23 19:30:57][chn5] Buffer dump (size=0 keep=20): {}
[Jan 23 19:30:57][mtr0] Next reading in 30 seconds
[Jan 23 19:31:27][d0]   sending pullsequenz send (len:5 is:5).
[Jan 23 19:31:28][d0]   Pull answer (vendor=LGZ, baudrate=5,
identification=ZMF100AC.M13)
[Jan 23 19:31:28][d0]   Sending ack sequence send (len:6 is:6,000
).
[Jan 23 19:31:37][d0]   DEBUG OBIS_CODE byte  hex= 7F 
[Jan 23 19:31:52][d0]   nothing received for more than 10 seconds
[Jan 23 19:31:52][d0]   read timed out!, context: 6, bytes read: 1, last
byte 0x7f
[Jan 23 19:31:52][mtr0] Got 0 new readings from meter:
[Jan 23 19:31:52][chn0] Buffer dump (size=0 keep=20): {}
[Jan 23 19:31:52][chn1] Buffer dump (size=0 keep=20): {}
[Jan 23 19:31:52][chn2] Buffer dump (size=0 keep=20): {}
[Jan 23 19:31:52][chn3] Buffer dump (size=0 keep=20): {}
[Jan 23 19:31:52][chn4] Buffer dump (size=0 keep=20): {}
[Jan 23 19:31:52][chn5] Buffer dump (size=0 keep=20): {}
[Jan 23 19:31:52][mtr0] Next reading in 30 seconds
...

Die passende Sequenz in dumpD0.log sieht so aus:

<<<<<
2f 3f 21 0d 0a                                    /?!              

>>>>>
2f 4c 47 5a 35 5a 4d 46 31 30 30 41 43 2e 4d 31   /LGZ5ZMF100AC.M1 
33 0a 0a                                          3                

<<<<<
06 30 30 30 0d 0a                                  000             

>>>>>
02 46 2e 46 28 30 30 29 0a 0a 30 2e 30 28 37 34    F.F(00)  0.0(74 
31 31 39 20 20 20 20 20 20 20 20 20 20 20 29 0a   119           )  
0a 43 2e 31 2e 30 28 39 30 35 36 30 36 37 30 29    C.1.0(90560670) 
0a 0a 43 2e 31 2e 31 28 20 20 20 20 20 20 20 20     C.1.1(         
29 0a 0a 31 2e 38 2e 30 28 30 32 33 36 33 38 2e   )  1.8.0(023638. 
36 35 33 2a 6b 57 68 29 0a 0a 31 2e 38 2e 31 28   653*kWh)  1.8.1( 
30 32 33 36 33 38 2e 36 35 33 2a 6b 57 68 29 0a   023638.653*kWh)  
0a 31 2e 38 2e 32 28 30 30 30 30 30 30 2e 30 30    1.8.2(000000.00 
30 2a 6b 57 68 29 0a 0a 32 2e 38 2e 30 28 30 30   0*kWh)  2.8.0(00 
30 30 30 30 2e 30 30 30 2a 6b 57 68 29 0a 0a 43   0000.000*kWh)  C 
2e 37 2e 30 28 30 30 30 39 29 0a 0a 33 32 2e 37   .7.0(0009)  32.7 
28 32 33 35 2a 56 29 0a 0a 35 32 2e 37 28 32 33   (235*V)  52.7(23 
36 2a 56 29 0a 0a 37 32 2e 37 28 32 33 35 2a 56   6*V)  72.7(235*V 
29 0a 0a 43 2e 35 2e 30 28 30 30 29 0a 0a 21      )  C.5.0(00)  !  

##### read
##### TCIOFLUSH and cfsetiospeed
<<<<<
2f 3f 21 0d 0a                                    /?!              

>>>>>
2f 4c 47 5a 35 5a 4d 46 31 30 30 41 43 2e 4d 31   /LGZ5ZMF100AC.M1 
33 0a 0a                                          3                

<<<<<
06 30 30 30 0d 0a                                  000             

##### timeout!
##### read
##### TCIOFLUSH and cfsetiospeed
...

Verwendete Konfiguration /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": false,        // run periodically
    "verbosity": 15,         // between 0 and 15
    "log": "/var/log/vzlogger.log",     // path to logfile, optional

    "local": {
        "enabled": true,    // 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 (default)
            "skip": false,                  // if enabled, errors when
opening meter will lead to meter being ignored
            "protocol": "d0",               // see 'vzlogger -h' for
list of available protocols
            "device": "/dev/ttyUSB0",
            "dump_file": "/var/log/dumpD0.txt", // optional, if set logs
all received/transmitted data to this file
            "parity": "7E1",                // oder 8N1
            "baudrate": 300,                // oder 300
            "pullseq": "2F3F210D0A",        // Pullsequenz in 'hex'
            "ackseq": "063030300d0a",       // Antwortsequenz auf
Zählerantwort,063030300d0a = 300bd, 063035300d0a = 9600bd
            "baudrate_read": 300,           // Baudratenumschaltung auf
gewünschte Baudrate, abhängig von Zählerantwort
            "aggtime": 20,                  // in Sekunden
            "aggmode": "AVG",               // Mittelwert für Leistung,
"MAX" für Zähler, "SUM" für Counter
            "interval": 30,                 // Wartezeit in Sekunden bis
neue Werte in die middleware übertragen werden
            "channels": [{       
                        "uuid": "3778fb40-98c5-11e4-9b5e-a7bc2516acc9",
                        "middleware": "http://localhost/middleware.php",
                        "identifier": "1-0:1.8.0"
                }]
          }
    ]
}

vzlogger habe ich aus dem aktuellen git gebaut (master):

root at raspberrypi:~# vzlogger -V
0.4.0
 based on git version: heads/master-0-gb3d5bd915b


Könnt Ihr mir Hinweise geben, was da falsch läuft und wo ich ändern
muss, sodass das Auslesen in allen Fällen gelingt?

Vielen Dank

Frank




More information about the volkszaehler-users mailing list