<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="">Hi Sascha,<div class=""><br class=""></div><div class="">hab das aus dem Script vz_read_meter.php von Rudolf Reuter genommen und auf meine Belange umgebaut - hast Du das mal so probiert (hab bei mir channel_id = 5 in der volkzaehler DB - das musst Du auf Deine Kanäle anpassen) :</div><div class=""><br class=""></div><div class=""><div style="margin: 0px;" class=""><div style="margin: 0px;" class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">    $username=</span></font><b class=""><font color="#afad24" face="Menlo" class=""><span style="font-size: 11px;" class="">“DeinUser</span></font></b><font face="Menlo" class=""><font color="#afad24" class=""><span style="font-size: 11px;" class=""><b class="">“</b></span></font><span style="font-size: 11px;" class="">;</span></font></div><div style="margin: 0px;" class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">    $password=</span></font><font face="Menlo" class=""><b class=""><font color="#afad24" class=""><span style="font-size: 11px;" class="">“einPasswort</span></font></b></font><font face="Menlo" class=""><font color="#afad24" class=""><span style="font-size: 11px;" class=""><b class="">“</b></span></font><span style="font-size: 11px;" class="">;</span></font></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; min-height: 13px;" class=""><br class=""></div><div style="font-family: Menlo; font-size: 11px; margin: 0px; min-height: 13px;" class=""><br class=""></div><div style="font-family: Menlo; font-size: 11px; margin: 0px;" class="">    $db = <span style="font-variant-ligatures: no-common-ligatures; color: #cbcbcb" class="">mysql_connect(</span>'localhost', $username, $password);</div><div style="font-family: Menlo; font-size: 11px; margin: 0px;" class="">    <span style="font-variant-ligatures: no-common-ligatures; color: #afad24" class=""><b class="">if</b></span> (!$db) {</div><div style="font-family: Menlo; font-size: 11px; margin: 0px;" class="">        <span style="font-variant-ligatures: no-common-ligatures; color: #cbcbcb" class="">die(</span>'Verbindung schlug fehl: ' . <span style="font-variant-ligatures: no-common-ligatures; color: #cbcbcb" class="">mysql_error(</span>));</div><div style="font-family: Menlo; font-size: 11px; margin: 0px;" class="">    }</div><div style="font-family: Menlo; font-size: 11px; margin: 0px;" class="">    $db_vz = <span style="font-variant-ligatures: no-common-ligatures; color: #cbcbcb" class="">mysql_select_db(</span>‚volkszaehler', $db);</div><div style="font-family: Menlo; font-size: 11px; margin: 0px;" class=""><br class=""></div><div style="font-family: Menlo; font-size: 11px; margin: 0px;" class=""><br class=""></div><div style="margin: 0px;" class=""><div style="font-size: 11px; font-family: Menlo; margin: 0px; color: rgb(83, 48, 225);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">    $channel_id_180=</span><span style="font-variant-ligatures: no-common-ligatures; color: #afad24" class=""><b class="">"5"</b></span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">; </span><b class="">/* (AK) DEBUG 1-0:1.8.0 Wirkarbeit Bezug (-) */</b></div><div style="font-size: 11px; font-family: Menlo; margin: 0px; color: rgb(175, 173, 36);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">    $str_sql_180 = </span><b class="">"SELECT value FROM data WHERE channel_id=$channel_id_180 AND timestamp BETWEEN $time_from AND $time_to LIMIT 0, 1"</b><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">;</span></div><div style="font-size: 11px; font-family: Menlo; margin: 0px;" class="">    $sql_res_180 = <span style="font-variant-ligatures: no-common-ligatures; color: #cbcbcb" class="">mysql_query(</span>$str_sql_180);</div><div style="font-size: 11px; font-family: Menlo; margin: 0px;" class="">    $row_180 = <span style="font-variant-ligatures: no-common-ligatures; color: #cbcbcb" class="">mysql_fetch_assoc(</span>$sql_res_180);</div><div style="font-size: 11px; font-family: Menlo; margin: 0px; color: rgb(175, 173, 36);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">    $str_sql_OBIS_180 = </span><b class="">"SELECT value FROM properties WHERE entity_id=$channel_id_180 AND pkey='title' LIMIT 0, 1"</b><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">;</span></div><div style="font-size: 11px; font-family: Menlo; margin: 0px;" class="">    $sql_res_OBIS_180 = <span style="font-variant-ligatures: no-common-ligatures; color: #cbcbcb" class="">mysql_query(</span>$str_sql_OBIS_180);</div><div style="font-size: 11px; font-family: Menlo; margin: 0px;" class="">    $row_OBIS_180 = <span style="font-variant-ligatures: no-common-ligatures; color: #cbcbcb" class="">mysql_fetch_assoc(</span>$sql_res_OBIS_180);</div><div style="font-size: 11px; font-family: Menlo; margin: 0px; color: rgb(83, 48, 225);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">    </span><b class="">//echo $str_sql_180 . "<br />"; /* (AK) DEBUG */</b></div><div class=""><b class=""><br class=""></b></div></div><div style="margin: 0px;" class=""><br class=""></div><div style="margin: 0px;" class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    <span style="font-variant-ligatures: no-common-ligatures; color: #afad24" class=""><b class="">if</b></span><span style="font-variant-ligatures: no-common-ligatures; color: #cbcbcb" class="">(isset(</span>$row_180[<span style="font-variant-ligatures: no-common-ligatures; color: #afad24" class=""><b class="">"value"</b></span>])){</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(175, 173, 36);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">       echo </span><b class="">"<b>"</b><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> . $row_OBIS_180[</span><b class="">"value"</b><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">] .</span><b class="">":</b> Zaehlerwert ("</b><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> . ($row_180[</span><b class="">"value"</b><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">]) . </span><b class="">" / Faktor 1000) = <b>"</b><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">. ($row_180[</span><b class="">"value"</b><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">]/1000) . </span><b class="">"  kWh</b> "</b><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">;</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    }</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    <span style="font-variant-ligatures: no-common-ligatures; color: #afad24" class=""><b class="">else</b></span> {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">       echo <span style="font-variant-ligatures: no-common-ligatures; color: #afad24" class=""><b class="">" ___ kWh "</b></span> .$row_OBIS_180[<span style="font-variant-ligatures: no-common-ligatures; color: #afad24" class=""><b class="">"value"</b></span>] . <span style="font-variant-ligatures: no-common-ligatures; color: #afad24" class=""><b class="">" <br />"</b></span>;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    }</div></div><div style="margin: 0px;" class=""><br class=""></div><div style="margin: 0px;" class=""><br class=""></div><div style="margin: 0px;" class="">Kannst da ja mal rein kucken…</div><div style="margin: 0px;" class=""><br class=""></div><div style="margin: 0px;" class="">Beste Grüße</div><div style="margin: 0px;" class="">Armin</div><div style="font-family: Menlo; font-size: 11px; margin: 0px;" class=""><br class=""></div></div></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Am 06.10.2015 um 19:11 schrieb Sascha Koszowyj <<a href="mailto:sascha.koszowyj@googlemail.com" class="">sascha.koszowyj@googlemail.com</a>>:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" class="">
  
  <div text="#000000" bgcolor="#FFFFFF" class="">
    <br class="">
    <blockquote cite="mid:5613FCD5.8060901@arcor.de" type="cite" class="">
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type" class="">
      Hi Zusammen,<br class="">
      <br class="">
      kann mir vielleicht jemand helfen?<br class="">
      <br class="">
      Liebe Grüße<br class="">
      Sascha<br class="">
      <br class="">
      <div class="moz-cite-prefix">Am 04.10.2015 um 08:55 schrieb Sascha
        Koszowyj:<br class="">
      </div>
      <blockquote cite="mid:5610CD47.3070507@googlemail.com" type="cite" class="">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type" class="">
        <br class="">
        <blockquote cite="mid:5610CAD7.10005@arcor.de" type="cite" class="">
          <meta content="text/html; charset=utf-8" http-equiv="Content-Type" class="">
          Hi Jan,<br class="">
          <br class="">
          <u class="">Zur Variante SQL:</u><br class="">
          ja, habe es auch schon ohne Port 80 Probiert.....<br class="">
          <br class="">
          Mein Test:<br class="">
              $link = mysql_connect('192.168.0.31', 'Sascha', 'xxxx');<br class="">
              if (!$link) {<br class="">
                  die('Verbindung schlug fehl: ' . mysql_error());<br class="">
              }<br class="">
              echo 'Erfolgreich verbunden';<br class="">
              mysql_close($link);<br class="">
          <br class="">
          Meldung: Verbindung schlug fehl: Lost connection to MySQL
          server at 'reading initial communication packet', system
          error: 111<br class="">
          <br class="">
          <u class="">Zur Variante middleware.php</u><br class="">
            <br class="">
          Ich finde kein Script, welches z.B. mit den aktuellen
          Zählerstand in eine var abspeichert... <br class="">
          Dort könnte ich mir dann die benötigten Informationen raus
          schneiden.<br class="">
          <br class="">
          Ich bekomme es nur hin, den kompletten Return Wert des Json in
          einen TEXT mit der ID "XYZ" zu schrieben, aber nicht in eine
          Variable...<br class="">
          <br class="">
          Im Java Teil :                        $('#Infofeld401').load(<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://192.168.0.31/middleware.php/data/eab32320-521a-11e5-a15f-fd9ac3270c21.json?from=now"></a><a class="moz-txt-link-rfc2396E" href="http://192.168.0.31/middleware.php/data/eab32320-521a-11e5-a15f-fd9ac3270c21.json?from=now">"http://192.168.0.31/middleware.php/data/eab32320-521a-11e5-a15f-fd9ac3270c21.json?from=now"</a>);




          <br class="">
          Im HTML Teil:                      <p
          id="Infofeld401">xxxx</p><br class="">
          <br class="">
          xxxx wird dann mit dem RETURN aus json überschieben....<br class="">
          <br class="">
          Aber ich möchte den Wert (notfalls auch den kompletten Json
          RETUN) in einer Variablen haben.... Nur mit welchen Befehl
          geht dass?<br class="">
          <br class="">
          Habe versucht:<br class="">
          var Zaehler1 = $GET(<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://192.168.0.31/middleware.php/data/eab32320-521a-11e5-a15f-fd9ac3270c21.json?from=now">"http://192.168.0.31/middleware.php/data/eab32320-521a-11e5-a15f-fd9ac3270c21.json?from=now"</a>);




          <br class="">
          <br class="">
          ... Leider ohne Erfolg...<br class="">
          <br class="">
          Hast Du eine Idee?<br class="">
          <br class="">
          LG<br class="">
          Sascha<br class="">
          <br class="">
          <br class="">
          <br class="">
          <div class="moz-cite-prefix">Am 03.10.2015 um 21:39 schrieb
            Jan Goe:<br class="">
          </div>
          <blockquote cite="mid:CAJ3J6LV=gjTKJGK8AMFBa07bL+d0y5iKzPr1Kts+-33VzshmGw@mail.gmail.com" type="cite" class="">
            <div dir="ltr" class="">und wäre gut wenn du den kompletten php
              script postest, sonst kann man dir so gut wie nicht helfen
              :-(
              <div class=""><br class="">
              </div>
              <div class="">gruß</div>
              <div class="">jan</div>
            </div>
            <div class="gmail_extra"><br class="">
              <div class="gmail_quote">Am 3. Oktober 2015 um 21:36
                schrieb Martin Heinze <span dir="ltr" class=""><<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:heinze.martin@gmail.com"></a><a class="moz-txt-link-abbreviated" href="mailto:heinze.martin@gmail.com">heinze.martin@gmail.com</a>></span>:<br class="">
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  <div dir="auto" class="">
                    <div class="">Ja genau ...</div>
                    <div class=""><br class="">
                    </div>
                    <div class="">Siehe Hinweis von Andreas - lass mal das ":80"
                      beim PHP-Aufruf weg - dann sollte es gehen.<br class="">
                      <div class=""><span style="background-color:rgba(255,255,255,0)" class=""><br class="">
                        </span></div>
                    </div>
                    <span class="">
                      <div class=""><br class="">
                        Am 03.10.2015 um 17:34 schrieb Sascha Koszowyj
                        <<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:sascha.koszowyj@googlemail.com">sascha.koszowyj@googlemail.com</a>>:<br class="">
                        <br class="">
                      </div>
                    </span>
                    <div class="">
                      <div class="h5">
                        <blockquote type="cite" class="">
                          <div class=""> Hallo Zusammen,<br class="">
                            <br class="">
                            ich möchte gerne auf meiner Hausinternen
                            WebSeite Werte aus dem Volkszähler anzeigen
                            lassen....<br class="">
                            <br class="">
                            Ich habe zwei Ansäte ausprobiert, bei beiden
                            komme ich nicht weiter, hat jemand eine
                            Idee?<br class="">
                            <br class="">
                            <b class="">1.) Abfrage per SQL</b><br class="">
                            <?php<br class="">
                            mysql_connect('<a moz-do-not-send="true" href="http://192.168.0.31/" target="_blank" class="">192.168.0.31:80</a>',
                            'Username', 'Passwort');<br class="">
                            <br class="">
                            Ich bekomme keine Verbindung zum Server,
                            warum nicht?<br class="">
                            <br class="">
                            <b class="">2.) Abfrage über "middleware.php" in Java</b><br class="">
                            <br class="">
                            $('#Infofeld401').load(<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://192.168.0.31/middleware.php/data/eab32320-521a-11e5-a15f-fd9ac3270c21.json?from=now"></a><a class="moz-txt-link-rfc2396E" href="http://192.168.0.31/middleware.php/data/eab32320-521a-11e5-a15f-fd9ac3270c21.json?from=now">"http://192.168.0.31/middleware.php/data/eab32320-521a-11e5-a15f-fd9ac3270c21.json?from=now"</a>); 




                            <br class="">
                            <br class="">
                            Hier komme ich zwar an den Wert und kann Ihn
                            in eine DEV ID schreiben.... Aber ich hätte
                            den Wert gerne in einer Variablen....<br class="">
                            $GET() geht nicht.... (Oder meine Syntax war
                            falsch....<br class="">
                            <br class="">
                            <br class="">
                            Wie habt Ihr dass ggf gelöst?<br class="">
                            <br class="">
                            Vg<br class="">
                            Sascha<br class="">
                          </div>
                        </blockquote>
                      </div>
                    </div>
                  </div>
                </blockquote>
              </div>
              <br class="">
            </div>
          </blockquote>
          <br class="">
        </blockquote>
        <br class="">
      </blockquote>
      <br class="">
    </blockquote>
    <br class="">
  </div>

</div></blockquote></div><br class=""></div></body></html>