<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Nur Text Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.NurTextZchn
        {mso-style-name:"Nur Text Zchn";
        mso-style-priority:99;
        mso-style-link:"Nur Text";
        font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoPlainText>Hallo an Alle.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Mein erster Beitrag in einer Mailing-List. Hoffentlich klappt das alles.:) <o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Edit: Nein, hat es nicht. <span style='font-family:Wingdings'>L</span><o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Es geht um diesen Beitrag: <a href="http://wiki.volkszaehler.org/hardware/channels/meters/power/edl-ehz/itron_ace3000_type_260">http://wiki.volkszaehler.org/hardware/channels/meters/power/edl-ehz/itron_ace3000_type_260</a><o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Also, der Zähler wir Dank Roland seinem im Wiki veroeffentlichen Bash-Script hervorragend ausgelesen. Gelegentlich gibt es Haenger und es werden Nullwerte gespeichert. Ist eigentlich nicht schlimm, das Script ignoriert sowas und sendet es nicht in die SQL-Datenbank. Nur greife ich auf diese gespeicherten Werte regelmaessig darauf zu kann mit den Nullwerten nichts anfangen. <o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Es ist doch möglich, die Abfrage zu kontrollieren und bei Fehlern zu wiederholen, oder? Bin leider nicht so der Scripter, aber bei einer while do done Schleife ist es sicher möglich, die Abfrage bei einem Nullwert zu wiederholen.<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Hier ist, falls erlaubt, ein Auszug des Scriptes:<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText> <o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><span lang=EN-US># Init ttyUSB0<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>stty -F /dev/ttyUSB0 1:4:da7:a30:3:1c:7f:15:4:10:0:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>                                                            </span># Hack zum Aufwecken der Zähler im Hintergrund ( sleep 1 ; echo -e "\x2f\x3f\x21\x0d\x0a" > /dev/ttyUSB0 ) &<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>while read -t8 line                                         # warten auf die Zaehlerausgabe<o:p></o:p></p><p class=MsoPlainText>do                                                          # Bestaetigung nach dem Wecken nicht notwendig<o:p></o:p></p><p class=MsoPlainText>  [[ "$line" =~ "1.8.0" ]] && Z1=${line:6:8}                # Wert fuer Bezug<o:p></o:p></p><p class=MsoPlainText>  [[ "$line" =~ "2.8.0" ]] && Z2=${line:6:8}                # Wert fuer Einspeisung<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>done < /dev/ttyUSB0<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Wer weiss Rat zu dieser Sache?<o:p></o:p></p><p class=MsoPlainText><o:p> </o:p></p><p class=MsoPlainText>Gruss, Mike<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>