new arrangement of the PHP-graphics, FHT-Pulldown will now called by "adjust", FHT-PHP-Graphics now with Temperature/desired-temp and actuator

git-svn-id: https://svn.fhem.de/fhem/trunk@33 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinhaas
2007-03-22 08:47:09 +00:00
parent daefa2082b
commit 0474479648
9 changed files with 160 additions and 104 deletions

View File

@@ -110,3 +110,4 @@ Changelog
-- Feature: WS300 is now supported -- Feature: WS300 is now supported
-- Internal: Adjusted to the new internal structure of FHEM. YOU MUST HAVE FHEM >=4.0 -- Internal: Adjusted to the new internal structure of FHEM. YOU MUST HAVE FHEM >=4.0
-- Internal: random-device for one-time at-order (define <randdev> at set ...) -- Internal: random-device for one-time at-order (define <randdev> at set ...)
-- Feature: new arrangement of the graphics, FHT-Pulldown will now called by "adjust", FHT-PHP-Graphics now with Temperature/desired-temp and actuator

View File

@@ -4,3 +4,9 @@
- Martin 2007-03-19 - Martin 2007-03-19
- Feature: WS300 ist now supported - Feature: WS300 ist now supported
- Adjusted to new structure of FHEM (IT NEEDS now FHZ1000/FHEM >= v3.4!) - Adjusted to new structure of FHEM (IT NEEDS now FHZ1000/FHEM >= v3.4!)
- Martin 2007-03-22
- New arrangement of the graphics.
- Better support for WS300
- FHT-Pulldown will now be called by the button "adjust"
- FHT-PHP-Grafics now with temperature, desired-temp and actuator

View File

@@ -1,16 +1,16 @@
<?php <?php
################################################################################## ##################################################################################
#### pgm3 -- a PHP-webfrontend for fhem.pl #### pgm3 -- a PHP-webfrontend for fhz1000.pl
###### required settings ###### required settings
$fhz1000="localhost"; #only php5 ! On which machine is fhz1000 runnning?? $fhz1000="fhz"; #only php5 ! On which machine is fhz1000 runnning??
# if it is not localhost then the fhz1000.cfg must # if it is not localhost then the fhz1000.cfg must
# run global: "port <nr> global" # run global: "port <nr> global"
$fhz1000port="7072"; # port of fhz1000.pl $fhz1000port="7072"; # port of fhz1000.pl
$logpath="/var/tmp"; # where are your logs? $logpath="/var/tmp"; # where are your logs?
$fhz1000_pl="/home/FHEM/fhem/fhem.pl"; #only required if you are using PHP4 $fhz1000_pl="/home/FHZ/fhz1000/fhz1000.pl"; #only required if you are using PHP4
################################################################################## ##################################################################################
###### nice to have ###### nice to have
@@ -67,11 +67,17 @@
############################################################################################## ##############################################################################################
## FHT-Devices ## FHT-Devices
$imgmaxxfht=450; #Size of the pictures Default: 450 for faster systems else 380 $imgmaxxfht=685; #Size of the pictures Default: 685
$imgmaxyfht=52; $imgmaxyfht=52;
$show_desiredtemp=1; # show the desired_temp as a graphic (0/1) $show_desiredtemp=1; # show the desired_temp as a graphic (0/1)
$desR='255'; $desG='255'; $desB='255'; # Color of desired-temp-line Red/Green/Blue (Default: 255/255/255)
$show_actuator=1; # show the actuator-value as a graphic (0/1)
$actR='255'; $actG='247'; $actB='200'; # Color of Actuator-line Red/Green/Blue (Default: 255/247/200)
$FHTyrange='15:31'; # Temperature in gnuplot. Default 15 to 31 (Celsius) $FHTyrange='15:31'; # Temperature in gnuplot. Default 15 to 31 (Celsius)
$FHTy2range='0:70'; # Actuator in gnuplot. Default 0 to 70 (Percent) $FHTy2range='0:70'; # Actuator in gnuplot. Default 0 to 70 (Percent)
$maxcount='460'; # Maximum count of pixel (from right to left) (Default:460)
$XcorrectDate=325; # Text of e.g. Date from the right side (Default:325)
$XcorrectMainText=35; # Text of main text from the right side (Default: 35)
$logrotateFHTlines=4300; # automatic Logrotate; $logrotate must be 'yes'. $logrotateFHTlines=4300; # automatic Logrotate; $logrotate must be 'yes'.
# Default:4300 # Default:4300
# read docs/logrotate if you want adjust it manually! # read docs/logrotate if you want adjust it manually!
@@ -83,8 +89,10 @@
############################################################################################## ##############################################################################################
## HMS-Devices ## HMS-Devices
$imgmaxxhms=620; #Size of the pictures. Default: 620 for faster systems else 380 $imgmaxxhms=685; #Size of the pictures. Default: 685
$imgmaxyhms=52; $imgmaxyhms=52;
$maxcountHMS='525'; # Maximum count of pixel (from right to left) (Default:525)
$XcorrectMainTextHMS=25; # Text of main text from the right side (Default:)
$logrotateHMSlines=1200; # automatic Logrotate; $logrotate must be 'yes'. $logrotateHMSlines=1200; # automatic Logrotate; $logrotate must be 'yes'.
# Default:1200 # Default:1200
# read docs/logrotate if you want adjust it manually! # read docs/logrotate if you want adjust it manually!
@@ -94,13 +102,15 @@
############################################################################################## ##############################################################################################
## KS300-Device ## KS300-Device
$imgmaxxks=620; #Size of the pictures Default: 620 for faster systems else 380 $imgmaxxks=685; #Size of the pictures Default: 685
$imgmaxyks=52; $imgmaxyks=52;
$showbft=1; # Display values additionaly in Beafort. Values: 0 /1 Default:1 $showbft=1; # Display values additionaly in Beafort. Values: 0 /1 Default:1
$maxcountKS='525'; # Maximum count of pixel (from right to left) (Default:525)
$XcorrectMainTextKS=35; # Text of main text from the right side (Default: 35)
$logrotateKS300lines=2000; # automatic Logrotate; $logrotate must be 'yes'. $logrotateKS300lines=2000; # automatic Logrotate; $logrotate must be 'yes'.
# Default:1900 # Default:2000
# read docs/logrotate if you want adjust it manually # read docs/logrotate if you want adjust it manually
# otherwise the system will slow down # otherwise the system will slow down
# pgm3 (user www-data) needs the rights to write the logs # pgm3 (user www-data) needs the rights to write the logs

View File

@@ -35,6 +35,8 @@ setlocale (LC_ALL, 'de_DE.utf8');
$yellow= ImageColorAllocate($im, 255, 255, 0); $yellow= ImageColorAllocate($im, 255, 255, 0);
$lightyellow= ImageColorAllocate($im, 255, 247,222 ); $lightyellow= ImageColorAllocate($im, 255, 247,222 );
$orange= ImageColorAllocate($im, 255, 230, 25); $orange= ImageColorAllocate($im, 255, 230, 25);
$actuatorcolor = ImageColorAllocate($im, $actR, $actG, $actB);
$desiredcolor = ImageColorAllocate($im, $desR, $desG, $desB);
ImageFill($im, 0, 0, $bg2p); ImageFill($im, 0, 0, $bg2p);
@@ -47,6 +49,7 @@ setlocale (LC_ALL, 'de_DE.utf8');
$actuator_date="unknown"; $actuator_date="unknown";
$counter=count($array); $counter=count($array);
$arraydesired=array(); $arraydesired=array();
$arrayactuator=array();
#echo $counter; exit; #echo $counter; exit;
@@ -69,12 +72,14 @@ setlocale (LC_ALL, 'de_DE.utf8');
$oldhour=$array[$x][12]; $oldhour=$array[$x][12];
array_push( $_SESSION["arraydata"],array($date,$type,$temp)); array_push( $_SESSION["arraydata"],array($date,$type,$temp));
array_push( $arraydesired,$desired_temp); array_push( $arraydesired,$desired_temp);
array_push( $arrayactuator,$actuator);
} }
} }
$resultreverse = array_reverse($_SESSION["arraydata"]); $resultreverse = array_reverse($_SESSION["arraydata"]);
$reversedesired = array_reverse($arraydesired); $reversedesired = array_reverse($arraydesired);
$reverseactuator = array_reverse($arrayactuator);
$xold=$imgmaxxfht; $xold=$imgmaxxfht;
if ( $imgmaxxfht > count ($resultreverse) ) if ( $imgmaxxfht > count ($resultreverse) )
@@ -95,68 +100,75 @@ setlocale (LC_ALL, 'de_DE.utf8');
$tempdiff=$maxtemp-$mintemp; $tempdiff=$maxtemp-$mintemp;
if ($tempdiff==0) $tempdiff=1; if ($tempdiff==0) $tempdiff=1;
$fac=$imgmaxyfht/$tempdiff; $fac=$imgmaxyfht/$tempdiff;
$fac2=$imgmaxyfht/100;
$yold=round($imgmaxyfht-(($resultreverse[0][1]-$mintemp)*$fac)); $yold=round($imgmaxyfht-(($resultreverse[0][1]-$mintemp)*$fac));
################### ###################
for ($x = 0; $x < $_SESSION["maxdata"]; $x++) if ($maxcount > $_SESSION["maxdata"]) {$counter=$_SESSION["maxdata"];} else {$counter=$maxcount;};
for ($x = 0; $x < $counter; $x++)
{ {
$parts = explode("_", $resultreverse[$x][0]); $parts = explode("_", $resultreverse[$x][0]);
if ( ($parts[0] != $olddate) ) if ( ($parts[0] != $olddate) )
{ {
$olddate=$parts[0]; $olddate=$parts[0];
#ImageLine($im, $imgmaxxfht-$x, 0,$imgmaxxfht-$x , $imgmaxyfht, $bg1p);
ImageLine($im, $imgmaxxfht-$x, 0,$imgmaxxfht-$x , $imgmaxyfht, $bg1p); ImageLine($im, $imgmaxxfht-$x, 0,$imgmaxxfht-$x , $imgmaxyfht, $bg1p);
}; };
$y = round($imgmaxyfht-(($resultreverse[$x][2]-$mintemp)*$fac)); $y = round($imgmaxyfht-(($resultreverse[$x][2]-$mintemp)*$fac));
$y2 = round($imgmaxyfht-(($reversedesired[$x]-$mintemp)*$fac)); $y2 = round($imgmaxyfht-(($reversedesired[$x]-$mintemp)*$fac));
#ImageLine($im, $imgmaxxfht-$x, $y2, $xold, $yold2, $bg1p); $y3 = round($imgmaxyfht-(($reverseactuator[$x])*$fac2));
if ($show_desiredtemp == 1) ImageLine($im, $imgmaxxfht-$x+1, $y2, $xold, $yold2, $lightyellow); if ($show_actuator== 1) ImageLine($im, $imgmaxxfht-$x+1, $y3, $xold, $yold3, $actuatorcolor);
if ($show_desiredtemp == 1) ImageLine($im, $imgmaxxfht-$x+1, $y2, $xold, $yold2, $desiredcolor);
ImageLine($im, $imgmaxxfht-$x, $y, $xold, $yold, $red); ImageLine($im, $imgmaxxfht-$x, $y, $xold, $yold, $red);
$xold=$imgmaxxfht-$x; $xold=$imgmaxxfht-$x;
$yold=$y; $yold=$y;
$yold2=$y2; $yold2=$y2;
$yold3=$y3;
}; };
#print_r($resultreverse); #print_r($resultreverse);
#print_r($reversedesired); #print_r($reversedesired);
#exit; #exit;
ImageLine($im, $imgmaxxfht-$x, 0,$imgmaxxfht-$x , $imgmaxyfht, $yellow); ImageLine($im, $imgmaxxfht-$x, 0,$imgmaxxfht-$x , $imgmaxyfht, $yellow);
ImageLine($im, $imgmaxxfht-$maxcount, 0,$imgmaxxfht-$maxcount , $imgmaxyfht, $white);
###ttf ###ttf
# $text2=$resultreverse[0][0];
$text="Temperature"; $text="Temperature";
$fontsize=7; $fontsize=7;
$txtcolor=$bg3p; $txtcolor=$bg3p;
ImageTTFText ($im, $fontsize, 0, 5, 12, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, 3, 10, $txtcolor, $fontttf, $text);
$text=$resultreverse[0][2]." &#176;C"; $text=$resultreverse[0][2]." &#176;C";
ImageTTFText ($im, 9, 0, 90, 35, $txtcolor, $fontttfb, $text); ImageTTFText ($im, 9, 0, 90-$XcorrectMainText, 37, $txtcolor, $fontttfb, $text);
$text= $drawfht; $text= $drawfht;
ImageTTFText ($im, 8, 0, 90, 18, $txtcolor, $fontttfb, $text); ImageTTFText ($im, 8, 0, 90-$XcorrectMainText, 22, $txtcolor, $fontttfb, $text);
$txtcolor=$bg3p; $txtcolor=$bg3p;
$fontsize=7; $fontsize=7;
$text="min= $mintemp max= $maxtemp"; $text="min= $mintemp max= $maxtemp";
ImageTTFText ($im, $fontsize, 0, 67, 47, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, 67-$XcorrectMainText, 49, $txtcolor, $fontttf, $text);
$text=$txtroom.$room; $text=$txtroom.$room;
ImageTTFText ($im, $fontsize, 0, 5, $imgmaxyfht-7, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, 3, 49, $txtcolor, $fontttf, $text);
$text="desired-temp: $desired_temp"; $text="desired-temp: $desired_temp";
ImageTTFText ($im, $fontsize, 0, $imgmaxxfht-230, 23, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, $imgmaxxfht-230-$XcorrectDate, 23, $txtcolor, $fontttf, $text);
$text=$desired_date; #$text=$desired_date;
ImageTTFText ($im, $fontsize, 0, $imgmaxxfht-127, 23, $txtcolor, $fontttf, $text); #ImageTTFText ($im, $fontsize, 0, $imgmaxxfht-127-$XcorrectDate, 23, $txtcolor, $fontttf, $text);
$text="Actuator [%]: $actuator"; $text="Actuator [%]: $actuator";
ImageTTFText ($im, $fontsize, 0, $imgmaxxfht-230, 33, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, $imgmaxxfht-230-$XcorrectDate, 33, $txtcolor, $fontttf, $text);
$text=$actuator_date; #$text=$actuator_date;
ImageTTFText ($im, $fontsize, 0, $imgmaxxfht-127, 33, $txtcolor, $fontttf, $text); #ImageTTFText ($im, $fontsize, 0, $imgmaxxfht-127-$XcorrectDate, 33, $txtcolor, $fontttf, $text);
$text=$resultreverse[0][0]; $text=$resultreverse[0][0];
ImageTTFText ($im, $fontsize, 0, $imgmaxxfht-127, 13, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, $imgmaxxfht-127, 13, $txtcolor, $fontttf, $text);
#ImageTTFText ($im, $fontsize, 0, $imgmaxxfht-127-$XcorrectDate, 13, $txtcolor, $fontttf, $text);
header("Content-type: image/png"); header("Content-type: image/png");
imagePng($im); imagePng($im);

View File

@@ -12,7 +12,7 @@
echo " echo "
<tr> <tr>
<td colspan=3 align=right $bg2><font $fontcolor3>FHT: </font></td><td align=left $bg2><font $fontcolor3> <td colspan=2 align=right $bg2><font $fontcolor3>FHT: </font></td><td align=left $bg2><font $fontcolor3>
<form action=$forwardurl method='POST'>"; <form action=$forwardurl method='POST'>";
#<input type=hidden name=showfht value=$showfht> #<input type=hidden name=showfht value=$showfht>
#<input type=hidden name=showhms value=$showhms> #<input type=hidden name=showhms value=$showhms>
@@ -86,7 +86,7 @@
echo "<option>$m.0</option>"; echo "<option>$m.0</option>";
echo "<option>$m.5</option>"; echo "<option>$m.5</option>";
} }
if (isset($valuetime)) echo"<option selected>$valuetime</option>";
echo"</select>"; echo"</select>";
#$order="$atorder $attime set $fhtdev $orderpulldown $valuetime"; #$order="$atorder $attime set $fhtdev $orderpulldown $valuetime";

View File

@@ -10,7 +10,7 @@
echo " echo "
<tr> <tr>
<td colspan=3 align=right $bg2><font $fontcolor3>FS20: </font></td><td align=left $bg2><font $fontcolor3> <td colspan=2 align=right $bg2><font $fontcolor3>FS20: </font></td><td align=left $bg2><font $fontcolor3>
<form action=$forwardurl method='POST'> <form action=$forwardurl method='POST'>
<input type=hidden name=showfht value=$showfht> <input type=hidden name=showfht value=$showfht>
<input type=hidden name=showhms value=$showhms> <input type=hidden name=showhms value=$showhms>

View File

@@ -47,6 +47,7 @@ $supported_HMS= array('HMS100T','HMS100TF','HMS100WD','HMS100MG','HMS100TFK','HM
$mintemp=100; $mintemp=100;
$maxtemp=-100; $maxtemp=-100;
$counter=count($array); $counter=count($array);
#if ($maxcountHMS < $counter) {$counter=$maxcountHMS;};
#Logrotate #Logrotate
if ((($logrotateHMSlines+100) < $counter) and ($logrotate == 'yes')) LogRotate($array,$file,$logrotateHMSlines); if ((($logrotateHMSlines+100) < $counter) and ($logrotate == 'yes')) LogRotate($array,$file,$logrotateHMSlines);
@@ -94,7 +95,8 @@ if ( $type == "HMS100T" or $type == "HMS100TF" ) ## hms100t-Device.
################### ###################
for ($x = 0; $x <= $_SESSION["maxdata"]; $x++) if ($maxcountHMS < $_SESSION["maxdata"]) {$anzlines=$maxcountHMS;} else {$anzlines= $_SESSION["maxdata"];}
for ($x = 0; $x < $anzlines; $x++)
{ {
$parts = explode("_", $resultreverse[$x][0]); $parts = explode("_", $resultreverse[$x][0]);
@@ -109,6 +111,7 @@ if ( $type == "HMS100T" or $type == "HMS100TF" ) ## hms100t-Device.
$yold=$y; $yold=$y;
}; };
ImageLine($im, $imgmaxxhms-$x, 0,$imgmaxxhms-$x , $imgmaxyhms, $yellow); ImageLine($im, $imgmaxxhms-$x, 0,$imgmaxxhms-$x , $imgmaxyhms, $yellow);
ImageLine($im, $imgmaxxhms-$maxcountHMS, 0,$imgmaxxhms-$maxcountHMS , $imgmaxyhms, $white);
$tempTEMP=$temp; $tempTEMP=$temp;
}; #HMS100T }; #HMS100T
@@ -121,7 +124,8 @@ if ( $type == "HMS100TF") ## hms100tf-Device.
$min=100; $min=100;
$max=-100; $max=-100;
for ($x = 0; $x <= $_SESSION["maxdata"]; $x++) if ($maxcountHMS < $_SESSION["maxdata"]) {$anzlines=$maxcountHMS;} else {$anzlines= $_SESSION["maxdata"];}
for ($x = 0; $x < $anzlines; $x++)
{ {
$temp=$resultreverse[$x][2]; $temp=$resultreverse[$x][2];
if ( $temp > $max ) $max=$temp; if ( $temp > $max ) $max=$temp;
@@ -135,7 +139,9 @@ if ( $type == "HMS100TF") ## hms100tf-Device.
$xold=$imgmaxxhms; $xold=$imgmaxxhms;
$yold=round($imgmaxyhms-(($resultreverse[0][2]-$min)*$fac)); $yold=round($imgmaxyhms-(($resultreverse[0][2]-$min)*$fac));
for ($x = 0; $x < count($resultreverse); $x++) if ($maxcountHMS < $_SESSION["maxdata"]) {$anzlines=$maxcountHMS;} else {$anzlines= $_SESSION["maxdata"];}
for ($x = 0; $x < $anzlines; $x++)
#for ($x = 0; $x < count($resultreverse); $x++)
{ {
$y = round($imgmaxyhms-(($resultreverse[$x][2]-$min)*$fac)); $y = round($imgmaxyhms-(($resultreverse[$x][2]-$min)*$fac));
ImageLine($im, $imgmaxxhms-$x, $y, $xold, $yold, $white); ImageLine($im, $imgmaxxhms-$x, $y, $xold, $yold, $white);
@@ -180,17 +186,17 @@ if ( $type == "HMS100T" or $type == "HMS100TF" )
$text="Temperature"; $text="Temperature";
$fontsize=7; $fontsize=7;
$txtcolor=$bg3p; $txtcolor=$bg3p;
ImageTTFText ($im, $fontsize, 0, 5, 12, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, 3, 10, $txtcolor, $fontttf, $text);
$txtcolor=$bg3p; $txtcolor=$bg3p;
$fontsize=9; $fontsize=9;
$text=$tempTEMP." &#176;C"; $text=$tempTEMP." &#176;C";
$tvalue=$tempTEMP; $tvalue=$tempTEMP;
ImageTTFText ($im, $fontsize, 0, 80, 35, $txtcolor, $fontttfb, $text); ImageTTFText ($im, $fontsize, 0, 90-$XcorrectMainTextHMS, 37, $txtcolor, $fontttfb, $text);
$txtcolor=$bg3p; $txtcolor=$bg3p;
$fontsize=7; $fontsize=7;
$text="min= $mintemp max= $maxtemp"; $text="min= $mintemp max= $maxtemp";
ImageTTFText ($im, $fontsize, 0, 62, 47, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, 67-$XcorrectMainTextHMS, 49, $txtcolor, $fontttf, $text);
$text=$resultreverse[0][0]; $text=$resultreverse[0][0];
ImageTTFText ($im, $fontsize, 0, $imgmaxxhms-127, 13, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, $imgmaxxhms-127, 13, $txtcolor, $fontttf, $text);
}; };
@@ -199,10 +205,10 @@ if ( $type == "HMS100T" or $type == "HMS100TF" )
$txtcolor=$bg3p; $txtcolor=$bg3p;
$fontsize=9; $fontsize=9;
$text= $drawhms; $text= $drawhms;
ImageTTFText ($im, 8, 0, 80, 18, $txtcolor, $fontttfb, $text); ImageTTFText ($im, 8, 0,90-$XcorrectMainTextHMS, 22, $txtcolor, $fontttfb, $text);
$fontsize=7; $fontsize=7;
$text=$txtroom.$room; $text=$txtroom.$room;
ImageTTFText ($im, $fontsize, 0, 5, $imgmaxyhms-7, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, 3, $imgmaxyhms-7, $txtcolor, $fontttf, $text);
$text=$type; $text=$type;
ImageTTFText ($im, $fontsize, 0, 5, $imgmaxyhms-17, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, 5, $imgmaxyhms-17, $txtcolor, $fontttf, $text);
@@ -232,8 +238,8 @@ if ( $type == "HMS100WD" or $type == "HMS100MG" or $type == "HMS100W"
else else
{ $_SESSION["maxdata"] = $imgmaxxhms; }; { $_SESSION["maxdata"] = $imgmaxxhms; };
for ($x = 0; $x < $_SESSION["maxdata"]-1; $x++) if ($maxcountHMS < $_SESSION["maxdata"]) {$anzlines=$maxcountHMS;} else {$anzlines= $_SESSION["maxdata"];}
for ($x = 0; $x < $anzlines; $x++)
{ {
$parts = explode("_", $resultreverse[$x][0]); $parts = explode("_", $resultreverse[$x][0]);
if ( ($parts[0] != $olddate) ) if ( ($parts[0] != $olddate) )

View File

@@ -13,7 +13,7 @@ $drawks=$_GET['drawks'];
$room=$_GET['room']; $room=$_GET['room'];
$avgday=$_GET['avgday']; $avgday=$_GET['avgday'];
$avgmonth=$_GET['avgmonth']; $avgmonth=$_GET['avgmonth'];
#$drawks="ks300";
$file="$logpath/$drawks.log"; $file="$logpath/$drawks.log";
if (! file_exists($file)) show_error($file,$drawks,$imgmaxxks,$imgmaxyks); if (! file_exists($file)) show_error($file,$drawks,$imgmaxxks,$imgmaxyks);
@@ -94,8 +94,8 @@ $avgmonth=$_GET['avgmonth'];
$yold=round($imgmaxyks-(($resultreverse[0][1]-$mintemp)*$fac)); $yold=round($imgmaxyks-(($resultreverse[0][1]-$mintemp)*$fac));
################### ###################
if ($maxcountKS < $maxdata) {$anzlines=$maxcountKS;} else {$anzlines=$maxdata;}
for ($x = 0; $x <= $maxdata; $x++) for ($x = 0; $x < $anzlines; $x++)
{ {
$y = round($imgmaxyks-(($resultreverse[$x][1]-$mintemp)*$fac)); $y = round($imgmaxyks-(($resultreverse[$x][1]-$mintemp)*$fac));
ImageLine($im, $imgmaxxks-$x, $y, $xold, $yold, $red); ImageLine($im, $imgmaxxks-$x, $y, $xold, $yold, $red);
@@ -109,6 +109,7 @@ $avgmonth=$_GET['avgmonth'];
}; };
}; };
ImageLine($im, $imgmaxxks-$x, 0,$imgmaxxks-$x , $imgmaxyks, $yellow); ImageLine($im, $imgmaxxks-$x, 0,$imgmaxxks-$x , $imgmaxyks, $yellow);
ImageLine($im, $imgmaxxks-$maxcountKS, 0,$imgmaxxks-$maxcountKS , $imgmaxyks, $white);
if ($mintemp < 0) if ($mintemp < 0)
{ {
$y = round($imgmaxyks-((0-$mintemp)*$fac)); $y = round($imgmaxyks-((0-$mintemp)*$fac));
@@ -117,15 +118,15 @@ $avgmonth=$_GET['avgmonth'];
$text="Temperature"; $text="Temperature";
$fontsize=7; $fontsize=7;
$txtcolor=$bg3p; $txtcolor=$bg3p;
ImageTTFText ($im, $fontsize, 0, 5, 12, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, 3, 10, $txtcolor, $fontttf, $text);
$fontsize=9; $fontsize=9;
$text=$temp." &#176;C"; $text=$temp." &#176;C";
ImageTTFText ($im, $fontsize, 0, 80, 35, $txtcolor, $fontttfb, $text); ImageTTFText ($im, $fontsize, 0, 90-$XcorrectMainTextKS, 37, $txtcolor, $fontttfb, $text);
$text= $drawks; $text= $drawks;
ImageTTFText ($im, 8, 0, 80, 18, $txtcolor, $fontttfb, $text); ImageTTFText ($im, 8, 0, 90-$XcorrectMainTextKS, 22, $txtcolor, $fontttfb, $text);
$fontsize=7; $fontsize=7;
$text="min= $mintemp max= $maxtemp"; $text="min= $mintemp max= $maxtemp";
ImageTTFText ($im, $fontsize, 0, 60, 47, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, 67-$XcorrectMainTextKS, 49, $txtcolor, $fontttf, $text);
$imt=$im; $imt=$im;
#humidity #humidity
@@ -140,7 +141,8 @@ $avgmonth=$_GET['avgmonth'];
$min=100; $min=100;
$max=-100; $max=-100;
for ($x = 0; $x <= $maxdata-1; $x++) if ($maxcountKS < $maxdata) {$anzlines=$maxcountKS;} else {$anzlines=$maxdata;}
for ($x = 0; $x < $anzlines; $x++)
{ {
$temp=$resultreverse[$x][2]; $temp=$resultreverse[$x][2];
if ( $temp > $max ) $max=$temp; if ( $temp > $max ) $max=$temp;
@@ -156,7 +158,9 @@ $avgmonth=$_GET['avgmonth'];
$yold=round($imgmaxyks-(($resultreverse[0][2]-$min)*$fac)); $yold=round($imgmaxyks-(($resultreverse[0][2]-$min)*$fac));
$olddate = ($resultreverse[0][0][9]); $olddate = ($resultreverse[0][0][9]);
for ($x = 0; $x < count($resultreverse); $x++) $countresultrev=count($resultreverse);
if ($maxcountKS < $countresultrev) {$anzlines=$maxcountKS;}else {$anzlines=$countresultrev;}
for ($x = 0; $x < $anzlines; $x++)
{ {
$y = round($imgmaxyks-(($resultreverse[$x][2]-$min)*$fac)); $y = round($imgmaxyks-(($resultreverse[$x][2]-$min)*$fac));
ImageLine($im, $imgmaxxks-$x, $y, $xold, $yold, $red); ImageLine($im, $imgmaxxks-$x, $y, $xold, $yold, $red);
@@ -170,16 +174,17 @@ $avgmonth=$_GET['avgmonth'];
}; };
}; };
ImageLine($im, $imgmaxxks-$x, 0,$imgmaxxks-$x , $imgmaxyks, $yellow); ImageLine($im, $imgmaxxks-$x, 0,$imgmaxxks-$x , $imgmaxyks, $yellow);
ImageLine($im, $imgmaxxks-$maxcountKS, 0,$imgmaxxks-$maxcountKS , $imgmaxyks, $white);
$text="Humidity"; $text="Humidity";
$fontsize=7; $fontsize=7;
$txtcolor=$bg3p; $txtcolor=$bg3p;
ImageTTFText ($im, $fontsize, 0, 5, 12, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, 3, 10, $txtcolor, $fontttf, $text);
$fontsize=9; $fontsize=9;
$text=$temp." %"; $text=$temp." %";
ImageTTFText ($im, $fontsize, 0, 80, 35, $txtcolor, $fontttfb, $text); ImageTTFText ($im, $fontsize, 0, 90-$XcorrectMainText, 37, $txtcolor, $fontttfb, $text);
$fontsize=7; $fontsize=7;
$text="min= $min max= $max"; $text="min= $min max= $max";
ImageTTFText ($im, $fontsize, 0, 60, 47, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, 67-$XcorrectMainText, 49, $txtcolor, $fontttf, $text);
$imh=$im; $imh=$im;
@@ -192,7 +197,8 @@ $avgmonth=$_GET['avgmonth'];
$min=120000; $min=120000;
$max=-100; $max=-100;
for ($x = 0; $x <= $maxdata; $x++) if ($maxcountKS < $maxdata) {$anzlines=$maxcountKS;} else {$anzlines=$maxdata;}
for ($x = 0; $x < $anzlines; $x++)
{ {
$temp=$resultreverse[$x][3]; $temp=$resultreverse[$x][3];
if ( $temp > $max ) $max=$temp; if ( $temp > $max ) $max=$temp;
@@ -207,7 +213,9 @@ $avgmonth=$_GET['avgmonth'];
$xold=$imgmaxxks; $xold=$imgmaxxks;
$yold=round($imgmaxyks-(($resultreverse[0][3]-$min)*$fac)); $yold=round($imgmaxyks-(($resultreverse[0][3]-$min)*$fac));
for ($x = 0; $x < count($resultreverse); $x++) $countresultrev=count($resultreverse);
if ($maxcountKS < $countresultrev) {$anzlines=$maxcountKS;}else {$anzlines=$countresultrev;}
for ($x = 0; $x < $anzlines; $x++)
{ {
$y = round($imgmaxyks-(($resultreverse[$x][3]-$min)*$fac)); $y = round($imgmaxyks-(($resultreverse[$x][3]-$min)*$fac));
ImageLine($im, $imgmaxxks-$x, $y, $xold, $yold, $red); ImageLine($im, $imgmaxxks-$x, $y, $xold, $yold, $red);
@@ -221,26 +229,27 @@ $avgmonth=$_GET['avgmonth'];
}; };
}; };
ImageLine($im, $imgmaxxks-$x, 0,$imgmaxxks-$x , $imgmaxyks, $yellow); ImageLine($im, $imgmaxxks-$x, 0,$imgmaxxks-$x , $imgmaxyks, $yellow);
ImageLine($im, $imgmaxxks-$maxcountKS, 0,$imgmaxxks-$maxcountKS , $imgmaxyks, $white);
if (isset($willi)) $text="Air Pressure"; else $text="Wind"; if (isset($willi)) $text="Air Pressure"; else $text="Wind";
$fontsize=7; $fontsize=7;
$txtcolor=$bg3p; $txtcolor=$bg3p;
ImageTTFText ($im, $fontsize, 0, 5, 12, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, 3, 10, $txtcolor, $fontttf, $text);
$fontsize=9; $fontsize=9;
if (isset($willi)) $text=$temp." hPa"; else $text=$temp." km/h"; if (isset($willi)) $text=$temp." hPa"; else $text=$temp." km/h";
ImageTTFText ($im, $fontsize, 0, 80, 35, $txtcolor, $fontttfb, $text); ImageTTFText ($im, $fontsize, 0, 80-$XcorrectMainTextKS, 37, $txtcolor, $fontttfb, $text);
$fontsize=7; $fontsize=7;
if (($showbft==1) and (! isset($willi))) if (($showbft==1) and (! isset($willi)))
{ {
$text="( ".bft($temp)." Bft)"; $text="( ".bft($temp)." Bft)";
ImageTTFText ($im, $fontsize, 0, 150, 35, $txtcolor, $fontttfb, $text); ImageTTFText ($im, $fontsize, 0, 140-$XcorrectMainTextKS, 37, $txtcolor, $fontttfb, $text);
$text2="min= $min max= $max (".bft($max)." Bft)"; $text2="min= $min max= $max (".bft($max)." Bft)";
} }
else else
{ {
$text2="min= $min max= $max"; $text2="min= $min max= $max";
} }
ImageTTFText ($im, $fontsize, 0, 60, 47, $txtcolor, $fontttf, $text2); ImageTTFText ($im, $fontsize, 0, 57-$XcorrectMainTextKS, 49, $txtcolor, $fontttf, $text2);
$imw=$im; $imw=$im;
@@ -256,7 +265,8 @@ if (! isset($willi))
$min=120; $min=120;
$max=-100; $max=-100;
for ($x = 0; $x <= $maxdata; $x++) if ($maxcountKS < $maxdata) {$anzlines=$maxcountKS;} else {$anzlines=$maxdata;}
for ($x = 0; $x < $anzlines; $x++)
{ {
$temp=$resultreverse[$x][4]; $temp=$resultreverse[$x][4];
if ( $temp > $max ) $max=$temp; if ( $temp > $max ) $max=$temp;
@@ -272,7 +282,8 @@ if (! isset($willi))
$xold=$imgmaxxks; $xold=$imgmaxxks;
$yold=round($imgmaxyks-(($resultreverse[0][4]-$min)*$fac)); $yold=round($imgmaxyks-(($resultreverse[0][4]-$min)*$fac));
for ($x = 0; $x <= $maxdata; $x++) if ($maxcountKS < $maxdata) {$anzlines=$maxcountKS;} else {$anzlines=$maxdata;}
for ($x = 0; $x < $anzlines; $x++)
{ {
$parts = explode("_", $resultreverse[$x][0]); $parts = explode("_", $resultreverse[$x][0]);
if ( ($parts[0] != $olddate) ) if ( ($parts[0] != $olddate) )
@@ -293,6 +304,7 @@ if (! isset($willi))
}; };
ImageLine($im, $imgmaxxks-$x, 0,$imgmaxxks-$x , $imgmaxyks, $yellow); ImageLine($im, $imgmaxxks-$x, 0,$imgmaxxks-$x , $imgmaxyks, $yellow);
ImageLine($im, $imgmaxxks-$maxcountKS, 0,$imgmaxxks-$maxcountKS , $imgmaxyks, $white);
$fontsize=7; $fontsize=7;
$text="Is raining:"; $text="Is raining:";
ImageTTFText ($im, $fontsize, 0, 50, 14, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, 50, 14, $txtcolor, $fontttf, $text);
@@ -304,21 +316,21 @@ if (! isset($willi))
$text="Rain"; $text="Rain";
$fontsize=7; $fontsize=7;
$txtcolor=$bg3p; $txtcolor=$bg3p;
ImageTTFText ($im, $fontsize, 0, 5, 12, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, 3, 10, $txtcolor, $fontttf, $text);
$fontsize=9; $fontsize=9;
$text=$temp." l/m2"; $text=$temp." l/m2";
ImageTTFText ($im, $fontsize, 0, 80, 35, $txtcolor, $fontttfb, $text); ImageTTFText ($im, $fontsize, 0, 90-$XcorrectMainTextKS, 37, $txtcolor, $fontttfb, $text);
$fontsize=7; $fontsize=7;
$text="min= $min max= $max"; $text="min= $min max= $max";
ImageTTFText ($im, $fontsize, 0, $imgmaxxks-130, 30, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, $imgmaxxks-130, 30, $txtcolor, $fontttf, $text);
$text=$resultreverse[0][0]; $text=$resultreverse[0][0];
ImageTTFText ($im, $fontsize, 0, $imgmaxxks-130, 15, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, $imgmaxxks-130, 15, $txtcolor, $fontttf, $text);
$text="avg_day: ".$avgday; $text="avg_day: ".$avgday;
ImageTTFText ($im, $fontsize, 0, 70, 47, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, 70, 49, $txtcolor, $fontttf, $text);
$text="avg_mon: ".$avgmonth; $text="avg_mon: ".$avgmonth;
ImageTTFText ($im, $fontsize, 0, 320, 47, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, 320, 49, $txtcolor, $fontttf, $text);
$text=$room; $text=$room;
ImageTTFText ($im, $fontsize, 0, 7, 47, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, 3, 49, $txtcolor, $fontttf, $text);
$imr=$im; $imr=$im;
} }
else # Willi: else # Willi:
@@ -331,7 +343,8 @@ else # Willi:
$min=120000; $min=120000;
$max=-100; $max=-100;
for ($x = 0; $x <= $maxdata; $x++) if ($maxcountKS < $maxdata) {$anzlines=$maxcountKS;} else {$anzlines=$maxdata;}
for ($x = 0; $x < $anzlines; $x++)
{ {
$temp=$resultreverse[$x][4]; $temp=$resultreverse[$x][4];
if ( $temp > $max ) $max=$temp; if ( $temp > $max ) $max=$temp;
@@ -360,6 +373,7 @@ else # Willi:
}; };
}; };
ImageLine($im, $imgmaxxks-$x, 0,$imgmaxxks-$x , $imgmaxyks, $yellow); ImageLine($im, $imgmaxxks-$x, 0,$imgmaxxks-$x , $imgmaxyks, $yellow);
ImageLine($im, $imgmaxxks-$maxcountKS, 0,$imgmaxxks-$maxcountKS , $imgmaxyks, $white);
$text="Willi"; $text="Willi";
$fontsize=7; $fontsize=7;
$txtcolor=$bg3p; $txtcolor=$bg3p;
@@ -373,7 +387,8 @@ else # Willi:
ImageTTFText ($im, $fontsize, 0, 60, 47, $txtcolor, $fontttf, $text2); ImageTTFText ($im, $fontsize, 0, 60, 47, $txtcolor, $fontttf, $text2);
$text=$resultreverse[0][0]; $text=$resultreverse[0][0];
ImageTTFText ($im, $fontsize, 0, $imgmaxxks-130, 15, $txtcolor, $fontttf, $text); ImageTTFText ($im, $fontsize, 0, $imgmaxxks-130, 15, $txtcolor, $fontttf, $text);
$text=$room;
ImageTTFText ($im, $fontsize, 0, 7, 47, $txtcolor, $fontttf, $text);
$imr=$im; $imr=$im;
} }

View File

@@ -141,7 +141,7 @@ $pgm3version='0.8.0cvs';
if (isset ($showat)) { $forwardurl=$forwardurl.'&showat';}; if (isset ($showat)) { $forwardurl=$forwardurl.'&showat';};
if (isset ($showhist)) { $forwardurl=$forwardurl.'&showhist';}; if (isset ($showhist)) { $forwardurl=$forwardurl.'&showhist';};
if (isset ($showmenu)) if (isset ($showmenu))
{ $forwardurl=$forwardurl.'&fs20dev='.$fs20dev.'&orderpulldown='.$orderpulldown.'&showmenu='.$showmenu.'&showroom='.$showroom;} { $forwardurl=$forwardurl.'&fs20dev='.$fs20dev.'&orderpulldown='.$orderpulldown.'&valuetime='.$valuetime.'&showmenu='.$showmenu.'&showroom='.$showroom;}
unset($link); unset($link);
if (isset ($showlogs)) $link=$link.'&showlogs'; if (isset ($showlogs)) $link=$link.'&showlogs';
if (isset ($shownoti)) $link=$link.'&shownoti'; if (isset ($shownoti)) $link=$link.'&shownoti';
@@ -384,6 +384,7 @@ xml_parser_free($xml_parser);
#print_r($rooms); echo "Count: $countrooms"; exit; #print_r($rooms); echo "Count: $countrooms"; exit;
#print_r($fs20devs); exit; #print_r($fs20devs); exit;
#echo count($stack[0][children]);exit;
# Print Array on Screen # Print Array on Screen
@@ -428,22 +429,26 @@ xml_parser_free($xml_parser);
echo "</font></td></tr>"; echo "</font></td></tr>";
if (($show_general=='1') AND ($showmenu=='1')) if ($showmenu=='1')
{echo " {
if ($show_general=='1')
{echo "
<tr> <tr>
<td colspan=3 align=right $bg2><font $fontcolor3> <td colspan=2 align=right $bg2><font $fontcolor3> General: </font></td>
General: </font></td><td align=left $bg2><font $fontcolor3> <td align=left $bg2 colspan=2><font $fontcolor3>
<form action=$forwardurl method='POST'> <form action=$forwardurl method='POST'>
<input type=text name=order size=30> <input type=text name=order size=30>
<input type=hidden name=showfht value=$showfht> <input type=hidden name=showfht value=$showfht>
<input type=hidden name=showhms value=$showhms> <input type=hidden name=showhms value=$showhms>
<input type=hidden name=showmenu value=$showmenu> <input type=hidden name=showmenu value=$showmenu>
<input type=hidden name=Action value=exec> <input type=hidden name=Action value=exec>
<input type=submit value='go!'></form></td></tr>"; <input type=submit value='go!'></form></td>
}; </tr>";
};
if (($show_fs20pulldown=='1') AND ($showmenu=='1')) include 'include/fs20pulldown.php'; if ($show_fs20pulldown=='1') include 'include/fs20pulldown.php';
if (($show_fhtpulldown=='1') AND ($showmenu=='1')) include 'include/fhtpulldown.php'; if ($show_fhtpulldown=='1') include 'include/fhtpulldown.php';
};
############################ ROOMS ############################ ROOMS
if (($showroombuttons==1) and (count($rooms)>1)) if (($showroombuttons==1) and (count($rooms)>1))
@@ -468,6 +473,13 @@ xml_parser_free($xml_parser);
} }
##################################################################################################################### #####################################################################################################################
##### Check Version of FHEM
if (! ($stack[0][children][0][name]=='Internal_LIST')) ##older FHZ100 have no Internal_LIST
{echo "Error!! You need at least FHEM-4.0 to run this pgm3!!";}
##### Let's go.... :-))))) ##### Let's go.... :-)))))
for($i=0; $i < count($stack[0][children]); $i++) for($i=0; $i < count($stack[0][children]); $i++)
{ {
@@ -538,7 +550,9 @@ xml_parser_free($xml_parser);
<input type=hidden name=Action value=hide> <input type=hidden name=Action value=hide>
<input type=hidden name=showfht value=none> <input type=hidden name=showfht value=none>
<input type=hidden name=showroom value=$showroom> <input type=hidden name=showroom value=$showroom>
<input type=submit value='hide'></form>";} <input type=submit value='hide'></form>
<a href=$forwardurl&showmenu=1&fhtdev=$FHTdev&orderpulldown=desired-temp&valuetime=20.0>adjust</a></td>";
}
else else
{echo "<tr valign=center><td align=center $bg2 valign=center> {echo "<tr valign=center><td align=center $bg2 valign=center>
<form action=$forwardurl method='POST'> <form action=$forwardurl method='POST'>
@@ -546,24 +560,11 @@ xml_parser_free($xml_parser);
<input type=hidden name=showfht value=$FHTdev> <input type=hidden name=showfht value=$FHTdev>
<input type=hidden name=showroom value=$showroom> <input type=hidden name=showroom value=$showroom>
<input type=hidden name=showhms value=$showhms> <input type=hidden name=showhms value=$showhms>
<input type=submit value='show'></form></td>"; <input type=submit value='show'></form>
}; <a href=$forwardurl&showmenu=1&fhtdev=$FHTdev&orderpulldown=desired-temp&valuetime=20.0>adjust</a></td>";
echo "<td align=center valign=center $bg2><b> };
<font $fontcolor3>$FHTdev</font></b></td><td $bg2 align=center valign=center>
<form action=$forwardurl method='POST'><font $fontcolor3>desired-temp</font>
<input type=hidden name=Action value=execfht>
<input type=hidden name=showfht value=$showfht>
<input type=hidden name=showroom value=$showroom>
<input type=hidden name=showhms value=$showhms>
<input type=hidden name=dofht value=$FHTdev>";
echo "<select name=temp size=1>
<option>12.0</option><option>17.0</option><option>18.0</option>
<option>19.0</option><option>20.0</option><option>21.0</option><option selected>22.0</option>
<option>23.0</option><option>24.0</option><option>25.0</option><option>26.0</option></select>
<input type=submit value=go></form></td>
";
echo "<td $bg2> echo "<td $bg2 colspan='3'>
<img src='include/fht.php?drawfht=$FHTdev&room=$room' width='$imgmaxxfht' height='$imgmaxyfht'> <img src='include/fht.php?drawfht=$FHTdev&room=$room' width='$imgmaxxfht' height='$imgmaxyfht'>
</td>"; </td>";
echo "</tr>"; echo "</tr>";
@@ -577,16 +578,18 @@ xml_parser_free($xml_parser);
</td></tr> </td></tr>
<tr><td colspan=4><hr color='#AFC6DB'></td></tr>"; <tr><td colspan=4><hr color='#AFC6DB'></td></tr>";
} }
if ( $showfht==$FHTdev)
{
echo "<tr><td colspan=4><table border=0><tr>";
for($k=0; $k < count($stack[0][children][$i][children][$j][children]); $k++) for($k=0; $k < count($stack[0][children][$i][children][$j][children]); $k++)
{ {
if ( $showfht==$FHTdev) $name=$stack[0][children][$i][children][$j][children][$k][attrs][key];
{
$name=$stack[0][children][$i][children][$j][children][$k][attrs][name];
$value=$stack[0][children][$i][children][$j][children][$k][attrs][value]; $value=$stack[0][children][$i][children][$j][children][$k][attrs][value];
$measured=$stack[0][children][$i][children][$j][children][$k][attrs][measured]; $measured=$stack[0][children][$i][children][$j][children][$k][attrs][measured];
echo "<tr><td colspan=1> $FHTdev (FHT): </td><td>$name</td><td>$value echo "<td><tr><td colspan=1> $FHTdev (FHT): </td><td>$name</td><td>$value
</td><td>$measured</td></tr>"; </td><td>$measured</td></tr></td>";
} }
echo "</tr></table></td></tr>";
} }
} }
} }
@@ -613,21 +616,20 @@ xml_parser_free($xml_parser);
$HMSdev=$stack[0][children][$i][children][$j][attrs][name]; $HMSdev=$stack[0][children][$i][children][$j][attrs][name];
if ($type=="HMS100T" or $type=="HMS100TF") if ($type=="HMS100T" or $type=="HMS100TF")
{ {
if ($showhmsgnu== $HMSdev) if ($showhmsgnu== $HMSdev) {$formvalue="hide";$gnuvalue="";}
{$formvalue="hide";$gnuvalue="";}
else {$formvalue="show";$gnuvalue=$HMSdev;}; else {$formvalue="show";$gnuvalue=$HMSdev;};
echo "</td></tr><tr valign=center><td align=center $bg2 valign=center> echo "<tr valign=center><td align=center $bg2 valign=center>
<form action=$forwardurl method='POST'> <form action=$forwardurl method='POST'>
<input type=hidden name=Action value=showhmsgnu> <input type=hidden name=Action value=showhmsgnu>
<input type=hidden name=showroom value=$showroom> <input type=hidden name=showroom value=$showroom>
<input type=hidden name=showhmsgnu value=$gnuvalue> <input type=hidden name=showhmsgnu value=$gnuvalue>
<input type=submit value='$formvalue'></form></td><td $bg2>"; <input type=submit value='$formvalue'></form></td><td $bg2 colspan=2>";
} }
else else
echo "</td></tr><tr><td $bg2 colspan=2>"; {echo "<tr><td $bg2 colspan=3>";}
echo "<font $fontcolor3><b> $HMSdev</b></font> </td>
<td $bg2 colspan=2><img src='include/hms100.php?drawhms=$HMSdev&room=$room&type=$type' width='$imgmaxxhms' height='$imgmaxyhms'></td> </tr>"; echo "<img src='include/hms100.php?drawhms=$HMSdev&room=$room&type=$type' width='$imgmaxxhms' height='$imgmaxyhms'></td> </tr>";
if ($showhmsgnu == $HMSdev and $showgnuplot == 1) if ($showhmsgnu == $HMSdev and $showgnuplot == 1)
{ drawgnuplot($HMSdev,$type,$gnuplot,$pictype,$logpath,0,0); { drawgnuplot($HMSdev,$type,$gnuplot,$pictype,$logpath,0,0);
@@ -655,7 +657,11 @@ xml_parser_free($xml_parser);
$check=$stack[0][children][$i][children][$j][children][$k][attrs][key]; $check=$stack[0][children][$i][children][$j][children][$k][attrs][key];
$check2=$stack[0][children][$i][children][$j][children][$k][attrs][name]; $check2=$stack[0][children][$i][children][$j][children][$k][attrs][name];
if ($check=='room') $room=$stack[0][children][$i][children][$j][children][$k][attrs][value]; if ($check=='room') $room=$stack[0][children][$i][children][$j][children][$k][attrs][value];
elseif ($check=='willi') $willi=1;
elseif ($check=='avg_day') $KSavgday=$stack[0][children][$i][children][$j][children][$k][attrs][value];
elseif ($check=='temperature') $KSmeasured=$stack[0][children][$i][children][$j][children][$k][attrs][measured];
elseif ($check=='avg_month') $KSavgmonth=$stack[0][children][$i][children][$j][children][$k][attrs][value];
# for older versions...
if ($check2=='avg_month') $KSavgmonth=$stack[0][children][$i][children][$j][children][$k][attrs][value]; if ($check2=='avg_month') $KSavgmonth=$stack[0][children][$i][children][$j][children][$k][attrs][value];
elseif ($check2=='avg_day') $KSavgday=$stack[0][children][$i][children][$j][children][$k][attrs][value]; elseif ($check2=='avg_day') $KSavgday=$stack[0][children][$i][children][$j][children][$k][attrs][value];
elseif ($check2=='temperature') $KSmeasured=$stack[0][children][$i][children][$j][children][$k][attrs][measured]; elseif ($check2=='temperature') $KSmeasured=$stack[0][children][$i][children][$j][children][$k][attrs][measured];
@@ -688,7 +694,7 @@ xml_parser_free($xml_parser);
<input type=submit value='show'></form></td>"; <input type=submit value='show'></form></td>";
}; };
echo "<td $bg2<font $fontcolor3><b> $KSdev</font></b> </td><td $bg2 center=align colspan=2>"; echo "<td $bg2 center=align colspan=3>";
echo "<img src='include/ks300.php?drawks=$KSdev&room=$room&avgmonth=$KSavgmonth&avgday=$KSavgday' width='$Xks' height='$Yks'>"; echo "<img src='include/ks300.php?drawks=$KSdev&room=$room&avgmonth=$KSavgmonth&avgday=$KSavgday' width='$Xks' height='$Yks'>";
echo "</td></tr>"; echo "</td></tr>";
if (! isset ($willi)) $drawtype="KS300"; else $drawtype="WS300"; if (! isset ($willi)) $drawtype="KS300"; else $drawtype="WS300";