<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Ich schaue mir das noch mal in Ruhe an, schaffe ich aber erst nächsten Sonntag.<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Am 22.01.2016 um 18:41 schrieb Winfried Peters <<a href="mailto:winfried.peters@gmail.com" class="">winfried.peters@gmail.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class="">Hallo,<br class=""><br class=""></div>es gelingt mir nicht meinen Drehstromzähler dauerhaft auf eine höhere Baudrate umzustellen.<br class=""><br class=""></div></div>Es handelt sich um ein EMH-ITZ Gerät.Folgende Informationen habe ich auf Anfrage vom zuständigen Stromnetzbetreiber bekommen:<br class=""></div><ul class=""><li class="">Die Infrarotschnittstelle kommuniziert über das Schnittstellenprotokoll IEC1107</li><li class="">Die Schnittstelle muss über eine Initialisierungssequenz mit Passwort aktiviert werden. Das Passwort ist die Eigentumsnummer<br class=""></li><li class="">Zu Anfang erwartet der Zähler Kommunikation mit 300 baud, 7 Datenbits, 1 Stopbit, Parität even.</li><li class="">Jeder Befehl muss mit CR&LF abgeschlossen werden.</li><li class="">Wenn die Kommunikation läuft, kann man auf höhere Datenraten umstellen.</li><li class="">Der Zähler antwortet sofort mit /AAAB\@nnnnnnnnnnnnnn</li><ul class=""><li class="">wobei:AAA = „EMH“</li><li class="">B gibt die maximale Baudrate an (4 = 4800 Bd)</li><li class="">„\@“ bedeutet, dass der Zähler R5, W5 und R6-Befehle unterstützt</li><li class="">nnnnnnnnnnnnnn bezeichnet die 14-stellige Geräte-ID.</li></ul><li class="">Wenn innerhalb von 1,5s keine weiteren Befehle gesendet werden, gibt der Zähler die aktuellen Messwerte aus und meldet sich ab</li></ul></div>Mit den vzlogger-Parametern<br class=""><ul class=""><li class="">Initialisierung: "pullseq": "2F3F343230383138210D0A"</li><li class="">Aufforderung Baudratenwechsel 4800 Bd: "ackseq": "063034300D0A"</li><li class="">"baudrate": 300 und "baudrate_read": 4800</li></ul></div>sollte sich im Prinzip die Kommunikation einstellen lassen.<br class=""><br class=""></div>Nach Permutation von verschiedenen Parametern konnte ich mit "baudrate_change_delay": 500 und "wait_sync": "end" das bisher beste Ergebnis erzielen: Das 1. Zählertelegramm wird in umgestellter Baudrate ausgegeben, die nachfolgenden Telegramme allerdings wieder nur in 300 Bd.<br class=""><br class=""></div>Das sieht im d0-Dump (die komplette Datei d0-169.txt im Anhang) dann so aus:<br class=""><br class="">--------------------------------------- Anfang d0-dump-------------------------------<br class="">##### 50.158888503s (     0 ms) opened<br class="">##### 50.171490960s (    13 ms) read<br class="">##### 50.171546136s (     0 ms) TCIOFLUSH and cfsetiospeed<br class=""><<<<< 50.671836289s (   500 ms)<br class="">2f 3f 34 32 30 38 31 38 21 0d 0a                  /?420818!<br class=""><br class="">>>>>> 50.705414525s (    34 ms)<br class="">2f 3f 34 32 30 38 31 38 21 0a 0a 2f 45 4d 48 34   /?420818!  /EMH4<br class="">5c 40 2d 2d 49 54 5a 2d 47 30 30 33 38 45 0a 0a   \@--ITZ-G0038E<br class=""><br class=""><<<<< 52.585570689s (  1880 ms)<br class="">06 30 34 30 0d 0a                                  040<br class=""><br class="">##### 53.087406779s (   502 ms) usleep cfsetispeed<br class="">>>>>> 53.087504791s (     0 ms)<br class="">06 30 34 30 0a 0a 02 46 2e 46 28 30 30 30 30 30    040   F.F(00000   <span style="color:rgb(255,0,0)" class="">1. Zählertelegramm</span><br class="">30 30 30 29 0a 0a 30 2e 30 2e 30 28 30 30 34 32   000)  0.0.0(0042<br class="">30 38 31 38 29 0a 0a 30 2e 30 2e 31 28 30 32 32   0818)  0.0.1(022<br class="">35 36 32 33 30 29 0a 0a 30 2e 31 2e 30 28 36 35   56230)  0.1.0(65<br class="">....<br class="">....<br class="">2a 56 29 0a 0a 35 32 2e 32 35 28 32 33 31 2e 30   *V)  52.25(231.0<br class="">2a 56 29 0a 0a 37 32 2e 32 35 28 32 33 30 2e 33   *V)  72.25(230.3<br class="">2a 56 29 0a 0a 21                                 *V)  !<br class=""><br class="">##### 59.602715084s (  <span style="color:rgb(255,0,0)" class="">6515 ms</span>) read<br class="">##### 59.602767305s (     0 ms) TCIOFLUSH and cfsetiospeed<br class=""><<<<< 60.103714342s (   501 ms)<br class="">2f 3f 34 32 30 38 31 38 21 0d 0a                  /?420818!<br class=""><br class="">>>>>> 60.134602742s (    31 ms)<br class="">2f 3f 34 32 30 38 31 38 21                        /?420818!<br class=""><br class="">##### 60.403894575s (   269 ms) read<br class="">##### 60.403946531s (     0 ms) TCIOFLUSH and cfsetiospeed<br class=""><<<<< 60.904221804s (   501 ms)<br class="">2f 3f 34 32 30 38 31 38 21 0d 0a                  /?420818!<br class="">>>>>> 60.904947849s (     0 ms)<br class="">0a 0a 2f 3f 34 32 30 38 31 28 21                    /?42081(!<br class=""><br class="">##### 61.205930809s (   301 ms) read<br class="">##### 61.205983535s (     0 ms) TCIOFLUSH and cfsetiospeed<br class=""><<<<< 61.706251638s (   501 ms)<br class="">2f 3f 34 32 30 38 31 38 21 0d 0a                  /?420818!<br class=""><br class="">>>>>> 61.706938172s (     0 ms)<br class="">00 02 63 05 2d 2d 49 54 5a 2d 47 30 30 33 38 05     c --ITZ-G0038   <span style="color:rgb(255,0,0)" class="">2. Zählertelegramm</span><br class="">05 02 36 42 0b 43 0b 6a 0a 02 46 2e 46 28 30 30     6B C j  F.F(00<br class="">30 30 30 30 30 30 29 0a 0a 30 2e 30 2e 30 28 30   000000)  0.0.0(0<br class="">....<br class="">....<br class="">30 2e 37 2a 56 29 0a 0a 37 32 2e 32 35 28 32 32   0.7*V)  72.25(22<br class="">39 2e 39 2a 56 29 0a 0a 21                        9.9*V)  !<br class=""><br class="">##### 52.591701715s ( <span style="color:rgb(255,0,0)" class="">90885 ms</span>) read<br class="">##### 52.591754756s (     0 ms) TCIOFLUSH and cfsetiospeed<br class=""><<<<< 53.092015394s (   501 ms)<br class="">2f 3f 34 32 30 38 31 38 21 0d 0a                  /?420818!<br class=""><br class="">>>>>> 53.092768889s (     0 ms)<br class="">0a 0a 03 6e 2f 3f 34 32 30 38 31 38 21               n/?420818!<br class=""><br class="">##### 53.391805484s (   299 ms) read<br class="">##### 53.391857725s (     0 ms) TCIOFLUSH and cfsetiospeed<br class=""><<<<< 53.892111733s (   501 ms)<br class="">2f 3f 34 32 30 38 31 38 21 0d 0a                  /?420818!<br class=""><br class="">>>>>> 53.892736371s (     0 ms)<br class="">0a 0a 2f 3f 34 32 30 38 31 20 21                    /?42081 !<br class=""><br class="">##### 54.194921780s (   302 ms) read<br class="">##### 54.194977016s (     0 ms) TCIOFLUSH and cfsetiospeed<br class=""><<<<< 54.695234624s (   501 ms)<br class="">2f 3f 34 32 30 38 31 38 21 0d 0a                  /?420818!<br class=""><br class="">>>>>> 54.695868362s (     0 ms)<br class="">01 00 63 05 2d 2d 49 54 5a 2d 47 30 30 33 38 41     c --ITZ-G0038A<br class="">0a 02 36 42 0b 43 0b 6a 0a 02 46 2e 46 28 30 30     6B C j  F.F(00<br class=""></div>--------------------------------------- Ende d0-dump-------------------------------<br class=""><div class=""><br class=""></div><div class="">Hier die vollständige vzlogger.conf:<br class="">{<br class="">  "retry": 0,<br class="">  "daemon": true,<br class="">  "verbosity": 15,<br class="">  "log": "/var/log/vztest.log",<br class="">  "local": {<br class="">     "enabled": true,<br class="">     "port": 8080,<br class="">     "index": true,<br class="">     "timeout": 0,<br class="">     "buffer": 600<br class="">  },<br class="">  // Meter configuration<br class="">  "meters": [<br class="">   {<br class="">      // D0 meter (Strom)<br class="">      "enabled": true,<br class="">      "allowskip": false,<br class="">      "aggtime": -1,<br class="">      "aggfixedinterval": false,<br class="">      "channels": [<br class="">       {<br class="">          "uuid": "180a",<br class="">          "identifier": "1.8.1",<br class="">          "api": "null",<br class="">          "aggmode": "none",<br class="">          "duplicates": 0<br class="">       }<br class="">      ],<br class="">      "protocol": "d0",<br class="">      "device": "/dev/ttyUSB0",<br class="">      "pullseq": "2F3F343230383138210D0A",<br class="">       "ackseq": "063034300D0A",<br class="">      "baudrate": 300,<br class="">      "baudrate_read": 4800,<br class="">      "parity": "7e1",<br class="">      "wait_sync": "end",<br class="">      "read_timeout": 100,<br class="">      "dump_file": "/var/log/d0-169.txt",<br class="">      "baudrate_change_delay": 500<br class="">    }<br class="">  ]<br class="">}<br class=""><br class=""></div><div class="">Das Timing in der Kommunikation stimmt noch nicht. Ich hoffe mir kann jemand weiterhelfen.<br class=""><br class=""></div><div class="">Viele Grüße<br class=""></div><div class="">Winfried<br class=""></div></div>
<span id="cid:E81A364A-C008-4F1E-B34F-B0E869782B4D"><d0-169.txt></span></div></blockquote></div><br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Gruß</div><div class=""><br class=""></div><div class="">Matthias</div></div></span>
</div>
<br class=""></div></body></html>