2007-01-30 12:47:36 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
##################################################################################
|
2007-10-13 16:36:00 +00:00
|
|
|
#### pgm3 -- a PHP-webfrontend for fhem.pl
|
2007-01-30 12:47:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
###### required settings
|
2007-10-13 16:36:00 +00:00
|
|
|
$fhz1000="localhost"; #only php5 ! On which machine is fhem runnning??
|
2007-02-14 20:12:59 +00:00
|
|
|
# if it is not localhost then the fhz1000.cfg must
|
|
|
|
# run global: "port <nr> global"
|
|
|
|
$fhz1000port="7072"; # port of fhz1000.pl
|
|
|
|
$logpath="/var/tmp"; # where are your logs?
|
2007-03-22 08:47:09 +00:00
|
|
|
$fhz1000_pl="/home/FHZ/fhz1000/fhz1000.pl"; #only required if you are using PHP4
|
2007-01-30 12:47:36 +00:00
|
|
|
|
|
|
|
##################################################################################
|
|
|
|
###### nice to have
|
|
|
|
|
|
|
|
|
|
|
|
###### 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';
|
|
|
|
|
|
|
|
##### logrotate of hms, ks300, fht
|
|
|
|
# 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.
|
2007-10-13 16:36:00 +00:00
|
|
|
$logrotate='yes'; # yes/no default='no'
|
2007-01-30 12:47:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
## Kioskmode. Only show but don't switch anything. Values: on/off
|
|
|
|
$kioskmode='off';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-14 20:12:59 +00:00
|
|
|
##############################################################################################
|
|
|
|
## 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
|
2007-01-30 12:47:36 +00:00
|
|
|
|
|
|
|
|
2007-02-14 20:12:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
##############################################################################################
|
2007-01-30 12:47:36 +00:00
|
|
|
## 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
|
2007-09-04 09:38:27 +00:00
|
|
|
|
2007-01-30 12:47:36 +00:00
|
|
|
#room. Write e.g. "attr rolowz room wzo"
|
|
|
|
#into your fhz1000.cfg and restart fhz1000.pl
|
|
|
|
# this will be marked on the FS20-Button.
|
|
|
|
$txtroom=""; # default=""; example: $txtroom="room: ";
|
|
|
|
# room hidden will not be shown
|
|
|
|
|
2007-02-14 20:12:59 +00:00
|
|
|
##############################################################################################
|
2007-01-30 12:47:36 +00:00
|
|
|
## 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
|
2007-09-04 09:38:27 +00:00
|
|
|
$roomfontsizetitel=9; # default=9
|
2007-01-30 12:47:36 +00:00
|
|
|
$roommaxiconperline=$fs20maxiconperline; # default=$fs20maxiconperline
|
|
|
|
|
2007-02-14 20:12:59 +00:00
|
|
|
##############################################################################################
|
2007-03-30 14:55:39 +00:00
|
|
|
|
2007-02-14 20:12:59 +00:00
|
|
|
## FHT-Devices
|
2007-10-13 16:36:00 +00:00
|
|
|
$imgmaxxfht=725; #Size of the pictures Default: 725
|
2007-02-14 20:12:59 +00:00
|
|
|
$imgmaxyfht=52;
|
2007-03-30 14:55:39 +00:00
|
|
|
$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)
|
|
|
|
$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=4800; # automatic Logrotate; $logrotate must be 'yes'.
|
|
|
|
# Default:4800
|
|
|
|
# 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 = ???)
|
|
|
|
|
2007-01-30 12:47:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-14 20:12:59 +00:00
|
|
|
##############################################################################################
|
|
|
|
## HMS-Devices
|
2007-03-30 14:55:39 +00:00
|
|
|
$imgmaxxhms=725; #Size of the pictures. Default: 725
|
2007-02-14 20:12:59 +00:00
|
|
|
$imgmaxyhms=52;
|
2007-03-30 14:55:39 +00:00
|
|
|
$maxcountHMS='575'; # Maximum count of pixel (from right to left) (Default:575)
|
|
|
|
$XcorrectMainTextHMS=25; # Text of main text from the right side (Default:)
|
|
|
|
$logrotateHMSlines=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 = ???)
|
2007-02-14 20:12:59 +00:00
|
|
|
|
2007-10-13 16:36:00 +00:00
|
|
|
##############################################################################################
|
|
|
|
## 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 = ???)
|
|
|
|
|
2007-02-14 20:12:59 +00:00
|
|
|
##############################################################################################
|
2007-01-30 12:47:36 +00:00
|
|
|
## KS300-Device
|
2007-03-30 14:55:39 +00:00
|
|
|
$imgmaxxks=725; #Size of the pictures Default: 725
|
2007-01-30 12:47:36 +00:00
|
|
|
|
|
|
|
$imgmaxyks=52;
|
2007-03-30 14:55:39 +00:00
|
|
|
$showbft=1; # Display values additionaly in Beafort. Values: 0 /1 Default:1
|
|
|
|
$maxcountKS='575'; # Maximum count of pixel (from right to left) (Default:575)
|
|
|
|
$XcorrectMainTextKS=45; # Text of main text from the right side (Default: 35)
|
|
|
|
|
2007-10-13 16:36:00 +00:00
|
|
|
$logrotateKS300lines=2100; # automatic Logrotate; $logrotate must be 'yes'.
|
|
|
|
# Default:2100
|
2007-03-30 14:55:39 +00:00
|
|
|
# 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 = ???)
|
2007-10-13 16:36:00 +00:00
|
|
|
##############################################################################################
|
|
|
|
## user
|
|
|
|
# Create your own graphics! If you have separate Programs (e.g. wired devices) then create your own
|
|
|
|
# logfile and tell pgm3 to use it.
|
|
|
|
# the logfile must look like this:
|
|
|
|
###################################
|
|
|
|
# 2007-10-13_13:45:14 solarI Is: 0.0
|
|
|
|
###################################
|
|
|
|
# Field1: <date>_<time> e.g. 2007-10-13_13:45:14
|
|
|
|
# Field2: <name> e.g. solar
|
|
|
|
# Field3: <free> this field has no meaning
|
|
|
|
# Field4: <value> e.g. 0.0 this must be a numeric value
|
|
|
|
|
|
|
|
|
|
|
|
$UserDefs=0; # Do you want user defined graphics? 1/0 Default: 0
|
|
|
|
|
|
|
|
#################
|
|
|
|
## Userdef: 0 ## Switch $UserDefs to 1 !! ###
|
|
|
|
$userdef[0]['name']='SolarV'; #Size of the pictures. Default: 725
|
|
|
|
# No blanks or other special signs!!
|
|
|
|
$userdef[0]['imagemax']=725;
|
|
|
|
$userdef[0]['imagemay']=52;
|
|
|
|
$userdef[0]['maxcount']=575; # Maximum count of pixel (from right to left) (Default:575)
|
|
|
|
$userdef[0]['XcorrectMainText']=25; # Text of main text from the right side (Default:)
|
|
|
|
$userdef[0]['logrotatelines']=2200; # 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
|
|
|
|
# from fhz1000.pl (user = ???)
|
|
|
|
$userdef[0]['logpath']=$logpath.'/lse_solarV.log'; # example, path to the logfile with the entrys like above
|
|
|
|
$userdef[0]['room']='user';
|
|
|
|
$userdef[0]['semlong']='Voltage'; # Sematic eg. Voltage
|
|
|
|
$userdef[0]['semshort']='V'; # Sematic short e.g. V
|
|
|
|
|
|
|
|
#################
|
|
|
|
## Userdef: 1
|
|
|
|
# $userdef[1]['name']='Solar I'; #Size of the pictures. Default: 725
|
|
|
|
# .....
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#################
|
|
|
|
## Userdef: 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
########################
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-30 12:47:36 +00:00
|
|
|
|
|
|
|
|
2007-02-14 20:12:59 +00:00
|
|
|
##############################################################################################
|
2007-01-30 12:47:36 +00:00
|
|
|
## misc
|
|
|
|
$taillog=1; #make shure to have the correct rights. Values: 0/1
|
2007-09-04 09:38:27 +00:00
|
|
|
$tailcount=20; #make shure to have the correct rights. Values: 0/1
|
|
|
|
$taillogorder="/usr/bin/tail -$tailcount $logpath/fhem.log ";
|
2007-10-13 16:36:00 +00:00
|
|
|
#$taillogorder="/usr/bin/tail -$tailcount $logpath/fhemjens.log ";
|
|
|
|
# $taillogorder="grep -v comparison $logpath/fhem.log| tail -20";
|
2007-01-30 12:47:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-14 20:12:59 +00:00
|
|
|
## show Information at startup.
|
2007-01-30 12:47:36 +00:00
|
|
|
$showLOGS='no'; #show the LOGS at startup. Default: no Values: yes/no
|
2007-10-13 16:36:00 +00:00
|
|
|
$showAT='no'; #show the AT_JOBS at startup. Default: yes Values: yes/no
|
2007-01-30 12:47:36 +00:00
|
|
|
$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
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-02-14 20:12:59 +00:00
|
|
|
$urlreload=90; # Automatic reloading page [sec]. Default fast: 60 slow:90
|
|
|
|
$titel="PHP-Webmachine for fhem :-)"; #feel free to create an own title
|
2007-01-30 12:47:36 +00:00
|
|
|
$timeformat="Y-m-d H:i:s";
|
2007-09-04 09:38:27 +00:00
|
|
|
$winsize=800; # width of the pgm3
|
2007-01-30 12:47:36 +00:00
|
|
|
$bodybg="bgcolor='#F5F5F5'";
|
|
|
|
$bg1="bgcolor='#6E94B7'";
|
|
|
|
$bg2="bgcolor='#AFC6DB'";
|
|
|
|
$bg3="bgcolor='#F8F8F8'";
|
|
|
|
$bg4="bgcolor='#6394BD'";
|
|
|
|
$fontcolor1="color='#FFFFFF'";
|
|
|
|
|
|
|
|
$fontcolor3="color='143554'";
|
|
|
|
$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('.'));
|
|
|
|
|
|
|
|
?>
|