From f4ce915022d7636457a119111b3c33ebc783f6f5 Mon Sep 17 00:00:00 2001 From: martinhaas <> Date: Tue, 4 Sep 2007 09:38:27 +0000 Subject: [PATCH] V0.8.2 with minor changes git-svn-id: https://svn.fhem.de/fhem/trunk@87 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/webfrontend/pgm3/CHANGED | 5 +++ fhem/webfrontend/pgm3/HISTORY | 3 ++ fhem/webfrontend/pgm3/config.php | 11 +++--- fhem/webfrontend/pgm3/include/gnuplot.php | 3 ++ fhem/webfrontend/pgm3/include/hms100.php | 1 + fhem/webfrontend/pgm3/index.php | 43 +++++++++++------------ 6 files changed, 40 insertions(+), 26 deletions(-) diff --git a/fhem/webfrontend/pgm3/CHANGED b/fhem/webfrontend/pgm3/CHANGED index 5e5917240..1df224152 100644 --- a/fhem/webfrontend/pgm3/CHANGED +++ b/fhem/webfrontend/pgm3/CHANGED @@ -115,3 +115,8 @@ Changelog 2007-06-13 (0.8.1) -- Bugfix: Section FHZ_DEVICE is now hidden if you dont want neither Pulldowns nor General. + +2007-09-04 (0.8.2) +-- bugfix: HMS100WD is now aligned with other HMS-Devices +-- feature: Now there is a warning if there are not sufficient data to draw a gnuplot graph +-- feature: more information about new HMS-Devices diff --git a/fhem/webfrontend/pgm3/HISTORY b/fhem/webfrontend/pgm3/HISTORY index 53495aa69..e196843f2 100644 --- a/fhem/webfrontend/pgm3/HISTORY +++ b/fhem/webfrontend/pgm3/HISTORY @@ -19,3 +19,6 @@ - Martin 2007-07-13 - Section FHZ-DEVICES s now hidden if it is not needed + +- Martin 2007-09-04 + - Small changes in gnuplot.php, config.php, index.php, hms100.php diff --git a/fhem/webfrontend/pgm3/config.php b/fhem/webfrontend/pgm3/config.php index 7abadecdb..a185aaa5e 100644 --- a/fhem/webfrontend/pgm3/config.php +++ b/fhem/webfrontend/pgm3/config.php @@ -27,7 +27,7 @@ # this is only possible, if the webserver (e.g.wwwrun) has the rights ro write the # files from fh1000.pl. If you want that then run fhz1000.pl as wwwrun too. # if 'yes' then only the needed lines are in the logfiles, the rest will be deleted. - $logrotate='yes'; # yes/no default='no' + $logrotate='no'; # yes/no default='no' ## Kioskmode. Only show but don't switch anything. Values: on/off @@ -51,6 +51,7 @@ $imgmaxyfs20=85; # default=85 $fs20fontsizetitel=10; # default=10 $fs20maxiconperline=9; # default=9 + #room. Write e.g. "attr rolowz room wzo" #into your fhz1000.cfg and restart fhz1000.pl # this will be marked on the FS20-Button. @@ -62,7 +63,7 @@ $showroombuttons=1; #default 1 Values 0/1 $imgmaxxroom=$imgmaxxfs20; #Size of the pictures, default=$imgmaxxfs20 $imgmaxyroom=30; # default=30 - $roomfontsizetitel=10; # default=9 + $roomfontsizetitel=9; # default=9 $roommaxiconperline=$fs20maxiconperline; # default=$fs20maxiconperline ############################################################################################## @@ -122,13 +123,14 @@ ############################################################################################## ## misc $taillog=1; #make shure to have the correct rights. Values: 0/1 - $taillogorder="/usr/bin/tail -20 $logpath/fhem.log"; + $tailcount=20; #make shure to have the correct rights. Values: 0/1 + $taillogorder="/usr/bin/tail -$tailcount $logpath/fhem.log "; ## show Information at startup. $showLOGS='no'; #show the LOGS at startup. Default: no Values: yes/no - $showAT='yes'; #show the AT_JOBS at startup. Default: yes Values: yes/no + $showAT='no'; #show the AT_JOBS at startup. Default: no Values: yes/no $showNOTI='no'; #show the NOTIFICATIONS at startup. Default: no Values: yes/no $showHIST='yes'; #show the HISTORY (if taillog=1) at startup. Default: yes Values: yes/no @@ -137,6 +139,7 @@ $urlreload=90; # Automatic reloading page [sec]. Default fast: 60 slow:90 $titel="PHP-Webmachine for fhem :-)"; #feel free to create an own title $timeformat="Y-m-d H:i:s"; + $winsize=800; # width of the pgm3 $bodybg="bgcolor='#F5F5F5'"; $bg1="bgcolor='#6E94B7'"; $bg2="bgcolor='#AFC6DB'"; diff --git a/fhem/webfrontend/pgm3/include/gnuplot.php b/fhem/webfrontend/pgm3/include/gnuplot.php index 63b8fe72a..b79c8730d 100644 --- a/fhem/webfrontend/pgm3/include/gnuplot.php +++ b/fhem/webfrontend/pgm3/include/gnuplot.php @@ -120,6 +120,9 @@ $f2=fopen("tmp/gnu2","w"); fputs($f2,$message); fclose($f2); exec("$gnuplot tmp/gnu2",$output); +$FOUT='tmp/'.$gnudraw1.'.'.$pictype; +$FS=filesize($FOUT); +if ($FS == '0')echo "Warning, there are not all required data in the logfile of $gnudraw to create a graph (e.g. actuator, desired-temp...)."; }; diff --git a/fhem/webfrontend/pgm3/include/hms100.php b/fhem/webfrontend/pgm3/include/hms100.php index b3dcccb3c..6060a7a86 100755 --- a/fhem/webfrontend/pgm3/include/hms100.php +++ b/fhem/webfrontend/pgm3/include/hms100.php @@ -357,6 +357,7 @@ function show_error_type($imgmaxx,$imgmaxy,$type) include "../config.php"; $bg3p = ImageColorAllocate($im, $fontcol_grap_R,$fontcol_grap_G,$fontcol_grap_B); $text="HMS-Device $type is not supported"; + if ($type=="HMS_LIST") $text="Waiting for the first message from the HMS-Device..."; $fontsize=7; $txtcolor=$bg3p; ImageTTFText ($im, $fontsize, 0, 5, 12, $txtcolor, $fontttf, $text); diff --git a/fhem/webfrontend/pgm3/index.php b/fhem/webfrontend/pgm3/index.php index 6bb51f74b..edb9c2a5f 100644 --- a/fhem/webfrontend/pgm3/index.php +++ b/fhem/webfrontend/pgm3/index.php @@ -1,6 +1,6 @@ + + + + + + $titel"; + include ("include/style.css"); + echo " "; + ###### make an array from the xmllist unset($output); @@ -247,8 +259,8 @@ else fclose($fp); } } - -#workaround for older fhz1000-Versions +#print_r($output); +#exit; @@ -290,7 +302,7 @@ if (!(list($xml_parser, $live) = new_xml_parser($live))) { die("could not parse XML input"); } -foreach($output as $data) { +foreach($output as $data) { if (!xml_parse($xml_parser, $data)) { die(sprintf("XML error: %s at line %d\n", xml_error_string(xml_get_error_code($xml_parser)), @@ -300,9 +312,6 @@ foreach($output as $data) { xml_parser_free($xml_parser); -#for testing -#print_r($stack);exit; - #searching for rooms/fs20 $rooms=array(); @@ -391,21 +400,11 @@ xml_parser_free($xml_parser); $now=date($timeformat); - echo " - - - - - - - $titel"; - include ("include/style.css"); - echo " "; echo" $errormessage -
- +
+
@@ -631,7 +630,7 @@ xml_parser_free($xml_parser); } else - {echo "";
";} + {echo "
";} echo "