From ab0076aaa41fea88344cfda987124d53be62d9f3 Mon Sep 17 00:00:00 2001 From: nitroxmh Date: Tue, 8 May 2012 09:06:39 +0000 Subject: [PATCH] Feature, new version with homematic and different Buttons fuer FS20 git-svn-id: https://svn.fhem.de/fhem/trunk@1546 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/webfrontend/pgm3/CHANGED | 3 +- fhem/webfrontend/pgm3/HISTORY | 3 + fhem/webfrontend/pgm3/config.php | 847 +++--- fhem/webfrontend/pgm3/include/dblog.php | 16 + fhem/webfrontend/pgm3/include/fs20.php | 282 +- .../webfrontend/pgm3/include/fs20pulldown.php | 218 +- fhem/webfrontend/pgm3/include/gnuplot.php | 2 +- fhem/webfrontend/pgm3/include/hmpulldown.php | 131 + .../webfrontend/pgm3/include/img/FS20.off.png | Bin 0 -> 2281 bytes fhem/webfrontend/pgm3/include/img/FS20.on.png | Bin 0 -> 2044 bytes fhem/webfrontend/pgm3/include/img/dim06%.png | Bin 0 -> 2328 bytes fhem/webfrontend/pgm3/include/img/dim100%.png | Bin 0 -> 2324 bytes fhem/webfrontend/pgm3/include/img/dim12%.png | Bin 0 -> 2328 bytes fhem/webfrontend/pgm3/include/img/dim18%.png | Bin 0 -> 2331 bytes fhem/webfrontend/pgm3/include/img/dim25%.png | Bin 0 -> 2329 bytes fhem/webfrontend/pgm3/include/img/dim31%.png | Bin 0 -> 2330 bytes fhem/webfrontend/pgm3/include/img/dim37%.png | Bin 0 -> 2328 bytes fhem/webfrontend/pgm3/include/img/dim43%.png | Bin 0 -> 2331 bytes fhem/webfrontend/pgm3/include/img/dim50%.png | Bin 0 -> 2328 bytes fhem/webfrontend/pgm3/include/img/dim56%.png | Bin 0 -> 2331 bytes fhem/webfrontend/pgm3/include/img/dim62%.png | Bin 0 -> 2334 bytes fhem/webfrontend/pgm3/include/img/dim68%.png | Bin 0 -> 2326 bytes fhem/webfrontend/pgm3/include/img/dim75%.png | Bin 0 -> 2328 bytes fhem/webfrontend/pgm3/include/img/dim81%.png | Bin 0 -> 2326 bytes fhem/webfrontend/pgm3/include/img/dim87%.png | Bin 0 -> 2326 bytes fhem/webfrontend/pgm3/include/img/dim93%.png | Bin 0 -> 2329 bytes fhem/webfrontend/pgm3/include/img/dimdown.png | Bin 0 -> 2582 bytes fhem/webfrontend/pgm3/include/img/dimup.png | Bin 0 -> 2582 bytes .../pgm3/include/img/off-for-timer.png | Bin 0 -> 3141 bytes fhem/webfrontend/pgm3/include/img/off.png | Bin 0 -> 1682 bytes .../pgm3/include/img/on-for-timer.png | Bin 0 -> 2984 bytes fhem/webfrontend/pgm3/include/img/on-till.png | Bin 0 -> 2984 bytes fhem/webfrontend/pgm3/include/img/on.png | Bin 0 -> 2044 bytes .../pgm3/include/img/switch.off.png | Bin 0 -> 427 bytes .../pgm3/include/img/switch.on.png | Bin 0 -> 430 bytes .../include/img/switch_gn.off-for-timer.png | Bin 0 -> 1388 bytes .../pgm3/include/img/switch_gn.off.png | Bin 0 -> 359 bytes .../include/img/switch_gn.on-for-timer.png | Bin 0 -> 1377 bytes .../pgm3/include/img/switch_gn.on.png | Bin 0 -> 355 bytes .../include/img/switch_rt.off-for-timer.png | Bin 0 -> 1388 bytes .../pgm3/include/img/switch_rt.off.png | Bin 0 -> 359 bytes .../include/img/switch_rt.on-for-timer.png | 0 .../pgm3/include/img/switch_rt.on.png | Bin 0 -> 350 bytes fhem/webfrontend/pgm3/include/img/toggle.png | Bin 0 -> 3242 bytes fhem/webfrontend/pgm3/index.php | 2394 +++++++++-------- 45 files changed, 2125 insertions(+), 1771 deletions(-) create mode 100644 fhem/webfrontend/pgm3/include/dblog.php create mode 100644 fhem/webfrontend/pgm3/include/hmpulldown.php create mode 100644 fhem/webfrontend/pgm3/include/img/FS20.off.png create mode 100644 fhem/webfrontend/pgm3/include/img/FS20.on.png create mode 100644 fhem/webfrontend/pgm3/include/img/dim06%.png create mode 100644 fhem/webfrontend/pgm3/include/img/dim100%.png create mode 100644 fhem/webfrontend/pgm3/include/img/dim12%.png create mode 100644 fhem/webfrontend/pgm3/include/img/dim18%.png create mode 100644 fhem/webfrontend/pgm3/include/img/dim25%.png create mode 100644 fhem/webfrontend/pgm3/include/img/dim31%.png create mode 100644 fhem/webfrontend/pgm3/include/img/dim37%.png create mode 100644 fhem/webfrontend/pgm3/include/img/dim43%.png create mode 100644 fhem/webfrontend/pgm3/include/img/dim50%.png create mode 100644 fhem/webfrontend/pgm3/include/img/dim56%.png create mode 100644 fhem/webfrontend/pgm3/include/img/dim62%.png create mode 100644 fhem/webfrontend/pgm3/include/img/dim68%.png create mode 100644 fhem/webfrontend/pgm3/include/img/dim75%.png create mode 100644 fhem/webfrontend/pgm3/include/img/dim81%.png create mode 100644 fhem/webfrontend/pgm3/include/img/dim87%.png create mode 100644 fhem/webfrontend/pgm3/include/img/dim93%.png create mode 100644 fhem/webfrontend/pgm3/include/img/dimdown.png create mode 100644 fhem/webfrontend/pgm3/include/img/dimup.png create mode 100644 fhem/webfrontend/pgm3/include/img/off-for-timer.png create mode 100644 fhem/webfrontend/pgm3/include/img/off.png create mode 100644 fhem/webfrontend/pgm3/include/img/on-for-timer.png create mode 100644 fhem/webfrontend/pgm3/include/img/on-till.png create mode 100644 fhem/webfrontend/pgm3/include/img/on.png create mode 100644 fhem/webfrontend/pgm3/include/img/switch.off.png create mode 100644 fhem/webfrontend/pgm3/include/img/switch.on.png create mode 100644 fhem/webfrontend/pgm3/include/img/switch_gn.off-for-timer.png create mode 100644 fhem/webfrontend/pgm3/include/img/switch_gn.off.png create mode 100644 fhem/webfrontend/pgm3/include/img/switch_gn.on-for-timer.png create mode 100644 fhem/webfrontend/pgm3/include/img/switch_gn.on.png create mode 100644 fhem/webfrontend/pgm3/include/img/switch_rt.off-for-timer.png create mode 100644 fhem/webfrontend/pgm3/include/img/switch_rt.off.png create mode 100644 fhem/webfrontend/pgm3/include/img/switch_rt.on-for-timer.png create mode 100644 fhem/webfrontend/pgm3/include/img/switch_rt.on.png create mode 100644 fhem/webfrontend/pgm3/include/img/toggle.png diff --git a/fhem/webfrontend/pgm3/CHANGED b/fhem/webfrontend/pgm3/CHANGED index 47f57bc18..ff6d5baa1 100644 --- a/fhem/webfrontend/pgm3/CHANGED +++ b/fhem/webfrontend/pgm3/CHANGED @@ -220,4 +220,5 @@ It is not necessary to tell fhem that there are other logs. 2012-05-07 -- Bugfix: userdefs.php works with new gnuplot-version - +2012-05-08 + -- Feature: homematic added, FS20-Buttons now different depending of the state diff --git a/fhem/webfrontend/pgm3/HISTORY b/fhem/webfrontend/pgm3/HISTORY index a0df77e71..9287aec3c 100644 --- a/fhem/webfrontend/pgm3/HISTORY +++ b/fhem/webfrontend/pgm3/HISTORY @@ -122,3 +122,6 @@ - Martin 2012-05-07 -- bugfix: userdefs.php. Now wokrs with new Gnuplot (imagecopy) + +. Martin 2012-05-08 + -- Feature: Homematic added, FS20-Buttons now depending of the state diff --git a/fhem/webfrontend/pgm3/config.php b/fhem/webfrontend/pgm3/config.php index 30a19cdb1..0f059d0bb 100644 --- a/fhem/webfrontend/pgm3/config.php +++ b/fhem/webfrontend/pgm3/config.php @@ -1,428 +1,419 @@ - global" - $fhemport="7072"; # port of fhem.pl - $logpath="/var/tmp/"; # where are your logs? Use a writabel nfs-share if pgm3 and fhem are not on the same machine - $AbsolutPath="/var/www/"; # where ist your pgm3? - -###### DBlog instead of Filelogs -- only for experienced Users! -## Look at contrib/dblog and http://fhemwiki.de for further information - $DBUse="0"; # Wanna use DB-Logging instead of File-Logging? Use 1 for ye s and 0 for no. - $DBNode="localhost"; # On which machine is your db running? - $DBName="fhem"; # Whats the name of your DB for fhem? - $DBUser="USER"; # Enter the username to connect to the DB. - $DBPass="PASSWD"; # Enter the password which is needed to connect to the DB - - -################################################################################## -###### nice to have - - - - - -##### logrotate of hms, ks300, fht - # this is only possible, if the webserver (e.g.wwwrun) has the rights ro write the - # files from fhem.pl. If you want that then run fhem.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='yes' - - -## Kioskmode. Only show but don't switch anything. Values: on/off - $kioskmode='off'; - - -## Webcams - $showwebcam=0; #shows webcam-Urls or other pictures (0/1) - $webcamwidth='150'; # the width of the shown picture - $wgetpath="/usr/bin/wget"; # you need the package wget for http, ftp... - $webcamroom='donthide'; # existing room. Otherwise it will either - # be in ALL or wiht 'donthide' not hided - $webcam[0]='http://webcam/IMAGE.JPG'; - $webcam[1]='http://webcam2/IMAGE.JPG'; - #$webcam[1]='http://www.bostream.nu/hoganas/OutsideTempHistory.gif'; - #$webcam[1]='IMAGE.PNG'; # Supported are Webcams with http:// ftp:// .... - # and Images wich must be copied to /tmp/ - -# $webcam[2]='http://...'; -# ... - - -# Weather # Google-Api. It requires an Internet Connection - $enableweather=0; # show the google-weather? - $weathercity='Linden'; - $weathercountry='Germany'; - $weatherlang='de'; - #$weatherlang='en'; - $weatherroom='donthide'; # existing room. Otherwise it will either - # be in ALL or with 'donthide' not hided - - -############################################################################################## -## FHZ-DEVICES - $show_general=1; #field to type FHZ1000-orders 0/1 Default:1 - $show_fs20pulldown=1; #Pull-Down for the FS20 Devices 0/1 Default:1 - $show_fhtpulldown=1; #Pull-Down for the FHT-Devices 0/1 Default:1 - $show_logpulldown=1; #Pull-Down for Log-files and FS20 (grep fhem.log) - $logsort='| sort -r'; #sort the Log-Output how you want; - -############################################################################################## -# ATTENTION: the changes of sizes only affects after the next build of pictures! -# or delete the old pictures: rm /tmp/* -############################################################################################## -## FS20-Device, adjust it if you have e.g. long titles - $imgmaxxfs20=85; #Size of the pictures, default=85 - $imgmaxyfs20=85; # default=85 - $fs20fontsizetitel=10; # default=10 - $fs20maxiconperline=9; # default=9 - - #room. Write e.g. "attr rolowz room wzo" - #into your fhem.cfg and restart fhem.pl - # this will be marked on the FS20-Button. - $txtroom=""; # default=""; example: $txtroom="room: "; - # room hidden will not be shown - -############################################################################################## -## ROOMS adjust it if you have e.g. long titles - $showroombuttons=1; #default 1 Values 0/1 - $imgmaxxroom=$imgmaxxfs20; #Size of the pictures, default=$imgmaxxfs20 - $imgmaxyroom=30; # default=30 - $roomfontsizetitel=10; # default=9 - $roommaxiconperline=$fs20maxiconperline; # default=$fs20maxiconperline - -############################################################################################## - -## FHT-Devices - $imgmaxxfht=725; #Size of the pictures Default: 725 - $imgmaxyfht=52; - $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='14:31'; # Temperature in gnuplot. Default 14 to 31 (Celsius) - $FHTy2range='0:70'; # Actuator in gnuplot. Default 0 to 70 (Percent) - $maxcount='510'; # Maximum count of pixel (from right to left) (Default:460) - $XcorrectDate=380; # Text of e.g. Date from the right side (Default:380) - $XcorrectMainText=32; # Text of main text from the right side (Default: 32) - $logrotateFHTlines=8200; # automatic Logrotate; $logrotate must be 'yes'. - # Default:8200 - # 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 fhem.pl (user = ???) - - - - -############################################################################################## -## HMS-Devices - $imgmaxxhms=725; #Size of the pictures. Default: 725 - $imgmaxyhms=52; - $maxcountHMS='575'; # Maximum count of pixel (from right to left) (Default:575) - $XcorrectMainTextHMS=25; # Text of main text from the right side (Default:) - $showdewpoint='yes'; # Dewpoint (german: taupunkt) - $logrotateHMSlines=1500; # automatic Logrotate; $logrotate must be 'yes'. - # Default:1500 - # 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 fhem.pl (user = ???) - -############################################################################################## -## KS300-Device - $imgmaxxks=725; #Size of the pictures Default: 725 - - $imgmaxyks=52; - $showbft=1; # Display values additionaly in Beafort. Values: 0 /1 Default:1 - $maxcountKS='575'; # Maximum count of pixel (from right to left) (Default:575) - $showdewpointks300='yes'; # Dewpoint (german: taupunkt) - $XcorrectMainTextKS=45; # Text of main text from the right side (Default: 35) - - $logrotateKS300lines=13000; # automatic Logrotate; $logrotate must be 'yes'. - # Default: 13000 - # 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 fhem.pl (user = ???) - -############################################################################################## -## USERDEF -# -# Create your own graphics! If you have separate Programs (e.g. wired devices) then create your own -# logfile and tell pgm3 to use it. -# We only need a data/time-field in the form _