<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Füge mal unter file get Content ein </div><div id="AppleMailSignature">Echo"$result";</div><div id="AppleMailSignature">Ein und schau was ausgegeben wird </div><div id="AppleMailSignature">Bzw ruf den Link mal mit einer richtigen uuid im Browser auf und teste die Ausgabe </div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">Mit freundlichen Grüßen</div><div id="AppleMailSignature">Jan <br><br>Von meinem iPhone gesendet</div><div><br>Am 17.10.2015 um 16:23 schrieb Ralf Wismann <<a href="mailto:ralf.wismann@gmx.de">ralf.wismann@gmx.de</a>>:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Sprechblasentext Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.E-MailFormatvorlage18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.E-MailFormatvorlage19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.SprechblasentextZchn
        {mso-style-name:"Sprechblasentext Zchn";
        mso-style-priority:99;
        mso-style-link:Sprechblasentext;
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@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]--><div class="WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hallo Jan,<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p><div id="AppleMailSignature"><p class="MsoNormal"><span style="color:#1F497D">></span>Wie schaut den der komplette php Skript aus ? <o:p></o:p></p></div><div id="AppleMailSignature"><p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Siehe anbei und das php:<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><?php<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">$temp1 = $_GET[temp1];<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">$temp2 = $_GET[temp2];<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"># 12c56460-6f6e-11e5-a954-efa410011295 Vorlauf<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"># 2405f8e0-6f6e-11e5-86c4-317c1c0df60c Rücklauf<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">send_to_vz("12c56460-6f6e-11e5-a954-efa410011295", $temp1);<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">send_to_vz("2405f8e0-6f6e-11e5-86c4-317c1c0df60c", $temp2);<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">function send_to_vz($uuid,$var)<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">{<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">$link = "<a href="http://192.168.7.6/var/www/volkszaehler.org/htdocs/middleware.php/data/$uuid.json?operation=add&value=$var">http://192.168.7.6/var/www/volkszaehler.org/htdocs/middleware.php/data/$uuid.json?operation=add&value=$var</a>";<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">$result = file_get_contents($link);<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">}<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">?><o:p></o:p></span></p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>Am 17.10.2015 um 16:12 schrieb Ralf Wismann <<a href="mailto:ralf.wismann@gmx.de">ralf.wismann@gmx.de</a>>:<o:p></o:p></p></div><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hallo Jan,</span><o:p></o:p></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">vielen Dank. Habe es jetzt doch per PHP versucht, da ich über die direkte Verbindung vom ESP8266 keine 2 Verbindungen aufgebaut bekomme bzw. 2 Werte gleichzeitig geschrieben bekomme.</span><o:p></o:p></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Leider hagt es noch und es wird nichts in die Datenbank geschrieben.</span><o:p></o:p></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Vermute das meine Links noch nicht sauber sind, aber sicher bin ich nicht und habe schon etliche Versuche durch. Wie sollte der Link aussehen? (die php-Datei (heizung.php) liegt im gleichen Ordner wie die middleware.php -> htdocs):</span><o:p></o:p></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">$link = "<a href="http://192.168.7.6/var/www/volkszaehler.org/htdocs/middleware.php/data/$uuid.json?operation=add&value=$var">http://192.168.7.6/var/www/volkszaehler.org/htdocs/middleware.php/data/$uuid.json?operation=add&value=$var</a>";</span><o:p></o:p></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">$link = "<a href="http://192.168.7.6/volkszaehler.org/htdocs/middleware.php/data/$uuid.json?operation=add&value=$var">http://192.168.7.6/volkszaehler.org/htdocs/middleware.php/data/$uuid.json?operation=add&value=$var</a>";</span><o:p></o:p></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">$link = "<a href="http://192.168.7.6/middleware.php/data/$uuid.json?operation=add&value=$var">http://192.168.7.6/middleware.php/data/$uuid.json?operation=add&value=$var</a>";</span><o:p></o:p></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Habt Ihr hier eine Idee?</span><o:p></o:p></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Danke und Grüße</span><o:p></o:p></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Ralf</span><o:p></o:p></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Von:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> volkszaehler-users [<a href="mailto:volkszaehler-users-bounces@demo.volkszaehler.org">mailto:volkszaehler-users-bounces@demo.volkszaehler.org</a>] <b>Im Auftrag von </b>Jan Goe<br><b>Gesendet:</b> Samstag, 10. Oktober 2015 20:37<br><b>An:</b> <a href="http://volkszaehler.org">volkszaehler.org</a> - users<br><b>Betreff:</b> Re: [vz-users] PHP Nachhilfe</span><o:p></o:p></p><p class="MsoNormal"> <o:p></o:p></p><div><div><div><div><div><p class="MsoNormal" style="margin-bottom:12.0pt">Hallo Ralf,<o:p></o:p></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">ich sende bei mir auch temperaturen über den ESP an ein php skript und dann zu vz und gleichzeitig zu shc <br><br><br><o:p></o:p></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">php skript:<br><?php<br>$temp1 = $_GET[temp1];<br>$temp2 = $_GET[temp2];<br><br># e067e9c0-35eb-11e5-86d4-8f6d44079040 zirkulation<br># d7629af0-35eb-11e5-a340-cf6ca39ee085 warmwasser<br><br>send_to_vz("e067e9c0-35eb-11e5-86d4-8f6d44079040", $temp1);<br>temp_to_shc($temp1,"031551595azz");<br>send_to_vz("d7629af0-35eb-11e5-a340-cf6ca39ee085", $temp2);<br>temp_to_shc($temp2,"031551595aww");<br><br>function send_to_vz($uuid,$var)<br>{<br>$link = "<a href="http://192.168.0.54/vz/htdocs/middleware.php/data/$uuid.json?operation=add&value=$var">http://192.168.0.54/vz/htdocs/middleware.php/data/$uuid.json?operation=add&value=$var</a>";<br>$result = file_get_contents($link);<br>}<br>function temp_to_shc($temp,$name)<br>{<br>echo "shc: $wire1 @ $temp";<br>$send = file_get_contents("<a href="http://192.168.0.54/shc/index.php?app=shc&a&ajax=pushsensorvalues&spid=3&sid=28-$name&type=1&v1=$temp">http://192.168.0.54/shc/index.php?app=shc&a&ajax=pushsensorvalues&spid=3&sid=28-$name&type=1&v1=$temp</a>");<br>echo"Status: $send";<br>}<br><br>?><br><br><br><o:p></o:p></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">bsp aufruf im esp über temp.php?temp1=25.0&temp2=25.0<o:p></o:p></p></div><div><p class="MsoNormal">gruß<o:p></o:p></p></div><div><p class="MsoNormal">jan<o:p></o:p></p></div><div><div><p class="MsoNormal"> <o:p></o:p></p></div></div></div><div><p class="MsoNormal"> <o:p></o:p></p><div><p class="MsoNormal">Am 10. Oktober 2015 um 20:08 schrieb Alexander Finkhäuser <<a href="mailto:alex@elaon.de" target="_blank">alex@elaon.de</a>>:<o:p></o:p></p><div><p class="MsoNormal">So kann man es z.b. auf einem Raspberry pi machen: da werden die Daten mit PHP ausgelesen und dann per PHP geschickt. Musst dir dann nur den teil an gucken wie man es schickt. Ist eigentlich nicht schwer.<br><br><a href="https://m.youtube.com/?gl=DE&hl=de#/watch?v=gVRCDQw7EFE" target="_blank">https://m.youtube.com/?gl=DE&hl=de#/watch?v=gVRCDQw7EFE</a><br><br>Dein script da holt die Daten von dem ESP ab in dem auf dem ein Webserver mit den Daten angeboten wird. Und genau er holt sich das bei dem ab und diese tpl Datei bietet das irgendwie an. Ich weiß nicht wie. <br><br><br>LG<br>Alex<o:p></o:p></p><div><div><p class="MsoNormal" style="margin-bottom:12.0pt"> <o:p></o:p></p><div><p class="MsoNormal">Am 10. Oktober 2015 19:49:30 MESZ, schrieb Ralf Wismann <<a href="mailto:ralf.wismann@gmx.de" target="_blank">ralf.wismann@gmx.de</a>>:<o:p></o:p></p><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hallo Zusammen,<o:p></o:p></p><p> <o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">ich würde gerne Temperaturwerte (DS18B20) die Wireless(ESP8266) geschickt werden in die Volkszähler-Datenbank aufnehmen.<o:p></o:p></p><p> <o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Leider gibt es nicht viele Beispiele um mich dort spezifisch einlesen zu können, darum die Frage an Euch. Ich kann/kenne praktisch kein PHP und würde mich über einen Verständnisabgleich sehr freuen.  Dies ist ein Code für einen DHT22 Sensor mit ESP8266 .<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Die PHP Datei ist im www Ordner des Volkszählers abzulegen. Wenn ich das richtig verstehe holt diese Datei sich aber Informationen und bekommt sie nicht über eine Connection vom ESP8266 gesendet. Ist das richtig verstanden? Könnt Ihr sagen, wie diese dht22.tpl zu verstehen ist?  <o:p></o:p></p><p> <o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Vielen Dank und Grüße<o:p></o:p></p><p> <o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Ralf<o:p></o:p></p><p> <o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><?php<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">    while(true) {<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">        $html = file_get_contents('<a href="http://1.2.3.4/dht22.tpl'" target="_blank">http://1.2.3.4/dht22.tpl'</a>);<o:p></o:p></p><p> <o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">        if(preg_match('/temperature reading is ([\d\.]+)\*C, humidity is ([\d\.]+) ./', $html, $match)) {<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">            vz_add('**UUID_TEMPERATUR**', $match[1]);<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">            vz_add('**UUID_FEUCHTE**', $match[2]);<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">        }<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">        echo '--'."\n";<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">        sleep(10);<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">    }<o:p></o:p></p><p> <o:p></o:p></p><p> <o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">function vz_add($id, $val) {<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">    $url='<a href="http://vzserver/middleware.php/data/'.$id.'.json?operation=add&value='.$val" target="_blank">http://vzserver/middleware.php/data/'.$id.'.json?operation=add&value='.$val</a>;<o:p></o:p></p><p> <o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">    var_dump($url);<o:p></o:p></p><p> <o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">    $cmd = 'wget -O - '.escapeshellarg($url).' > /dev/null 2>/dev/null &';<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">    exec($cmd);<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">}<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">?><o:p></o:p></p></div></div></div></div></div></div><p class="MsoNormal"> <o:p></o:p></p></div></div></blockquote><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><div><p class="MsoNormal"><read.lua><o:p></o:p></p></div></blockquote><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><div><p class="MsoNormal"><heizung.php><o:p></o:p></p></div></blockquote></div></div></blockquote><blockquote type="cite"><div><read.lua></div></blockquote><blockquote type="cite"><div><heizung.php></div></blockquote></body></html>