Bugfix: timeproblem notify, Feature: userdefs.php better gnuplot picture, FS20 with HM
git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1572 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -197,16 +197,19 @@ setlocale (LC_ALL, 'de_DE.utf8');
|
||||
$fontsize=7;
|
||||
$txtcolor=$bg3p;
|
||||
ImageTTFText ($im, $fontsize, 0, 3, 10, $txtcolor, $fontttf, $text);
|
||||
$text=$resultreverse[0][2]." °C";
|
||||
|
||||
$text=$resultreverse[0][2];
|
||||
ImageTTFText ($im, 9, 0, 90-$XcorrectMainText, 37, $txtcolor, $fontttfb, $text);
|
||||
$text=" °C";
|
||||
ImageTTFText ($im, 9, 0, 120-$XcorrectMainText, 37, $txtcolor, $fontttfb, $text);
|
||||
|
||||
$text= $drawfht;
|
||||
ImageTTFText ($im, 8, 0, 90-$XcorrectMainText, 22, $txtcolor, $fontttfb, $text);
|
||||
$txtcolor=$bg3p;
|
||||
$fontsize=7;
|
||||
$text="min= $mintemp max= $maxtemp";
|
||||
$text="min= $mintemp";
|
||||
ImageTTFText ($im, $fontsize, 0, 90-$XcorrectMainText, 49, $txtcolor, $fontttf, $text);
|
||||
$text="max= $maxtemp";
|
||||
ImageTTFText ($im, $fontsize, 0, 145-$XcorrectMainText, 49, $txtcolor, $fontttf, $text);
|
||||
|
||||
$text=$txtroom.$room;
|
||||
ImageTTFText ($im, $fontsize, 0, 3, 49, $txtcolor, $fontttf, $text);
|
||||
|
||||
@@ -16,6 +16,7 @@ include "../config.php";
|
||||
|
||||
$img_path=$AbsolutPath."/include/img/";
|
||||
|
||||
|
||||
## do we really need a new graphic??
|
||||
#$execorder=$tailpath.' -1 '.$file;
|
||||
#exec($execorder,$tail1);
|
||||
@@ -24,8 +25,8 @@ include "../config.php";
|
||||
|
||||
|
||||
$savefile=$AbsolutPath."/tmp/FS20.".$drawfs20.".log.".$datefs20.".png";
|
||||
if (file_exists($savefile)) {
|
||||
|
||||
if ((file_exists($savefile)) and (substr($statefs20,0,3) != 'MIS')) {
|
||||
$im2 = @ImageCreateFromPNG($savefile);
|
||||
header("Content-type: image/png");
|
||||
imagePng($im2);
|
||||
@@ -59,10 +60,18 @@ include "../config.php";
|
||||
$datefs20sep=explode(" ",$datefs20);
|
||||
$statefs20sep=explode(" ",$statefs20);
|
||||
|
||||
|
||||
#echo (substr($statefs20sep[0],0,3));
|
||||
#exit;
|
||||
|
||||
if (($icon!='')) {
|
||||
if ((substr($statefs20sep[0],0,3)=='dim')) {
|
||||
$statefs20tmp = 'on';
|
||||
}
|
||||
else
|
||||
if ((substr($statefs20sep[0],0,3)=='MIS')) {
|
||||
$statefs20tmp = 'missing';
|
||||
}
|
||||
else {
|
||||
$statefs20tmp = $statefs20sep[0];
|
||||
}
|
||||
@@ -118,6 +127,8 @@ include "../config.php";
|
||||
else {
|
||||
$text=$emap;
|
||||
}
|
||||
#echo $text;
|
||||
#exit;
|
||||
|
||||
$txtcolor=$bg3p;
|
||||
$fontsize=7;
|
||||
|
||||
@@ -171,17 +171,26 @@ if ($gnuplottype=='piri' or $gnuplottype=='fs20')
|
||||
$gnuplotpng=$drawuserdef.".sm.png";
|
||||
|
||||
$messageA=<<<EOD
|
||||
set terminal png transparent crop
|
||||
#set terminal png transparent crop size 625,83
|
||||
#set terminal png transparent crop size $imgmaxxuserdef-$x+5,83
|
||||
set terminal png transparent crop size $imgmaxxuserdef-100,$imgmaxyuserdef+31
|
||||
set output '$AbsolutPath/tmp/$gnuplotpng'
|
||||
set key off
|
||||
set xdata time
|
||||
set timefmt '%Y-%m-%d_%H:%M:%S'
|
||||
set noytics
|
||||
#set border linecolor rgbcolor "#F5F5F5"
|
||||
set border linecolor rgbcolor "#6394BD"
|
||||
#set border linecolor rgbcolor "#6E94B7"
|
||||
#set border linecolor rgb "$bg2"
|
||||
#set border linecolor rgb "white"
|
||||
#set noborder
|
||||
#set noxtics
|
||||
unset label
|
||||
$xrange
|
||||
set grid
|
||||
set grid linetype 1 linecolor rgb "white"
|
||||
set yrange [-0.3:1.3]
|
||||
set size 0.8,0.15
|
||||
#set size 0.8,0.15
|
||||
set format x ''
|
||||
|
||||
EOD;
|
||||
@@ -253,7 +262,8 @@ if ($gnuplottype=='piri' or $gnuplottype=='fs20')
|
||||
$im2 = imagecreatefrompng("$AbsolutPath/tmp/$gnuplotpng");
|
||||
$w2 = imagesx($im2);
|
||||
$h2 = imagesy($im2);
|
||||
ImageCopy($im,$im2,163,10,0,0,$w2,$h2);
|
||||
#ImageCopy($im,$im2,163,10,0,0,$w2,$h2);
|
||||
ImageCopy($im,$im2,153,5,0,0,$w2,$h2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user