diff --git a/fhem/webfrontend/pgm3/CHANGED b/fhem/webfrontend/pgm3/CHANGED index 5f8b0f5ff..c5017b7f6 100644 --- a/fhem/webfrontend/pgm3/CHANGED +++ b/fhem/webfrontend/pgm3/CHANGED @@ -130,3 +130,6 @@ It is not necessary to tell fhem that there are other logs. 2007-10-14 (0.8.4) -- feature: User defined logs with several values in one file now supported. + +2007-10-16 (CVS) +-- feature: User defined graphics now for Piri and FS20 too. Everthing is explained in the config.php. diff --git a/fhem/webfrontend/pgm3/HISTORY b/fhem/webfrontend/pgm3/HISTORY index 35d55d695..00619bbe7 100644 --- a/fhem/webfrontend/pgm3/HISTORY +++ b/fhem/webfrontend/pgm3/HISTORY @@ -30,4 +30,5 @@ - Now pgm3 shows other logfiles (like from wired devices) too. Changes in index.php, config.php, gnuplot.php, new userdefs.php) - Martin 2007-10-14 - User defined logs with several values in one file now supported. Changes in index.php, gnuplot.php, userdefs.php and config.php. - +- Martin 2007-10-16 + - User defined graphics now for Piri an FS20 too diff --git a/fhem/webfrontend/pgm3/config.php b/fhem/webfrontend/pgm3/config.php index fb84f5555..facfc11d9 100644 --- a/fhem/webfrontend/pgm3/config.php +++ b/fhem/webfrontend/pgm3/config.php @@ -63,7 +63,7 @@ $showroombuttons=1; #default 1 Values 0/1 $imgmaxxroom=$imgmaxxfs20; #Size of the pictures, default=$imgmaxxfs20 $imgmaxyroom=30; # default=30 - $roomfontsizetitel=9; # default=9 + $roomfontsizetitel=10; # default=10 $roommaxiconperline=$fs20maxiconperline; # default=$fs20maxiconperline ############################################################################################## @@ -103,19 +103,6 @@ # pgm3 (user www-data) needs the rights to write the logs # from fhz1000.pl (user = ???) -############################################################################################## -## SCIVT-Devices - $imgmaxxscivt=725; #Size of the pictures. Default: 725 - $imgmaxyscivt=52; - $maxcountscivt='575'; # Maximum count of pixel (from right to left) (Default:575) - $XcorrectMainTextSCIVT=25; # Text of main text from the right side (Default:) - $logrotateSCIVTlines=1200; # automatic Logrotate; $logrotate must be 'yes'. - # Default:1200 - # read docs/logrotate if you want adjust it manually! - # otherwise the system will slow down - # pgm3 (user www-data) needs the rights to write the logs - # from fhz1000.pl (user = ???) - ############################################################################################## ## KS300-Device $imgmaxxks=725; #Size of the pictures Default: 725 @@ -165,8 +152,12 @@ $userdef[0]['name']='SolarV'; #In which field are the values?? See the example above $userdef[0]['valuefield']=4; +#Type of Device [temperature | piri] pgm3 will try to generate a gnuplot picture +$userdef[0]['gnuplottype']='temperature'; + # example, path to the logfile with the entrys like above $userdef[0]['logpath']=$logpath.'/lse_solarV.log'; + $userdef[0]['room']='user'; # Semantic eg. Voltage @@ -199,6 +190,7 @@ $userdef[0]['logrotatelines']=2200; # #$userdef[1]['name']=''; #$userdef[1]['valuefield']=; +#$userdef[1]['gnuplottype']='temperature'; #$userdef[1]['logpath']='/var/tmp/log.log'; #$userdef[1]['room']=''; #$userdef[1]['semlong']=''; @@ -209,10 +201,76 @@ $userdef[0]['logrotatelines']=2200; #$userdef[1]['XcorrectMainText']=25; #$userdef[1]['logrotatelines']=2200; -################# -## Userdef: 2 +######################## +# example: +# define piriulog FileLog /var/tmp/piriu.log piriu:.* +#$userdef[1]['name']='PiriU'; +#$userdef[1]['valuefield']=3; +#$userdef[1]['gnuplottype']='piri'; +#$userdef[1]['logpath']='/mnt/fhz/piriu.log'; +#$userdef[1]['room']='wgu'; +#$userdef[1]['semlong']='Bewegungsmelder'; +#$userdef[1]['semshort']=''; +#$userdef[1]['imagemax']=725; +#$userdef[1]['imagemay']=52; +#$userdef[1]['maxcount']=575; +#$userdef[1]['XcorrectMainText']=25; +#$userdef[1]['logrotatelines']=2200; + +######################## +# example: +# define piriolog FileLog /var/tmp/pirio.log pirio:.* +#$userdef[2]['name']='PiriO'; +#$userdef[2]['valuefield']=3; +#$userdef[2]['gnuplottype']='piri'; +#$userdef[2]['logpath']='/mnt/fhz/pirio.log'; +#$userdef[2]['room']='wgo'; +#$userdef[2]['semlong']='Bewegungsmelder'; +#$userdef[2]['semshort']=''; +#$userdef[2]['imagemax']=725; +#$userdef[2]['imagemay']=52; +#$userdef[2]['maxcount']=575; +#$userdef[2]['XcorrectMainText']=25; +#$userdef[2]['logrotatelines']=2200; # -#$userdef[2]['name']=''; + +######################## +# example: +#define solarpumpe.log FileLog /var/tmp/solarpumpe.log solarpumpe:.*(on|off).* +#$userdef[3]['name']='SolarPumpe'; +#$userdef[3]['valuefield']=3; +#$userdef[3]['gnuplottype']='fs20'; +#$userdef[3]['logpath']='/mnt/fhz/solarpumpe.log'; +#$userdef[3]['room']='cellar'; +#$userdef[3]['semlong']='Solarpumpe'; +#$userdef[3]['semshort']=''; +#$userdef[3]['imagemax']=725; +#$userdef[3]['imagemay']=52; +#$userdef[3]['maxcount']=575; +#$userdef[3]['XcorrectMainText']=25; +#$userdef[3]['logrotatelines']=50; +# + +########################## +# example: +#define rolu1.log FileLog /var/tmp/rolu1.log rolu1:.*(on|off|dimup|dimdown).* +#$userdef[4]['name']='Rolu1'; +#$userdef[4]['valuefield']=3; +#$userdef[4]['gnuplottype']='fs20'; +#$userdef[4]['logpath']='/mnt/fhz/rolu1.log'; +#$userdef[4]['room']='wgu'; +#$userdef[4]['semlong']='Rolladen'; +#$userdef[4]['semshort']=''; +#$userdef[4]['imagemax']=725; +#$userdef[4]['imagemay']=52; +#$userdef[4]['maxcount']=575; +#$userdef[4]['XcorrectMainText']=25; +#$userdef[4]['logrotatelines']=30; +# +################# +## Userdef: x +# +#$userdef[x]['name']=''; #........ diff --git a/fhem/webfrontend/pgm3/include/gnuplot.php b/fhem/webfrontend/pgm3/include/gnuplot.php index 8d33b4381..4f7c7b4d7 100644 --- a/fhem/webfrontend/pgm3/include/gnuplot.php +++ b/fhem/webfrontend/pgm3/include/gnuplot.php @@ -15,6 +15,7 @@ function drawgnuplot($gnudraw,$gnutyp,$gnuplot,$pictype,$logpath,$FHTyrange,$FHT $userdefnr=$FHTy2range; # workaround + $gnuplottype= $userdef['gnuplottype']; $logfile= $userdef['logpath']; $drawuserdef=$userdef['name']; $SemanticLong=$userdef['semlong']; @@ -22,6 +23,9 @@ function drawgnuplot($gnudraw,$gnutyp,$gnuplot,$pictype,$logpath,$FHTyrange,$FHT $valuefield=$userdef['valuefield']; $type='UserDef '.$userdefnr; $IN="$gnudraw ($gnutyp $userdefnr)"; + if ($gnuplottype=='piri') $gnutyp='piri'; + if ($gnuplottype=='fs20') $gnutyp='FS20'; + } else { @@ -54,11 +58,13 @@ $xrange="set xrange ['$xrange2':'$xrange1'] switch ($gnutyp): Case FS20: ############################################ $gplotmain=<< "; if ($showuserdefgnu == $UserDef and $showgnuplot == 1) - { drawgnuplot($UserDef,$type,$gnuplot,$pictype,$logpath,$userdef[$i],1); + { drawgnuplot($UserDef,$type,$gnuplot,$pictype,$logpath,$userdef[$i],$i); $UserDef1=$UserDef.'1'; echo "