$lx=pow($lx,0.1264)*32-32+2;
if ($lx<0) {$lx=0;}
i2cdetect -y 1
lichti2c
echo '<div style="opacity:0.90;filter:alpha(opacity=90);left:-135px;top:0px;position:absolute;"><img src="'.picdesign("hgr/wetter.png").'" border="0"></div>';
<?php
/*
+---------------------------------------------------------------------+
| |
| SensorAndSwitch Warmwasser PSG-Script |
| |
+---------------------------------------------------------------------+
*/
include __DIR__."/../include/psg.php";
$gerarray=getGerInfo(substr(basename(__FILE__,".php"),3));
if ($gerarray["Counter"]>=4) {
$ver="V#V 1.00#";
$dummy=sleep(2);
$befehl='sudo cat /sys/bus/w1/devices/28-041661e0aeff/w1_slave | grep -E -o ".{0,0}t=.{0,5}" | cut -c 3-';
$url=$helperurlpi2."?befehl=".encodiere($befehl,33455);
$erg=web($url,$post);
$erg=($erg+2000)/100; #Korretur + 2 Grad
if ($erg=="") {
$echo=$ver."C##";
}
else {
$erg=explode(" ",$erg);
$temp4=$erg[0]/10;
$feucht4=$erg[1]/10;
$echo='';
$echo.='P#';
$echo.='<div style="font-size:16px;text-align:right;width:240px;position:absolute;top:-5px;">Luftfeuchte: '.str_replace(".",",",sprintf("%.1f",$feucht4)).' %%';
$echo.='<br />Temperatur: '.str_replace(".",",",sprintf("%.1f",$temp4)).'°C</div>';
$echo.='*HTML#';
$echo.='V#'.$temp4.'*temp4#';
$echo.=$ver;
}
}
else {
$echo=$ver."C##";
}
echo $echo;
exit;
?>
<?php
/*
+---------------------------------------------------------------------+
| |
| SensorAndSwitch Warmwasser PSG-Script |
| |
+---------------------------------------------------------------------+
*/
include __DIR__."/../include/psg.php";
$gerarray=getGerInfo(substr(basename(__FILE__,".php"),3));
if ($gerarray["Counter"]>=4) {
$ver="V#V 1.00#";
$dummy=sleep(2);
$befehl='sudo cat /sys/bus/w1/devices/28-041661e0aeff/w1_slave | grep -E -o ".{0,0}t=.{0,5}" | cut -c 3-';
$url=$helperurlpi2."?befehl=".encodiere($befehl,33455);
$erg=web($url,$post);
$erg=($erg+2000)/100; #Korretur + 2 Grad
if ($erg=="") {
$echo=$ver."C##";
}
else {
$erg=explode(" ",$erg);
$temp4=$erg[0]/10;
$feucht4=$erg[1]/10;
$zeitl=$gerarray["zeitl"];
$zeith=date("G")*1;
if ($zeith!=$zeitl) {
$tempz[$zeith]=array();
$zeitl=$zeith;
}
$temp=$temp4;
if ($zeitl>23) {$zeitl=0;}
if ($temp<$tempz[$zeith]["min"] or !isset($tempz[$zeith]["min"])) {
$tempz[$zeith]["min"]=$temp;
}
if ($temp>$tempz[$zeith]["max"] or !isset($tempz[$zeith]["max"])) {
$tempz[$zeith]["max"]=$temp;
}
$echo='';
$echo.='P#';
$echo.='<div style="font-size:16px;text-align:right;width:240px;position:absolute;top:-5px;">Luftfeuchte: '.str_replace(".",",",sprintf("%.1f",$feucht4)).' %%';
$echo.='<br />Temperatur: '.str_replace(".",",",sprintf("%.1f",$temp4)).'°C</div>';
$echo.='*HTML#';
$echo.='V#'.$temp4.'*temp4#';
$echo.='V#'.serialize($tempz).'*tempz#';
$echo.='V#'.$zeith.'*zeith#';
$echo.='V#'.$zeitl.'*zeitl#';
$echo.=$ver;
}
}
else {
$echo=$ver."C##";
}
echo $echo;
exit;
?>
<?php
/*
╔═══╗ ╔═══╗ ╔═══╗ ┌───────────────────────────────────────────────────┐
║ ║ ║ ║ │ SensorAndSwitch (C)2014-16 Bluedragon │
╚═══╗ ╠═══╣ ╚═══╗ ├──────────────────┬────────────────────────────────┤
║ ║ ║ ║ │ SAS-PsG (Info) │ psginfoWasserTemp.php │
╚═══╝ ╝ ╚ ╚═══╝ ├──────────────────┴────────────────────────────────┤
┌─────────────────┤ Infografik Temp │
│ Info: ╘═══════════════════════════════════════════════════╡
├─────────────────────────────────────────────────────────────────────┤
│ Infoslot │
╘═════════════════════════════════════════════════════════════════════╛
*/
include_once __DIR__."/../include/psg.php";
$ver="V#V 6.00#";
$name="TempDS18B20_s1";
$gerarray=getGerInfo($name);
$tempz=unserialize($gerarray["tempz"]);
$info ="";
# 10°C-Linien
for ($g=0;$g<=10;$g++) {
$l=$g*10+1;
$info.='<div id="tab" style="position:absolute;border:1px;top:'.$l.'px;background-color:rgb(80,80,80);border-style:solid;border-color:black;left:30px;width:485px;height:1px"></div>';
$info.='<div id="tab" style="position:absolute;border:1px;top:'.($l-4).'px;left:0px;font-size:10px;width:30px;text-align:right">'.(100-$g*10).'°C</div>';
}
# 5°C-Linien
for ($g=0;$g<=9;$g++) {
$l=$g*10+6;
$info.='<div id="tab" style="position:absolute;border:1px;top:'.$l.'px;background-color:rgb(60,60,60);border-style:solid;border-color:black;left:30px;width:485px;height:1px"></div>';
}
# Markierung akt. Stunde
for ($z=0;$z<=23;$z++) {
$h=113;
$t=1;
$p=$z*20+5+30;
if ($z==$gerarray["zeith"]) {
$info.='<div id="tab" style="position:absolute;border:1px;top:'.$t.'px;left:'.($p-2).'px;background-color:rgb(80,80,80);border-style:solid;border-color:rgb(80,80,80);font-size:8px;width:19px;height:'.$h.'px"></div>';
}
}
# Tempsäulen
for ($z=0;$z<=23;$z++) {
$h=$tempz[$z]["max"]-$tempz[$z]["min"];
$h0=$tempz[$z]["max"];
$t=100+1-$tempz[$z]["max"];
$t0=$t;
$p=$z*20+5+30;
$f=120;if ($z<=$gerarray["zeith"]) {$f=200;}
$f0=100;if ($z<=$gerarray["zeith"]) {$f0=140;}
if ($h0<0) {$t=50+7; $h0=$h0*-1; $t0=50+7;}
if (isset($tempz[$z]["max"])) {
if ($tempz[$z]["max"]>=80) {
$info.='<div id="tab" style="position:absolute;border:1px;top:'.$t.'px;left:'.$p.'px;background-color:rgb('.$f0.',0,0);border-style:solid;border-color:rgb('.$f0.',0,0);font-size:8px;width:15px;height:'.$h0.'px"></div>';
}
else {
if (isset($tempz[$z]["max"])) {
if ($tempz[$z]["max"]>=70) {
$info.='<div id="tab" style="position:absolute;border:1px;top:'.$t.'px;left:'.$p.'px;background-color:rgb('.($f0/1).','.($f0/2).',0);border-style:solid;border-color:rgb('.($f0/1).','.($f0/2).',0);font-size:8px;width:15px;height:'.$h0.'px"></div>';
}
else {
if ($tempz[$z]["max"]>=60) {
$info.='<div id="tab" style="position:absolute;border:1px;top:'.$t.'px;left:'.$p.'px;background-color:rgb('.($f0/1).','.($f0/1).',0);border-style:solid;border-color:rgb('.($f0/1).','.($f0/1).',0);font-size:8px;width:15px;height:'.$h0.'px"></div>';
}
else {
if ($tempz[$z]["max"]>=50) {
$info.='<div id="tab" style="position:absolute;border:1px;top:'.$t.'px;left:'.$p.'px;background-color:rgb(0,'.$f0.',0);border-style:solid;border-color:rgb(0,'.$f0.',0);font-size:8px;width:15px;height:'.$h0.'px"></div>';
}
else {
if ($tempz[$z]["max"]>=40) {
$info.='<div id="tab" style="position:absolute;border:1px;top:'.$t.'px;left:'.$p.'px;background-color:rgb(0,'.($f0/1).','.($f0/2).');border-style:solid;border-color:rgb(0,'.($f0/1).','.($f0/2).');font-size:8px;width:15px;height:'.$h0.'px"></div>';
}
else {
if ($tempz[$z]["max"]>=30) {
$info.='<div id="tab" style="position:absolute;border:1px;top:'.$t.'px;left:'.$p.'px;background-color:rgb(0,'.($f0/1).','.($f0/1).');border-style:solid;border-color:rgb(0,'.($f0/1).','.($f0/1).');font-size:8px;width:15px;height:'.$h0.'px"></div>';
}
else {
if ($tempz[$z]["max"]>=20) {
$info.='<div id="tab" style="position:absolute;border:1px;top:'.$t.'px;left:'.$p.'px;background-color:rgb(0,'.($f0/2).','.($f0/1).');border-style:solid;border-color:rgb(0,'.($f0/2).','.($f0/1).');font-size:8px;width:15px;height:'.$h0.'px"></div>';
}
else {
$info.='<div id="tab" style="position:absolute;border:1px;top:'.$t.'px;left:'.$p.'px;background-color:rgb(0,0,'.($f0/1).');border-style:solid;border-color:rgb(0,0,'.($f0/1).');font-size:8px;width:15px;height:'.$h0.'px"></div>';
}
}
}
}
}
}
}
}
}
}
# Rest
for ($z=0;$z<=23;$z++) {
if ($z<=$gerarray["zeith"]) {
if ($tempz[$z]["min"]<$tempz[24]["min"] or !isset($tempz[24]["min"])) {
if (isset($tempz[$z]["min"])) {
$tempz[24]["min"]=$tempz[$z]["min"];
$tempz[24]["minh"]=$z;
}
}
if ($tempz[$z]["max"]>$tempz[24]["max"] or !isset($tempz[24]["max"])) {
if (isset($tempz[$z]["max"])) {
$tempz[24]["max"]=$tempz[$z]["max"];
$tempz[24]["maxh"]=$z;
}
}
}
$h=$tempz[$z]["max"]-$tempz[$z]["min"];
$h0=$tempz[$z]["max"];
$t=100+1-$tempz[$z]["max"];
$t0=$t;
$p=$z*20+5+30;
$f=120;if ($z<=$gerarray["zeith"]) {$f=200;}
$f0=100;if ($z<=$gerarray["zeith"]) {$f0=140;}
if ($h0<0) {$t=50+7; $h0=$h0*-1; $t0=$tempz[$z]["max"]*-1+50+7;}
# Zeitskala
$info.='<div id="tab" style="position:absolute;border:1px;top:'.(103).'px;left:'.$p.'px;font-size:7px;width:15px;text-align:center">'.$z.'h</div>';
# Werte
if (isset($tempz[$z]["max"])) {
$info.='<div id="tab" style="position:absolute;border:1px;top:'.$t0.'px;left:'.$p.'px;background-color:rgb(0,'.$f.','.$f.');border-style:solid;border-color:rgb(0,'.$f.','.$f.');font-size:8px;width:15px;height:'.$h.'px"></div>';
if ($tempz[$z]["max"]>80) {
$info.='<div id="tab" style="position:absolute;border:1px;top:'.(83).'px;left:'.$p.'px;width:15px;text-align:center;font-size:8px;text-shadow:0px 0px 1px black,0px 0px 1px black,0px 0px 1px black;">'.number_format(sprintf('%.1f',$tempz[$z]["max"]),1,",",".").'</div>';
$info.='<div id="tab" style="position:absolute;border:1px;top:'.(92).'px;left:'.$p.'px;width:15px;text-align:center;font-size:8px;text-shadow:0px 0px 1px black,0px 0px 1px black,0px 0px 1px black;">'.number_format(sprintf('%.1f',$tempz[$z]["min"]),1,",",".").'</div>';
}
else {
$info.='<div id="tab" style="position:absolute;border:1px;top:'.(3).'px;left:'.$p.'px;width:15px;text-align:center;font-size:8px;text-shadow:0px 0px 1px black,0px 0px 1px black,0px 0px 1px black;">'.number_format(sprintf('%.1f',$tempz[$z]["max"]),1,",",".").'</div>';
$info.='<div id="tab" style="position:absolute;border:1px;top:'.(12).'px;left:'.$p.'px;width:15px;text-align:center;font-size:8px;text-shadow:0px 0px 1px black,0px 0px 1px black,0px 0px 1px black;">'.number_format(sprintf('%.1f',$tempz[$z]["min"]),1,",",".").'</div>';
}
}
}
$zh=$gerarray["zeith"];
$zvh=$zh-1;
if ($zvh<0) {$zvh=23;}
$pfeil="⇒";
$w=($tempz[$zh]["max"]+$tempz[$zh]["min"])/2;
$wv=($tempz[$zvh]["max"]+$tempz[$zvh]["min"])/2;
if ($wv>$w) {$pfeil='⇓';}
if ($wv<$w) {$pfeil='⇑';}
$info.='<div id="text" style="position:absolute;border:1px;top:0px;left:520px;text-align:left;width:90px;font-size:30px;">'.$pfeil.'</div>';
$info.='<div id="text" style="position:absolute;border:1px;top:0px;left:520px;text-align:right;width:90px;font-size:12px;">Wasser-<br />Temp.</div>';
$info.='<div id="text" style="position:absolute;border:1px;top:35px;left:520px;text-align:right;width:90px;font-size:20px;">'.number_format(sprintf('%.1f',$tempz[24]["max"]),1,",",".").'°C</div>';
$info.='<div id="text" style="position:absolute;border:1px;top:55px;left:520px;text-align:right;width:90px;font-size:12px;">('.$tempz[24]["maxh"].'h) max.</div>';
$info.='<div id="text" style="position:absolute;border:1px;top:70px;left:520px;text-align:right;width:90px;font-size:20px;">'.number_format(sprintf('%.1f',$tempz[24]["min"]),1,",",".").'°C</div>';
$info.='<div id="text" style="position:absolute;border:1px;top:90px;left:520px;text-align:right;width:90px;font-size:12px;">('.$tempz[24]["minh"].'h) min.</div>';
echo 'IB#<div style="position:absolute;left:85px;top:0px;">'.$info.'</div>#'.$ver;
?>
<?php
/*
+---------------------------------------------------------------------+
| |
| SensorAndSwitch Warmwasser PSG-Script |
| |
+---------------------------------------------------------------------+
*/
include __DIR__."/../include/psg.php";
$gerarray=getGerInfo(substr(basename(__FILE__,".php"),3));
if ($gerarray["Counter"]>=4) {
$ver="V#V 1.00#";
$dummy=sleep(2);
$befehl='sudo cat /sys/bus/w1/devices/28-041661e0aeff/w1_slave | grep -E -o ".{0,0}t=.{0,5}" | cut -c 3-';
$url=$helperurlpi2."?befehl=".encodiere($befehl,33455);
$erg=web($url,$post);
$erg=($erg+2000)/100; #Korretur + 2 Grad
if ($erg=="") {
$echo=$ver."C##";
}
else {
$erg=explode(" ",$erg);
$temp4=$erg[0]/10;
$feucht4=$erg[1]/10;
$tempz=unserialize($gerarray["tempz"]);
$zeitl=$gerarray["zeitl"];
$zeith=date("G")*1;
if ($zeith!=$zeitl) {
$tempz[$zeith]=array();
$zeitl=$zeith;
}
$temp=$temp4;
if ($zeitl>23) {$zeitl=0;}
if ($temp<$tempz[$zeith]["min"] or !isset($tempz[$zeith]["min"])) {
$tempz[$zeith]["min"]=$temp;
}
if ($temp>$tempz[$zeith]["max"] or !isset($tempz[$zeith]["max"])) {
$tempz[$zeith]["max"]=$temp;
}
$echo='';
$echo.='P#';
$echo.='<div style="font-size:16px;text-align:right;width:240px;position:absolute;top:-5px;">Luftfeuchte: '.str_replace(".",",",sprintf("%.1f",$feucht4)).' %%';
$echo.='<br />Temperatur: '.str_replace(".",",",sprintf("%.1f",$temp4)).'°C</div>';
$echo.='*HTML#';
$echo.='V#'.$temp4.'*temp4#';
$echo.='V#'.serialize($tempz).'*tempz#';
$echo.='V#'.$zeith.'*zeith#';
$echo.='V#'.$zeitl.'*zeitl#';
$echo.=$ver;
}
}
else {
$echo=$ver."C##";
}
echo $echo;
exit;
?>