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
@ -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
|
||||
|
@ -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
|
||||
|
@ -1,428 +1,419 @@
|
||||
<?php
|
||||
|
||||
##################################################################################
|
||||
#### pgm3 -- a PHP-webfrontend for fhem.pl
|
||||
|
||||
### Look at http://www.fhemwiki.de for more information
|
||||
|
||||
|
||||
###### required settings
|
||||
$fhem="localhost"; #only php5 is supported! On which machine is fhem runnning??
|
||||
# it needs not to be on the same machine as fhem
|
||||
# if it is not localhost then the fhem.cfg must
|
||||
# run global: "attr global port <nr> 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 <pgm3>/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 <pgm>/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 <date>_<time>, e.g. 2007-10-13_13:45:14
|
||||
# and a field with a numeric value e.g. 0.0
|
||||
|
||||
#Example:
|
||||
####################################################
|
||||
# 2007-10-13_13:45:14 solarI Is: 0.0 Vs: 4.5 T: 22
|
||||
####################################################
|
||||
# Field1: 2007-10-13_13:45:14
|
||||
# Field2: solarI
|
||||
# Field3: Is:
|
||||
# Field4: 0.0
|
||||
#...
|
||||
# Field1 must be the date/time-field. Then tell pgm3 with $userdef[x]['valuefield'] (see below)
|
||||
# the field with the needed value. It is possible to create several graphics with one logfile.
|
||||
|
||||
|
||||
# Do you want user defined graphics? 1/0 Default: 0
|
||||
$UserDefs=0;
|
||||
|
||||
#####################
|
||||
## Userdef: 0
|
||||
|
||||
# the sortnumbers must be complete. eg. 0 1 2 3 or 2 0 3 1 and so on
|
||||
#$sortnumber=0;
|
||||
|
||||
# No blanks or other special signs!!
|
||||
#$userdef[$sortnumber]['name']='SolarV';
|
||||
|
||||
#In which field are the values?? See the example above
|
||||
#$userdef[$sortnumber]['valuefield']=4;
|
||||
|
||||
#Type of Device [temperature | piri | fs20] pgm3 will try to generate a gnuplot picture
|
||||
#$userdef[$sortnumber]['gnuplottype']='temperature';
|
||||
|
||||
# example, path to the logfile with the entrys like above
|
||||
#$userdef[$sortnumber]['logpath']=$logpath.'/lse_solarV.log';
|
||||
|
||||
#$userdef[$sortnumber]['room']='garden';
|
||||
|
||||
# Semantic eg. Voltage
|
||||
#$userdef[$sortnumber]['semlong']='Voltage';
|
||||
|
||||
# Semantic short e.g. V
|
||||
#$userdef[$sortnumber]['semshort']='V';
|
||||
|
||||
#Size of the pictures. Default: 725
|
||||
#$userdef[$sortnumber]['imagemax']=725;
|
||||
#$userdef[$sortnumber]['imagemay']=52;
|
||||
|
||||
# Maximum count of pixel (from right to left) (Default:575)
|
||||
#$userdef[$sortnumber]['maxcount']=575;
|
||||
|
||||
# Text of main text from the right side (Default:)
|
||||
#$userdef[$sortnumber]['XcorrectMainText']=25;
|
||||
|
||||
# automatic Logrotate; $logrotate must be 'yes'.
|
||||
# Default:2200
|
||||
# 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
|
||||
# of fhem.pl (user = ???)
|
||||
#$userdef[$sortnumber]['logrotatelines']=2200;
|
||||
|
||||
|
||||
########################
|
||||
# example:
|
||||
#define solarpumpe.log FileLog /var/tmp/solarpumpe.log solarpumpe:.*(on|off).*
|
||||
$sortnumber=0;
|
||||
$userdef[$sortnumber]['name']='PiriO';
|
||||
$userdef[$sortnumber]['name']='SolarPumpe';
|
||||
$userdef[$sortnumber]['valuefield']=3;
|
||||
$userdef[$sortnumber]['gnuplottype']='fs20';
|
||||
$userdef[$sortnumber]['logpath']='/mnt/fhz/solarpumpe.log';
|
||||
$userdef[$sortnumber]['room']='cellar';
|
||||
$userdef[$sortnumber]['semlong']='Solarpumpe';
|
||||
$userdef[$sortnumber]['semshort']='';
|
||||
$userdef[$sortnumber]['imagemax']=725;
|
||||
$userdef[$sortnumber]['imagemay']=52;
|
||||
$userdef[$sortnumber]['maxcount']=575;
|
||||
$userdef[$sortnumber]['XcorrectMainText']=25;
|
||||
$userdef[$sortnumber]['logrotatelines']=50;
|
||||
|
||||
|
||||
##########################
|
||||
# example:
|
||||
#define rolu1.log FileLog /var/tmp/rolu1.log rolu1:.*(on|off|dimup|dimdown).*
|
||||
#$sortnumber=2;
|
||||
#$userdef[$sortnumber]['name']='Rolu1';
|
||||
#$userdef[$sortnumber]['valuefield']=3;
|
||||
#$userdef[$sortnumber]['gnuplottype']='fs20';
|
||||
#$userdef[$sortnumber]['logpath']='/var/tmp/rolu1.log';
|
||||
#$userdef[$sortnumber]['room']='wgu';
|
||||
#$userdef[$sortnumber]['semlong']='Rolladen';
|
||||
#$userdef[$sortnumber]['semshort']='';
|
||||
#$userdef[$sortnumber]['imagemax']=725;
|
||||
#$userdef[$sortnumber]['imagemay']=52;
|
||||
#$userdef[$sortnumber]['maxcount']=575;
|
||||
#$userdef[$sortnumber]['XcorrectMainText']=25;
|
||||
#$userdef[$sortnumber]['logrotatelines']=30;
|
||||
|
||||
##########################
|
||||
# example:
|
||||
#define rolu1.log FileLog /var/tmp/rolu1.log rolu1:.*(on|off|dimup|dimdown).*
|
||||
$sortnumber=1;
|
||||
$userdef[$sortnumber]['name']='allight';
|
||||
$userdef[$sortnumber]['valuefield']=3;
|
||||
$userdef[$sortnumber]['gnuplottype']='fs20';
|
||||
$userdef[$sortnumber]['logpath']='/mnt/fhz/allight.log';
|
||||
$userdef[$sortnumber]['room']='alarm';
|
||||
$userdef[$sortnumber]['semlong']='Alarm light';
|
||||
$userdef[$sortnumber]['semshort']='';
|
||||
$userdef[$sortnumber]['imagemax']=725;
|
||||
$userdef[$sortnumber]['imagemay']=52;
|
||||
$userdef[$sortnumber]['maxcount']=575;
|
||||
$userdef[$sortnumber]['XcorrectMainText']=25;
|
||||
$userdef[$sortnumber]['logrotatelines']=30;
|
||||
##########################
|
||||
|
||||
|
||||
#$sortnumber=2;
|
||||
#$userdef[$sortnumber]['name']='tARV';
|
||||
#$userdef[$sortnumber]['valuefield']=3;
|
||||
#$userdef[$sortnumber]['gnuplottype']='temperature';
|
||||
#$userdef[$sortnumber]['logpath']='/mnt/fhz/t_arv.log';
|
||||
##$userdef[$sortnumber]['logpath']='/mnt/fhz/allight.log';
|
||||
#$userdef[$sortnumber]['room']='Hautpg';
|
||||
#$userdef[$sortnumber]['semlong']='tARV';
|
||||
#$userdef[$sortnumber]['semshort']='°C';
|
||||
#$userdef[$sortnumber]['imagemax']=725;
|
||||
#$userdef[$sortnumber]['imagemay']=52;
|
||||
##$userdef[$sortnumber]['maxcount']=575;
|
||||
#$userdef[$sortnumber]['XcorrectMainText']=25;
|
||||
#$userdef[$sortnumber]['logrotatelines']=2200;
|
||||
|
||||
|
||||
|
||||
|
||||
# example:
|
||||
#define rolu1.log FileLog /var/tmp/rolu1.log rolu1:.*(on|off|dimup|dimdown).*
|
||||
#$sortnumber=5;
|
||||
#$userdef[$sortnumber]['name']='FS10';
|
||||
#$userdef[$sortnumber]['valuefield']=2;
|
||||
#$userdef[$sortnumber]['gnuplottype']='temperature';
|
||||
#$userdef[$sortnumber]['logpath']='/var/tmp/wspd_7.gnu';
|
||||
#$userdef[$sortnumber]['timeformat']='%Y/%m/%d %H:%M:%S';
|
||||
#$userdef[$sortnumber]['room']='hidden';
|
||||
#$userdef[$sortnumber]['semlong']='FS10';
|
||||
#$userdef[$sortnumber]['semshort']='°C';
|
||||
#$userdef[$sortnumber]['imagemax']=725;
|
||||
#$userdef[$sortnumber]['imagemay']=52;
|
||||
#$userdef[$sortnumber]['maxcount']=575;
|
||||
#$userdef[$sortnumber]['XcorrectMainText']=25;
|
||||
#$userdef[$sortnumber]['logrotatelines']=3300;
|
||||
#################
|
||||
## Userdef: x
|
||||
#
|
||||
#$userdef[x]['name']='';
|
||||
#........
|
||||
|
||||
|
||||
|
||||
########################
|
||||
|
||||
###### showgnuplot
|
||||
# Gnuplot will automatically show the pictures.
|
||||
# There is no reason any more to deactivate Gnuplot. Values: 0/1
|
||||
$showgnuplot=1;
|
||||
$gnuplot='/usr/bin/gnuplot'; # location of gnuplot
|
||||
$pictype='png';
|
||||
|
||||
|
||||
|
||||
##############################################################################################
|
||||
## misc
|
||||
$taillog=1; #make shure to have the correct rights. Values: 0/1
|
||||
$tailcount=30; #make shure to have the correct rights. Values: 0/1
|
||||
$tailpath="/usr/bin/tail";
|
||||
#$taillogorder=$tailpath." -$tailcount $logpath/fhem.log ";
|
||||
$taillogorder=$tailpath." -$tailcount $logpath/fhem-" . date("Y") . "-" . date("m") . ".log "; #if you have e.g. fhem-2009-02.log
|
||||
|
||||
|
||||
|
||||
## show Information at STARTUP.
|
||||
$showLOGS='no'; #show the entrys of the LOGS in the
|
||||
#fhem.cfg at startup. Default: no Values: yes/no
|
||||
$showAT='no'; #show the AT_JOBS at startup. Default: yes 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
|
||||
$showPICS='no'; #if shwowebcam=1 then initial the Pics will be shown. Default: yes
|
||||
$showWeath='yes'; # Show weather on startup? $enableweather must 1
|
||||
|
||||
$RSStitel='FHEM :-)';
|
||||
|
||||
$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"; #English
|
||||
$timeformat="d.m.Y H:i:s"; # German
|
||||
$winsize=800; # width of the pgm3
|
||||
|
||||
|
||||
|
||||
##########################
|
||||
##### SKINS - change your colors
|
||||
# Look at http://www.farb-tabelle.de/de/farbtabelle.htm for colors
|
||||
## DEFAULT
|
||||
$bodybg="bgcolor='#F5F5F5'";
|
||||
$bg1="bgcolor='#6E94B7'"; # e.g. Header
|
||||
$bg2="bgcolor='#AFC6DB'"; # e.g. behind the buttons
|
||||
$bg4="bgcolor='#6394BD'"; # border around all
|
||||
$bg5="bgcolor='#FFFFFF'"; # between the tables
|
||||
$fontcolor1="color='#FFFFFF'";
|
||||
$fontcolor3="color='#143554'";
|
||||
# The Button needs decimal Code Instead Hex.
|
||||
# Use the column left from the HEX.
|
||||
# You must delete the old graphics after the change. "rm <pgm3>/tmp/*"
|
||||
$buttonBg_R='175';$buttonBg_G='198';$buttonBg_B='219';
|
||||
$bg1_R='110';$bg1_G='148';$bg1_B='181';
|
||||
##########################
|
||||
##ORANGE
|
||||
#$bodybg="bgcolor='#FFDAB9'";
|
||||
#$bg1="bgcolor='#FF8C00'";
|
||||
#$bg2="bgcolor='#FFA500'";
|
||||
#$bg4="bgcolor='#6394BD'";
|
||||
#$bg5="bgcolor='#FFFFFF'";
|
||||
#$fontcolor1="color='#000000'";
|
||||
#$fontcolor3="color='#000000'";
|
||||
# The Button needs decimal Code Instead Hex.
|
||||
# Use the column left from the HEX on
|
||||
# http://www.farb-tabelle.de/de/farbtabelle.htm
|
||||
# You must delete the old graphics after the change. "rm <pgm3>/tmp/*"
|
||||
#$buttonBg_R='255';$buttonBg_G='165';$buttonBg_B='0';
|
||||
#Dec-Code from $bg1:
|
||||
#$bg1_R='255';$bg1_G='140';$bg1_B='0';
|
||||
|
||||
|
||||
|
||||
|
||||
##########################
|
||||
$fontcol_grap_R=20;
|
||||
$fontcol_grap_G=53;
|
||||
$fontcol_grap_B=84;
|
||||
$fontttf="Vera";
|
||||
$fontttfb="VeraBd"; ##copyright of the fonts: docs/copyright_font
|
||||
## if there is now graphic try the following:
|
||||
# $fontttf="Vera.ttf";
|
||||
# $fontttfb="VeraBd.ttf";
|
||||
# or absolut:
|
||||
# $fontttf="/srv/www/htdocs/fhz/include/Vera.ttf";
|
||||
# $fontttfb="/srv/www/htdocs/fhz/include/VeraBd.ttf";
|
||||
|
||||
|
||||
|
||||
|
||||
############################### end of settings
|
||||
putenv('GDFONTPATH=' . realpath('.'));
|
||||
|
||||
|
||||
|
||||
### If DB-query is used, this is the only point of connect. ###
|
||||
if ($DBUse=="1") {
|
||||
@mysql_connect($DBNode, $DBUser, $DBPass) or die("Can't connect");
|
||||
@mysql_select_db($DBName) or die("No database found");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<?php
|
||||
|
||||
##################################################################################
|
||||
#### pgm3 -- a PHP-webfrontend for fhem.pl
|
||||
|
||||
### Look at http://www.fhemwiki.de for more information
|
||||
|
||||
|
||||
###### required settings
|
||||
#$fhem="fritz.box"; # only php5 is supported! On which machine is fhem runnning??
|
||||
$fhem="localhost"; # only php5 is supported! On which machine is fhem runnning??
|
||||
# it needs not to be on the same machine as fhem
|
||||
# if it is not localhost then the fhem.cfg must
|
||||
# run global: "attr global port <nr> global"
|
||||
$fhemport="7072"; # port of fhem.pl
|
||||
#$logpath="/mnt/fritzbox/"; # where are your logs? Use a writabel nfs-share if pgm3 and fhem are not on the same machine
|
||||
#mount your fritzbox with something like this in the /etc/fstab: //fritz.box/fritz.nas /mnt/fritzbox cifs guest 0 0
|
||||
$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 <pgm3>/tmp/
|
||||
|
||||
# $webcam[2]='http://...';
|
||||
# ...
|
||||
|
||||
|
||||
# Weather # Google-Api. It requires an Internet Connection
|
||||
$enableweather=1; # show the google-weather?
|
||||
$weathercity='Butzbach';
|
||||
$weathercountry='Germany';
|
||||
$weatherlang='de';
|
||||
#$weatherlang='en';
|
||||
$weatherroom='donthide'; # existing room. Otherwise it will either
|
||||
# $weatherroom='(19)Garten'; # 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_hmpulldown=1; #Pull-Down for the HomeMatic 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 <pgm>/tmp/*
|
||||
##############################################################################################
|
||||
## FS20-Device, adjust it if you have e.g. long titles
|
||||
|
||||
#$imgmaxxfs20=166; # Size of the pictures, default=85
|
||||
$imgmaxxfs20=115; # Size of the pictures, default=115
|
||||
$imgmaxyfs20=75; # default=75
|
||||
$fs20fontsizetitel=10; # default=10
|
||||
$fs20maxiconperline=7; # default=r79
|
||||
|
||||
# look at http://fhemwiki.de for explanations
|
||||
$roomname='0'; # Show Roomname on Button [1|0]
|
||||
$roomcorr='5'; # Correction for Iconposition if roomname = 0 [n]
|
||||
$dategerman='1'; # Date in German Format (25.03.2012) [1|0]
|
||||
$umlaute='1'; # Changes "ue" in "ü"... [1|0]
|
||||
$namesortbutton='1'; # [1|0]
|
||||
$namesortbuttonsign='_'; # If $namesortbutton = 1 the Sign "_" will replace with " " [x]
|
||||
$namereplacebutton='1'; # Changes "This_is_a_Test" in "This is a Test" [1|0]
|
||||
$namereplacebuttonsign='_'; # If $namereplaceroom = 1 the Sign "_" will replace with " " [x]
|
||||
|
||||
# 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=22; # default=30
|
||||
$roomfontsizetitel=10; # default=9
|
||||
$roommaxiconperline=$fs20maxiconperline; # default=$fs20maxiconperline
|
||||
|
||||
$namesortroom='1'; # [1|0]
|
||||
$namesortroomsign=')'; # If $namesortroom = 1 the Sign ")" will replace with " " [x]
|
||||
$namereplaceroom='1'; # Changes "This_is_a_Test" in "This is a Test" [1|0]
|
||||
$namereplaceroomsign='_'; # If $namereplaceroom = 1 the Sign "_" will replace with " " [x]
|
||||
|
||||
##############################################################################################
|
||||
|
||||
## 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 <date>_<time>, e.g. 2007-10-13_13:45:14
|
||||
# and a field with a numeric value e.g. 0.0
|
||||
|
||||
#Example:
|
||||
####################################################
|
||||
# 2007-10-13_13:45:14 solarI Is: 0.0 Vs: 4.5 T: 22
|
||||
####################################################
|
||||
# Field1: 2007-10-13_13:45:14
|
||||
# Field2: solarI
|
||||
# Field3: Is:
|
||||
# Field4: 0.0
|
||||
#...
|
||||
# Field1 must be the date/time-field. Then tell pgm3 with $userdef[x]['valuefield'] (see below)
|
||||
# the field with the needed value. It is possible to create several graphics with one logfile.
|
||||
|
||||
|
||||
# Do you want user defined graphics? 1/0 Default: 0
|
||||
$UserDefs=0;
|
||||
|
||||
#####################
|
||||
## Userdef: 0
|
||||
|
||||
# the sortnumbers must be complete. eg. 0 1 2 3 or 2 0 3 1 and so on
|
||||
#$sortnumber=0;
|
||||
|
||||
# No blanks or other special signs!!
|
||||
#$userdef[$sortnumber]['name']='SolarV';
|
||||
|
||||
#In which field are the values?? See the example above
|
||||
#$userdef[$sortnumber]['valuefield']=4;
|
||||
|
||||
#Type of Device [temperature | piri | fs20] pgm3 will try to generate a gnuplot picture
|
||||
#$userdef[$sortnumber]['gnuplottype']='temperature';
|
||||
|
||||
# example, path to the logfile with the entrys like above
|
||||
#$userdef[$sortnumber]['logpath']=$logpath.'/lse_solarV.log';
|
||||
|
||||
#$userdef[$sortnumber]['room']='garden';
|
||||
|
||||
# Semantic eg. Voltage
|
||||
#$userdef[$sortnumber]['semlong']='Voltage';
|
||||
|
||||
# Semantic short e.g. V
|
||||
#$userdef[$sortnumber]['semshort']='V';
|
||||
|
||||
#Size of the pictures. Default: 725
|
||||
#$userdef[$sortnumber]['imagemax']=725;
|
||||
#$userdef[$sortnumber]['imagemay']=52;
|
||||
|
||||
# Maximum count of pixel (from right to left) (Default:575)
|
||||
#$userdef[$sortnumber]['maxcount']=575;
|
||||
|
||||
# Text of main text from the right side (Default:)
|
||||
#$userdef[$sortnumber]['XcorrectMainText']=25;
|
||||
|
||||
# automatic Logrotate; $logrotate must be 'yes'.
|
||||
# Default:2200
|
||||
# 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
|
||||
# of fhem.pl (user = ???)
|
||||
#$userdef[$sortnumber]['logrotatelines']=2200;
|
||||
|
||||
|
||||
########################
|
||||
# example:
|
||||
#define solarpumpe.log FileLog /var/tmp/solarpumpe.log solarpumpe:.*(on|off).*
|
||||
$sortnumber=0;
|
||||
$userdef[$sortnumber]['name']='SolarPumpe';
|
||||
#$userdef[$sortnumber]['name']='';
|
||||
$userdef[$sortnumber]['valuefield']=3;
|
||||
$userdef[$sortnumber]['gnuplottype']='fs20';
|
||||
$userdef[$sortnumber]['logpath']='/var/tmp/solarpumpe.log';
|
||||
$userdef[$sortnumber]['room']='cellar';
|
||||
$userdef[$sortnumber]['semlong']='Solarpumpe';
|
||||
$userdef[$sortnumber]['semshort']='';
|
||||
$userdef[$sortnumber]['imagemax']=725;
|
||||
$userdef[$sortnumber]['imagemay']=52;
|
||||
$userdef[$sortnumber]['maxcount']=575;
|
||||
$userdef[$sortnumber]['XcorrectMainText']=25;
|
||||
$userdef[$sortnumber]['logrotatelines']=50;
|
||||
##########################
|
||||
$sortnumber=1;
|
||||
$userdef[$sortnumber]['name']='netbook';
|
||||
$userdef[$sortnumber]['valuefield']=3;
|
||||
$userdef[$sortnumber]['gnuplottype']='fs20';
|
||||
$userdef[$sortnumber]['logpath']='/var/tmp/netbook.User.log';
|
||||
$userdef[$sortnumber]['room']='wgo';
|
||||
$userdef[$sortnumber]['semlong']='netbook';
|
||||
$userdef[$sortnumber]['semshort']='';
|
||||
$userdef[$sortnumber]['imagemax']=725;
|
||||
$userdef[$sortnumber]['imagemay']=52;
|
||||
$userdef[$sortnumber]['maxcount']=575;
|
||||
$userdef[$sortnumber]['XcorrectMainText']=25;
|
||||
$userdef[$sortnumber]['logrotatelines']=2000;
|
||||
##########################
|
||||
$sortnumber=2;
|
||||
$userdef[$sortnumber]['name']='PiriU';
|
||||
$userdef[$sortnumber]['valuefield']=3;
|
||||
$userdef[$sortnumber]['gnuplottype']='piri';
|
||||
$userdef[$sortnumber]['logpath']='/var/tmp/piriu.log';
|
||||
$userdef[$sortnumber]['room']='wgu';
|
||||
$userdef[$sortnumber]['semlong']='Piri unten';
|
||||
$userdef[$sortnumber]['semshort']='';
|
||||
$userdef[$sortnumber]['imagemax']=725;
|
||||
$userdef[$sortnumber]['imagemay']=52;
|
||||
$userdef[$sortnumber]['maxcount']=575;
|
||||
$userdef[$sortnumber]['XcorrectMainText']=25;
|
||||
$userdef[$sortnumber]['logrotatelines']=500;
|
||||
##########################
|
||||
#$sortnumber=3;
|
||||
#$userdef[$sortnumber]['name']='water';
|
||||
#$userdef[$sortnumber]['valuefield']=4;
|
||||
#$userdef[$sortnumber]['gnuplottype']='temperature';
|
||||
#$userdef[$sortnumber]['logpath']='/var/tmp/water.log';
|
||||
#$userdef[$sortnumber]['room']='cellar';
|
||||
#$userdef[$sortnumber]['semlong']='Water';
|
||||
#$userdef[$sortnumber]['semshort']='C';
|
||||
#$userdef[$sortnumber]['imagemax']=725;
|
||||
#$userdef[$sortnumber]['imagemay']=52;
|
||||
#$userdef[$sortnumber]['maxcount']=575;
|
||||
#$userdef[$sortnumber]['XcorrectMainText']=25;
|
||||
#$userdef[$sortnumber]['logrotatelines']=2000;
|
||||
|
||||
|
||||
|
||||
########################
|
||||
|
||||
###### showgnuplot
|
||||
# Gnuplot will automatically show the pictures.
|
||||
# There is no reason any more to deactivate Gnuplot. Values: 0/1
|
||||
$showgnuplot=1;
|
||||
$gnuplot='/usr/bin/gnuplot'; # location of gnuplot
|
||||
$pictype='png';
|
||||
|
||||
|
||||
|
||||
##############################################################################################
|
||||
## misc
|
||||
$taillog=1; #make shure to have the correct rights. Values: 0/1
|
||||
$tailcount=30; #make shure to have the correct rights. Values: 0/1
|
||||
$tailpath="/usr/bin/tail";
|
||||
#$taillogorder=$tailpath." -$tailcount $logpath/fhem.log ";
|
||||
$taillogorder=$tailpath." -$tailcount $logpath/fhem-" . date("Y") . "-" . date("m") . ".log "; #if you have e.g. fhem-2009-02.log
|
||||
|
||||
|
||||
|
||||
## show Information at STARTUP.
|
||||
$showLOGS='no'; #show the entrys of the LOGS in the
|
||||
#fhem.cfg at startup. Default: no Values: yes/no
|
||||
$showAT='no'; #show the AT_JOBS at startup. Default: yes 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
|
||||
#$showPICS='no'; #if shwowebcam=1 then initial the Pics will be shown. Default: yes
|
||||
$showPICS='yes'; #if shwowebcam=1 then initial the Pics will be shown. Default: yes
|
||||
$showWeath='yes'; # Show weather on startup? $enableweather must 1
|
||||
|
||||
$RSStitel='FHEM';
|
||||
|
||||
$urlreload=60; # 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"; # English
|
||||
$timeformat="d.m.Y H:i:s"; # German
|
||||
$winsize=800; # width of the pgm3
|
||||
#$winsize="100%"; # width of the pgm3
|
||||
|
||||
|
||||
|
||||
##########################
|
||||
##### SKINS - change your colors
|
||||
# Look at http://www.farb-tabelle.de/de/farbtabelle.htm for colors
|
||||
## DEFAULT
|
||||
$bodybg="bgcolor='#F5F5F5'";
|
||||
$bg1="bgcolor='#6E94B7'"; # e.g. Header
|
||||
$bg2="bgcolor='#AFC6DB'"; # e.g. behind the buttons
|
||||
$bg4="bgcolor='#6394BD'"; # border around all
|
||||
$bg5="bgcolor='#FFFFFF'"; # between the tables
|
||||
$fontcolor1="color='#FFFFFF'";
|
||||
$fontcolor3="color='#143554'";
|
||||
# The Button needs decimal Code Instead Hex.
|
||||
# Use the column left from the HEX.
|
||||
# You must delete the old graphics after the change. "rm <pgm3>/tmp/*"
|
||||
$buttonBg_R='175';$buttonBg_G='198';$buttonBg_B='219';
|
||||
$bg1_R='110';$bg1_G='148';$bg1_B='181';
|
||||
|
||||
##########################
|
||||
##ORANGE
|
||||
#$bodybg="bgcolor='#FFDAB9'";
|
||||
#$bg1="bgcolor='#FF8C00'";
|
||||
#$bg2="bgcolor='#FFA500'";
|
||||
#$bg4="bgcolor='#6394BD'";
|
||||
#$bg5="bgcolor='#FFFFFF'";
|
||||
#$fontcolor1="color='#000000'";
|
||||
#$fontcolor3="color='#000000'";
|
||||
# The Button needs decimal Code Instead Hex.
|
||||
# Use the column left from the HEX on
|
||||
# http://www.farb-tabelle.de/de/farbtabelle.htm
|
||||
# You must delete the old graphics after the change. "rm <pgm3>/tmp/*"
|
||||
#$buttonBg_R='255';$buttonBg_G='165';$buttonBg_B='0';
|
||||
#Dec-Code from $bg1:
|
||||
#$bg1_R='255';$bg1_G='140';$bg1_B='0';
|
||||
|
||||
|
||||
|
||||
|
||||
##########################
|
||||
$fontcol_grap_R=20;
|
||||
$fontcol_grap_G=53;
|
||||
$fontcol_grap_B=84;
|
||||
$fontttf="Vera";
|
||||
$fontttfb="VeraBd"; ##copyright of the fonts: docs/copyright_font
|
||||
## if there is now graphic try the following:
|
||||
# $fontttf="Vera.ttf";
|
||||
# $fontttfb="VeraBd.ttf";
|
||||
# or absolut:
|
||||
# $fontttf="/srv/www/htdocs/fhz/include/Vera.ttf";
|
||||
# $fontttfb="/srv/www/htdocs/fhz/include/VeraBd.ttf";
|
||||
|
||||
|
||||
|
||||
|
||||
############################### end of settings
|
||||
putenv('GDFONTPATH=' . realpath('.'));
|
||||
|
||||
|
||||
|
||||
### If DB-query is used, this is the only point of connect. ###
|
||||
if ($DBUse=="1") {
|
||||
@mysql_connect($DBNode, $DBUser, $DBPass) or die("Can't connect");
|
||||
@mysql_select_db($DBName) or die("No database found");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
16
fhem/webfrontend/pgm3/include/dblog.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
##DB-Functions for pgm3
|
||||
|
||||
include "config.php";
|
||||
|
||||
|
||||
|
||||
### If DB-query is used, this is the only point of connect. ###
|
||||
if ($DBUse=="1") {
|
||||
@mysql_connect($DBNode, $DBUser, $DBPass) or die("Can't connect");
|
||||
@mysql_select_db($DBName) or die("No database found");
|
||||
}
|
||||
|
||||
|
||||
?>
|
@ -1,121 +1,161 @@
|
||||
<?php
|
||||
|
||||
################# Creates graphics for pgm3
|
||||
################
|
||||
|
||||
include "../config.php";
|
||||
|
||||
|
||||
$drawfs20=$_GET['drawfs20'];
|
||||
$statefs20=$_GET['statefs20'];
|
||||
$datefs20=$_GET['datefs20'];
|
||||
$room=$_GET['room'];
|
||||
|
||||
|
||||
## do we really need a new graphic??
|
||||
#$execorder=$tailpath.' -1 '.$file;
|
||||
#exec($execorder,$tail1);
|
||||
#$parts = explode(" ", $tail1[0]);
|
||||
#$date=$parts[0];
|
||||
|
||||
|
||||
$savefile=$AbsolutPath."/tmp/FS20.".$drawfs20.".log.".$datefs20.".png";
|
||||
if (file_exists($savefile)) {
|
||||
|
||||
$im2 = @ImageCreateFromPNG($savefile);
|
||||
header("Content-type: image/png");
|
||||
imagePng($im2);
|
||||
exit; # ;-)))
|
||||
}
|
||||
else #delete old pngs
|
||||
{
|
||||
$delfile=$AbsolutPath."/tmp/FS20.".$drawfs20.".log.*.png";
|
||||
foreach (glob($delfile) as $filename) {
|
||||
unlink($filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$im = ImageCreateTrueColor($imgmaxxfs20,$imgmaxyfs20);
|
||||
$black = ImageColorAllocate($im, 0, 0, 0);
|
||||
$bg1p = ImageColorAllocate($im, $bg1_R,$bg1_G,$bg1_B);
|
||||
$bg2p = ImageColorAllocate($im, $buttonBg_R,$buttonBg_G,$buttonBg_B);
|
||||
$bg3p = ImageColorAllocate($im, $fontcol_grap_R,$fontcol_grap_G,$fontcol_grap_B);
|
||||
$white = ImageColorAllocate($im, 255, 255, 255);
|
||||
$gray= ImageColorAllocate($im, 133, 133, 133);
|
||||
$red = ImageColorAllocate($im, 255, 0, 0);
|
||||
$green = ImageColorAllocate($im, 0, 255, 0);
|
||||
$yellow= ImageColorAllocate($im, 255, 255, 0);
|
||||
$orange= ImageColorAllocate($im, 255, 230, 25);
|
||||
|
||||
|
||||
ImageFill($im, 0, 0, $bg2p);
|
||||
ImageRectangle($im, 0, 0, $imgmaxxfs20-1, $imgmaxyfs20-1, $white);
|
||||
|
||||
if ((rtrim($statefs20)=="on" ) or (rtrim($statefs20)=="dimup") or (rtrim($statefs20)=="thermo-on"))
|
||||
{
|
||||
$im2 = ImageCreateFromGIF("FS20.on.gif");
|
||||
}
|
||||
else
|
||||
{
|
||||
$im2 = ImageCreateFromGIF("FS20.off.gif");
|
||||
};
|
||||
$w = imagesx($im2);
|
||||
$h = imagesy($im2);
|
||||
|
||||
$datefs20sep=explode(" ",$datefs20);
|
||||
if ((substr($statefs20,0,12)=="on-for-timer" )
|
||||
or
|
||||
($statefs20=="toggle"))
|
||||
{
|
||||
$im2 = ImageCreateFromGIF("FS20.on.gif");
|
||||
$im3 = ImageCreateFromGIF("FS20.off.gif");
|
||||
Imagecopy($im,$im3,($imgmaxxfs20/2)-12,($imgmaxyfs20/2)-14,0,0,$w,$h);
|
||||
Imagecopy($im,$im2,($imgmaxxfs20/2)-2,($imgmaxyfs20/2)-14,0,0,$w,$h);
|
||||
}
|
||||
else
|
||||
{
|
||||
Imagecopy($im,$im2,($imgmaxxfs20/2)-8,($imgmaxyfs20/2)-14,0,0,$w,$h);
|
||||
};
|
||||
###ttf
|
||||
|
||||
$txtcolor=$bg3p;
|
||||
$text=$statefs20;
|
||||
$fontsize=7;
|
||||
$box = @imageTTFBbox($fontsize,0, $fontttfb,$text);
|
||||
$textwidth = abs($box[4] - $box[0]);
|
||||
$textheight = abs($box[5] - $box[1]);
|
||||
$xcord = ($imgmaxxfs20/2)-($textwidth/2)-2;
|
||||
$ycord = ($imgmaxyfs20/2)+20;
|
||||
ImageTTFText ($im, $fontsize, 0, $xcord, $ycord, $txtcolor, $fontttfb, $text);
|
||||
|
||||
$text=$datefs20sep[0];
|
||||
$box = @imageTTFBbox($fontsize,0, $fontttf,$text);
|
||||
$textwidth = abs($box[4] - $box[0]);
|
||||
$textheight = abs($box[5] - $box[1]);
|
||||
$xcord = ($imgmaxxfs20/2)-($textwidth/2)-2;
|
||||
$ycord = ($imgmaxyfs20/2)+30;
|
||||
ImageTTFText ($im, $fontsize, 0, $xcord, $ycord, $txtcolor, $fontttf, $text);
|
||||
|
||||
$text=$datefs20sep[1];
|
||||
$box = @imageTTFBbox($fontsize,0, $fontttf,$text);
|
||||
$textwidth = abs($box[4] - $box[0]);
|
||||
$textheight = abs($box[5] - $box[1]);
|
||||
$xcord = ($imgmaxxfs20/2)-($textwidth/2)-2;
|
||||
$ycord = ($imgmaxyfs20/2)+40;
|
||||
ImageTTFText ($im, $fontsize, 0, $xcord, $ycord, $txtcolor, $fontttf, $text);
|
||||
|
||||
$txtcolor=$bg3p;
|
||||
|
||||
ImageTTFText ($im, $fs20fontsizetitel, 0, 5, 15, $txtcolor, $fontttfb, $drawfs20);
|
||||
if ($room != '') {ImageTTFText ($im, 7, 0, 5, 26, $txtcolor, $fontttf, $txtroom.$room);};
|
||||
|
||||
|
||||
imagePng($im,$savefile);
|
||||
header("Content-type: image/png");
|
||||
imagePng($im);
|
||||
?>
|
||||
<?php
|
||||
|
||||
################# Creates graphics for pgm3
|
||||
################
|
||||
|
||||
include "../config.php";
|
||||
|
||||
|
||||
$drawfs20=$_GET['drawfs20'];
|
||||
$statefs20=$_GET['statefs20'];
|
||||
$datefs20=$_GET['datefs20'];
|
||||
$icon=$_GET['icon'];
|
||||
$emap=$_GET['emap'];
|
||||
$subType=$_GET['subType'];
|
||||
$room=$_GET['room'];
|
||||
|
||||
$img_path=$AbsolutPath."/include/img/";
|
||||
|
||||
## do we really need a new graphic??
|
||||
#$execorder=$tailpath.' -1 '.$file;
|
||||
#exec($execorder,$tail1);
|
||||
#$parts = explode(" ", $tail1[0]);
|
||||
#$date=$parts[0];
|
||||
|
||||
|
||||
$savefile=$AbsolutPath."/tmp/FS20.".$drawfs20.".log.".$datefs20.".png";
|
||||
if (file_exists($savefile)) {
|
||||
|
||||
$im2 = @ImageCreateFromPNG($savefile);
|
||||
header("Content-type: image/png");
|
||||
imagePng($im2);
|
||||
exit; # ;-)))
|
||||
}
|
||||
else #delete old pngs
|
||||
{
|
||||
$delfile=$AbsolutPath."/tmp/FS20.".$drawfs20.".log.*.png";
|
||||
foreach (glob($delfile) as $filename) {
|
||||
unlink($filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$im = ImageCreateTrueColor($imgmaxxfs20,$imgmaxyfs20);
|
||||
$black = ImageColorAllocate($im, 0, 0, 0);
|
||||
$bg1p = ImageColorAllocate($im, $bg1_R,$bg1_G,$bg1_B);
|
||||
$bg2p = ImageColorAllocate($im, $buttonBg_R,$buttonBg_G,$buttonBg_B);
|
||||
$bg3p = ImageColorAllocate($im, $fontcol_grap_R,$fontcol_grap_G,$fontcol_grap_B);
|
||||
$white = ImageColorAllocate($im, 255, 255, 255);
|
||||
$gray= ImageColorAllocate($im, 133, 133, 133);
|
||||
$red = ImageColorAllocate($im, 255, 0, 0);
|
||||
$green = ImageColorAllocate($im, 0, 255, 0);
|
||||
$yellow= ImageColorAllocate($im, 255, 255, 0);
|
||||
$orange= ImageColorAllocate($im, 255, 230, 25);
|
||||
|
||||
|
||||
ImageFill($im, 0, 0, $bg2p);
|
||||
ImageRectangle($im, 0, 0, $imgmaxxfs20-1, $imgmaxyfs20-1, $white);
|
||||
|
||||
$datefs20sep=explode(" ",$datefs20);
|
||||
$statefs20sep=explode(" ",$statefs20);
|
||||
|
||||
if (($icon!='')) {
|
||||
if ((substr($statefs20sep[0],0,3)=='dim')) {
|
||||
$statefs20tmp = 'on';
|
||||
}
|
||||
else {
|
||||
$statefs20tmp = $statefs20sep[0];
|
||||
}
|
||||
$im2 = ImageCreateFromPNG($img_path.$icon.".".$statefs20tmp.".png");
|
||||
}
|
||||
else {
|
||||
$im2 = ImageCreateFromPNG($img_path.$statefs20sep[0].".png");
|
||||
}
|
||||
|
||||
$w = imagesx($im2);
|
||||
$h = imagesy($im2);
|
||||
|
||||
if ($roomname=='0') {
|
||||
$roomc=$roomcorr;
|
||||
}
|
||||
else {
|
||||
$roomc='0';
|
||||
}
|
||||
|
||||
Imagecopy($im,$im2,($imgmaxxfs20/2)-20,($imgmaxyfs20/2)-7-$roomc,0,0,$w,$h);
|
||||
|
||||
|
||||
$datefs20sep_1=explode(" ",$datefs20);
|
||||
if (($dategerman == '1')) {
|
||||
$datefs20_tmp_1 = $datefs20sep_1[0];
|
||||
$datefs20sep_2=explode("-",$datefs20_tmp_1);
|
||||
$date_button = $datefs20sep_2[2].".".$datefs20sep_2[1].".".$datefs20sep_2[0];
|
||||
}
|
||||
else {
|
||||
$date_button = $datefs20sep_1[0];
|
||||
}
|
||||
$time_button = $datefs20sep_1[1];
|
||||
|
||||
|
||||
if ($namesortbutton == '1') {
|
||||
$pos_1 = strpos($drawfs20,$namesortbuttonsign);
|
||||
if ($pos_1 > 0) {
|
||||
$drawfs20=substr($drawfs20,$pos_1+1);
|
||||
}
|
||||
}
|
||||
|
||||
if ($namereplacebutton == '1') {
|
||||
$drawfs20=str_replace($namereplacebuttonsign, " ", $drawfs20);
|
||||
}
|
||||
|
||||
|
||||
|
||||
###ttf
|
||||
|
||||
if ($emap=='') {
|
||||
$text=$statefs20;
|
||||
}
|
||||
else {
|
||||
$text=$emap;
|
||||
}
|
||||
|
||||
$txtcolor=$bg3p;
|
||||
$fontsize=7;
|
||||
$box = @imageTTFBbox($fontsize,0, $fontttfb,$text);
|
||||
$textwidth = abs($box[4] - $box[0]);
|
||||
$textheight = abs($box[5] - $box[1]);
|
||||
$xcord = ($imgmaxxfs20/2)-($textwidth/2)-2;
|
||||
$ycord = ($imgmaxyfs20/2)+23;
|
||||
ImageTTFText ($im, $fontsize, 0, $xcord, $ycord, $txtcolor, $fontttfb, $text);
|
||||
|
||||
$text=$date_button;
|
||||
$box = @imageTTFBbox($fontsize,0, $fontttf,$text);
|
||||
$textwidth = abs($box[4] - $box[0]);
|
||||
$textheight = abs($box[5] - $box[1]);
|
||||
#$xcord = ($imgmaxxfs20/2)-($textwidth/2)+53;
|
||||
$xcord = ($imgmaxxfs20)-($textwidth)-2;
|
||||
$ycord = ($imgmaxyfs20/2)+33;
|
||||
ImageTTFText ($im, $fontsize, 0, $xcord, $ycord, $txtcolor, $fontttf, $text);
|
||||
|
||||
$text=$time_button;
|
||||
$box = @imageTTFBbox($fontsize,0, $fontttf,$text);
|
||||
$textwidth = abs($box[4] - $box[0]);
|
||||
$textheight = abs($box[5] - $box[1]);
|
||||
#$xcord = ($imgmaxxfs20/2)-($textwidth/2)-58;
|
||||
$xcord = 3;
|
||||
$ycord = ($imgmaxyfs20/2)+33;
|
||||
ImageTTFText ($im, $fontsize, 0, $xcord, $ycord, $txtcolor, $fontttf, $text);
|
||||
|
||||
$txtcolor=$bg3p;
|
||||
|
||||
|
||||
ImageTTFText ($im, $fs20fontsizetitel, 0, 5, 15, $txtcolor, $fontttfb, $drawfs20);
|
||||
if ($room != '' and $roomname=='1') {
|
||||
ImageTTFText ($im, 7, 0, 5, 26, $txtcolor, $fontttf, $txtroom.$room);
|
||||
};
|
||||
|
||||
|
||||
imagePng($im,$savefile);
|
||||
header("Content-type: image/png");
|
||||
imagePng($im);
|
||||
?>
|
||||
|
@ -1,80 +1,138 @@
|
||||
<?php
|
||||
|
||||
##Pulldown for FS20-Devices
|
||||
|
||||
|
||||
$orders=array("on","off","dimup","dimdown","on-for-timer","off-for-timer","dim06%","dim12%",
|
||||
"dim18%","dim25%","dim31%","dim37%","dim43%","dim50%","dim56%","dim62%","dim68%",
|
||||
"dim75%","dim81%","dim87%","dim93%","dim100%","dimupdown","on-old-for-timer","reset",
|
||||
"sendstate","timer","toggle");
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td colspan=1 align=right $bg2><font $fontcolor3>FS20: </font></td><td align=left $bg2><font $fontcolor3>
|
||||
<form action=$forwardurl method='POST'>
|
||||
<input type=hidden name=showfht value=$showfht>
|
||||
<input type=hidden name=showhms value=$showhms>
|
||||
<input type=hidden name=showmenu value=$showmenu>
|
||||
<input type=hidden name=Action value=exec2>
|
||||
|
||||
<select name=atorder size=1>
|
||||
<option></option>;
|
||||
<option>at</option></select>
|
||||
|
||||
<select name=attime size=1>
|
||||
<option></option>;";
|
||||
for ($m=0; $m < 24; $m++)
|
||||
{
|
||||
if ( $m < 10) $m = '0'.$m;
|
||||
for ($k=0; $k < 60; $k=$k+2)
|
||||
{
|
||||
if ( $k < 10) $k = '0'.$k;
|
||||
echo "<option>$m:$k:00</option>";
|
||||
}
|
||||
}
|
||||
|
||||
echo"</select>";
|
||||
|
||||
|
||||
|
||||
|
||||
echo"
|
||||
set
|
||||
<select name=fs20dev size=1>
|
||||
<option></option>";
|
||||
for ($m=0; $m < count($fs20devs); $m++)
|
||||
{
|
||||
echo $fs20dev;
|
||||
if ($fs20dev==$fs20devs[$m])
|
||||
{
|
||||
echo "<option selected>$fs20devs[$m]</option>";
|
||||
} else {
|
||||
echo "<option>$fs20devs[$m]</option>";
|
||||
}
|
||||
};
|
||||
|
||||
echo "
|
||||
</select><select name=orderpulldown size=1>
|
||||
<option></option>";
|
||||
|
||||
for ($m=0; $m < count($orders); $m++)
|
||||
{
|
||||
if ($orderpulldown==$orders[$m])
|
||||
{
|
||||
echo "<option selected>$orders[$m]</option>";
|
||||
} else {
|
||||
echo "<option>$orders[$m]</option>";
|
||||
}
|
||||
};
|
||||
echo "</select>
|
||||
<select name=valuetime size=1>
|
||||
<option></option>";
|
||||
for ($m=0; $m < 6000; $m++)
|
||||
{if ( $m > 20) $m = $m+4;
|
||||
if ( $m > 60) $m = $m+55;
|
||||
echo "<option>$m</option>";}
|
||||
|
||||
echo"</select>
|
||||
<input type=submit value='go!'></form></td></tr>";
|
||||
|
||||
?>
|
||||
<?php
|
||||
|
||||
##Pulldown for FS20-Devices
|
||||
|
||||
|
||||
$orders=array("on","off","dimup","dimdown","on-for-timer","off-for-timer","dim06%","dim12%",
|
||||
"dim18%","dim25%","dim31%","dim37%","dim43%","dim50%","dim56%","dim62%","dim68%",
|
||||
"dim75%","dim81%","dim87%","dim93%","dim100%","dimupdown","on-old-for-timer","reset",
|
||||
"sendstate","timer","toggle");
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td colspan=1 align=right $bg2><font $fontcolor3>FS20: </font></td><td align=left $bg2><font $fontcolor3>
|
||||
<form action=$forwardurl method='POST'>
|
||||
<input type=hidden name=showfht value=$showfht>
|
||||
<input type=hidden name=showhms value=$showhms>
|
||||
<input type=hidden name=showmenu value=$showmenu>
|
||||
<input type=hidden name=Action value=exec2>
|
||||
|
||||
<select name=atorder size=1>
|
||||
<option></option>;
|
||||
<option>at</option></select>
|
||||
|
||||
<select name=attime size=1>
|
||||
<option></option>;";
|
||||
for ($m=0; $m < 24; $m++)
|
||||
{
|
||||
if ( $m < 10) $m = '0'.$m;
|
||||
for ($k=0; $k < 60; $k=$k+2)
|
||||
{
|
||||
if ( $k < 10) $k = '0'.$k;
|
||||
echo "<option>$m:$k:00</option>";
|
||||
}
|
||||
}
|
||||
|
||||
echo"</select>";
|
||||
|
||||
|
||||
|
||||
|
||||
echo"
|
||||
set
|
||||
<select name=fs20dev size=1>
|
||||
<option></option>";
|
||||
for ($m=0; $m < count($fs20devs); $m++)
|
||||
{
|
||||
echo $fs20dev;
|
||||
if ($fs20dev==$fs20devs[$m])
|
||||
{
|
||||
echo "<option selected>$fs20devs[$m]</option>";
|
||||
} else {
|
||||
echo "<option>$fs20devs[$m]</option>";
|
||||
}
|
||||
};
|
||||
|
||||
echo "
|
||||
</select><select name=orderpulldown size=1>
|
||||
<option></option>";
|
||||
|
||||
for ($m=0; $m < count($orders); $m++)
|
||||
{
|
||||
if ($orderpulldown==$orders[$m])
|
||||
{
|
||||
echo "<option selected>$orders[$m]</option>";
|
||||
} else {
|
||||
echo "<option>$orders[$m]</option>";
|
||||
}
|
||||
};
|
||||
|
||||
function mknullfs20($zahl,$stellen) {
|
||||
for($i=strlen($zahl);$i<$stellen;$i++){
|
||||
$zahl="0" . $zahl;
|
||||
}
|
||||
return $zahl;
|
||||
}
|
||||
|
||||
echo "</select>
|
||||
<select name=valuetime size=1> ### <------ valuetime muß eindeutig werden !!!
|
||||
<option></option>";
|
||||
echo "<option value=0>HH:MM:SS:MS</option>";
|
||||
echo "<option value=0>00:00:00:00</option>";
|
||||
echo "<option value=0.25>00:00:00:25</option>";
|
||||
echo "<option value=0.5>00:00:00:50</option>";
|
||||
echo "<option value=0.75>00:00:00:75</option>";
|
||||
echo "<option value=1>00:00:01:00</option>";
|
||||
echo "<option value=1.25>00:00:01:25</option>";
|
||||
echo "<option value=1.5>00:00:01:50</option>";
|
||||
echo "<option value=1.75>00:00:01:75</option>";
|
||||
echo "<option value=2>00:00:02:00</option>";
|
||||
echo "<option value=2.25>00:00:02:25</option>";
|
||||
echo "<option value=2.5>00:00:02:50</option>";
|
||||
echo "<option value=2.75>00:00:02:75</option>";
|
||||
echo "<option value=3>00:00:03:00</option>";
|
||||
echo "<option value=3.25>00:00:03:25</option>";
|
||||
echo "<option value=3.5>00:00:03:50</option>";
|
||||
echo "<option value=3.75>00:00:03:75</option>";
|
||||
echo "<option value=4>00:00:04:00</option>";
|
||||
echo "<option value=4.5>00:00:04:50</option>";
|
||||
echo "<option value=5>00:00:05:00</option>";
|
||||
echo "<option value=5.5>00:00:05:50</option>";
|
||||
echo "<option value=6>00:00:06:00</option>";
|
||||
echo "<option value=6.5>00:00:06:50</option>";
|
||||
echo "<option value=7>00:00:07:00</option>";
|
||||
echo "<option value=7.5>00:00:07:50</option>";
|
||||
for ($m=8; $m < 15360; $m++) {
|
||||
if ( $m > 16) $m = $m+1;
|
||||
if ( $m > 32) $m = $m+2;
|
||||
if ( $m > 64) $m = $m+4;
|
||||
if ( $m > 128) $m = $m+8;
|
||||
if ( $m > 256) $m = $m+16;
|
||||
if ( $m > 512) $m = $m+32;
|
||||
if ( $m > 1024) $m = $m+64;
|
||||
if ( $m > 2048) $m = $m+128;
|
||||
if ( $m > 4096) $m = $m+256;
|
||||
if ( $m > 8192) $m = $m+512;
|
||||
if ( $m > 7)
|
||||
$sek=$m;
|
||||
$std=floor($sek/3600);
|
||||
$min=floor(($sek-$std*3600)/60);
|
||||
$sec=$sek-$std*3600-$min*60;
|
||||
$std=mknullfs20($std,2);
|
||||
$min=mknullfs20($min,2);
|
||||
$sec=mknullfs20($sec,2);
|
||||
echo "<option value=$m>$std:$min:$sec</option>";}
|
||||
|
||||
echo"</select>
|
||||
<input type=submit value='go!'></form></td></tr>";
|
||||
|
||||
# <select name=valuetime size=1>
|
||||
# <option></option>";
|
||||
# for ($m=0; $m < 6000; $m++)
|
||||
# {if ( $m > 20) $m = $m+4;
|
||||
# if ( $m > 60) $m = $m+55;
|
||||
# echo "<option>$m</option>";}
|
||||
#
|
||||
# echo"</select>
|
||||
|
||||
?>
|
||||
|
@ -51,7 +51,7 @@ function drawgnuplot($gnudraw,$gnutyp,$gnuplot,$pictype,$logpath,$FHTyrange,$FHT
|
||||
$OUT2="set output 'tmp/$gnudraw1.$pictype'";
|
||||
|
||||
$gplothdr="
|
||||
set terminal $pictype
|
||||
set terminal $pictype crop
|
||||
set xdata time
|
||||
set timefmt '%Y-%m-%d_%H:%M:%S'
|
||||
set xlabel ' '
|
||||
|
131
fhem/webfrontend/pgm3/include/hmpulldown.php
Normal file
@ -0,0 +1,131 @@
|
||||
<?php
|
||||
|
||||
##Pulldown for HomeMatic-Devices
|
||||
|
||||
|
||||
$order1=array("on","off","toggle","on-for-timer");
|
||||
$order2=range(0, 100, 1);
|
||||
$order3=array("pair","unpair","statusRequest","sign","raw","reset");
|
||||
$order8=array("-- Dim in % --");
|
||||
$order9=array("---------------");
|
||||
$orders=array_merge($order1, $order9, $order8, $order2, $order9, $order3);
|
||||
|
||||
echo "
|
||||
<tr>
|
||||
<td colspan=1 align=right $bg2><font $fontcolor3>HomeMatic: </font></td><td align=left $bg2><font $fontcolor3>
|
||||
<form action=$forwardurl method='POST'>
|
||||
<input type=hidden name=showfht value=$showfht>
|
||||
<input type=hidden name=showhms value=$showhms>
|
||||
<input type=hidden name=showmenu value=$showmenu>
|
||||
<input type=hidden name=Action value=exec4>
|
||||
|
||||
<select name=atorder size=1>
|
||||
<option></option>;
|
||||
<option>at</option></select>
|
||||
|
||||
<select name=attime size=1>
|
||||
<option></option>;";
|
||||
for ($m=0; $m < 24; $m++)
|
||||
{
|
||||
if ( $m < 10) $m = '0'.$m;
|
||||
for ($k=0; $k < 60; $k=$k+2)
|
||||
{
|
||||
if ( $k < 10) $k = '0'.$k;
|
||||
echo "<option>$m:$k:00</option>";
|
||||
}
|
||||
}
|
||||
|
||||
echo"</select>";
|
||||
|
||||
|
||||
|
||||
|
||||
echo"
|
||||
set
|
||||
<select name=culhmdev size=1>
|
||||
<option></option>";
|
||||
for ($m=0; $m < count($culhmdevs); $m++)
|
||||
{
|
||||
echo $culhmdev;
|
||||
if ($culhmdev==$culhmdevs[$m])
|
||||
{
|
||||
echo "<option selected>$culhmdevs[$m]</option>";
|
||||
} else {
|
||||
echo "<option>$culhmdevs[$m]</option>";
|
||||
}
|
||||
};
|
||||
|
||||
echo "
|
||||
</select><select name=orderpulldown size=1>
|
||||
<option></option>";
|
||||
|
||||
for ($m=0; $m < count($orders); $m++)
|
||||
{
|
||||
if ($orderpulldown==$orders[$m])
|
||||
{
|
||||
echo "<option selected>$orders[$m]</option>";
|
||||
} else {
|
||||
echo "<option>$orders[$m]</option>";
|
||||
}
|
||||
};
|
||||
|
||||
function mknullhm($zahl,$stellen) {
|
||||
for($i=strlen($zahl);$i<$stellen;$i++){
|
||||
$zahl="0" . $zahl;
|
||||
}
|
||||
return $zahl;
|
||||
}
|
||||
|
||||
echo "</select>
|
||||
<select name=valuetime size=1> ### <------ valuetime muß eindeutig werden !!!
|
||||
<option></option>";
|
||||
echo "<option value=0>HH:MM:SS:MS</option>";
|
||||
echo "<option value=0>00:00:00:00</option>";
|
||||
echo "<option value=0.25>00:00:00:25</option>";
|
||||
echo "<option value=0.5>00:00:00:50</option>";
|
||||
echo "<option value=0.75>00:00:00:75</option>";
|
||||
echo "<option value=1>00:00:01:00</option>";
|
||||
echo "<option value=1.25>00:00:01:25</option>";
|
||||
echo "<option value=1.5>00:00:01:50</option>";
|
||||
echo "<option value=1.75>00:00:01:75</option>";
|
||||
echo "<option value=2>00:00:02:00</option>";
|
||||
echo "<option value=2.25>00:00:02:25</option>";
|
||||
echo "<option value=2.5>00:00:02:50</option>";
|
||||
echo "<option value=2.75>00:00:02:75</option>";
|
||||
echo "<option value=3>00:00:03:00</option>";
|
||||
echo "<option value=3.25>00:00:03:25</option>";
|
||||
echo "<option value=3.5>00:00:03:50</option>";
|
||||
echo "<option value=3.75>00:00:03:75</option>";
|
||||
echo "<option value=4>00:00:04:00</option>";
|
||||
echo "<option value=4.5>00:00:04:50</option>";
|
||||
echo "<option value=5>00:00:05:00</option>";
|
||||
echo "<option value=5.5>00:00:05:50</option>";
|
||||
echo "<option value=6>00:00:06:00</option>";
|
||||
echo "<option value=6.5>00:00:06:50</option>";
|
||||
echo "<option value=7>00:00:07:00</option>";
|
||||
echo "<option value=7.5>00:00:07:50</option>";
|
||||
for ($m=8; $m < 15360; $m++) {
|
||||
if ( $m > 16) $m = $m+1;
|
||||
if ( $m > 32) $m = $m+2;
|
||||
if ( $m > 64) $m = $m+4;
|
||||
if ( $m > 128) $m = $m+8;
|
||||
if ( $m > 256) $m = $m+16;
|
||||
if ( $m > 512) $m = $m+32;
|
||||
if ( $m > 1024) $m = $m+64;
|
||||
if ( $m > 2048) $m = $m+128;
|
||||
if ( $m > 4096) $m = $m+256;
|
||||
if ( $m > 8192) $m = $m+512;
|
||||
if ( $m > 7)
|
||||
$sek=$m;
|
||||
$std=floor($sek/3600);
|
||||
$min=floor(($sek-$std*3600)/60);
|
||||
$sec=$sek-$std*3600-$min*60;
|
||||
$std=mknullhm($std,2);
|
||||
$min=mknullhm($min,2);
|
||||
$sec=mknullhm($sec,2);
|
||||
echo "<option value=$m>$std:$min:$sec</option>";}
|
||||
|
||||
echo"</select>
|
||||
<input type=submit value='go!'></form></td></tr>";
|
||||
|
||||
?>
|
BIN
fhem/webfrontend/pgm3/include/img/FS20.off.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
fhem/webfrontend/pgm3/include/img/FS20.on.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dim06%.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dim100%.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dim12%.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dim18%.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dim25%.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dim31%.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dim37%.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dim43%.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dim50%.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dim56%.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dim62%.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dim68%.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dim75%.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dim81%.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dim87%.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dim93%.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dimdown.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
fhem/webfrontend/pgm3/include/img/dimup.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
fhem/webfrontend/pgm3/include/img/off-for-timer.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
fhem/webfrontend/pgm3/include/img/off.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
fhem/webfrontend/pgm3/include/img/on-for-timer.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
fhem/webfrontend/pgm3/include/img/on-till.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
fhem/webfrontend/pgm3/include/img/on.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
fhem/webfrontend/pgm3/include/img/switch.off.png
Normal file
After Width: | Height: | Size: 427 B |
BIN
fhem/webfrontend/pgm3/include/img/switch.on.png
Normal file
After Width: | Height: | Size: 430 B |
BIN
fhem/webfrontend/pgm3/include/img/switch_gn.off-for-timer.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
fhem/webfrontend/pgm3/include/img/switch_gn.off.png
Normal file
After Width: | Height: | Size: 359 B |
BIN
fhem/webfrontend/pgm3/include/img/switch_gn.on-for-timer.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
fhem/webfrontend/pgm3/include/img/switch_gn.on.png
Normal file
After Width: | Height: | Size: 355 B |
BIN
fhem/webfrontend/pgm3/include/img/switch_rt.off-for-timer.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
fhem/webfrontend/pgm3/include/img/switch_rt.off.png
Normal file
After Width: | Height: | Size: 359 B |
BIN
fhem/webfrontend/pgm3/include/img/switch_rt.on.png
Normal file
After Width: | Height: | Size: 350 B |
BIN
fhem/webfrontend/pgm3/include/img/toggle.png
Normal file
After Width: | Height: | Size: 3.2 KiB |