mirror of
https://github.com/fhem/fhem-mirror.git
synced 2024-11-22 02:59:49 +00:00
Bugfix: timeproblem notify, Feature: userdefs.php better gnuplot picture, FS20 with HM
git-svn-id: https://svn.fhem.de/fhem/trunk@1572 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c76b4ee15f
commit
96845eb5fb
@ -222,3 +222,6 @@ It is not necessary to tell fhem that there are other logs.
|
||||
|
||||
2012-05-08
|
||||
-- Feature: homematic added, FS20-Buttons now different depending of the state
|
||||
2012-05-20
|
||||
-- Feature: userdefs.php better gnuplot picture
|
||||
-- Bugfix: index.php: time problem by notify commands wihtin fhem
|
||||
|
@ -125,3 +125,8 @@
|
||||
|
||||
. Martin 2012-05-08
|
||||
-- Feature: Homematic added, FS20-Buttons now depending of the state
|
||||
|
||||
- Martin 20120-05-20
|
||||
-- Bugfix: time problem with notify within fhem
|
||||
-- Feature: userdefs.php better gnuplot pictures
|
||||
|
||||
|
@ -116,7 +116,7 @@
|
||||
$imgmaxxroom=$imgmaxxfs20; # Size of the pictures, default=$imgmaxxfs20
|
||||
$imgmaxyroom=22; # default=30
|
||||
$roomfontsizetitel=10; # default=9
|
||||
$roommaxiconperline=$fs20maxiconperline; # default=$fs20maxiconperline
|
||||
$roommaxiconperline=$fs20maxiconperline-1; # default=$fs20maxiconperline
|
||||
|
||||
$namesortroom='1'; # [1|0]
|
||||
$namesortroomsign=')'; # If $namesortroom = 1 the Sign ")" will replace with " " [x]
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -41,7 +41,7 @@ include "include/gnuplot.php";
|
||||
include "include/functions.php";
|
||||
|
||||
|
||||
$pgm3version='120508a';
|
||||
$pgm3version='120520';
|
||||
|
||||
|
||||
|
||||
@ -246,13 +246,13 @@ function execFHZ($order,$machine,$port)
|
||||
{
|
||||
global $errormessage;
|
||||
|
||||
|
||||
$fp = stream_socket_client("tcp://$machine:$port", $errno, $errstr, 30);
|
||||
if (!$fp) {
|
||||
echo "$errstr ($errno)<br />\n";
|
||||
} else {
|
||||
fwrite($fp, "$order;quit\n");
|
||||
$errormessage= fgets($fp);
|
||||
#buggy in fhem by notify?
|
||||
#$errormessage= fgets($fp);
|
||||
fclose($fp);
|
||||
}
|
||||
return $errormessage;
|
||||
@ -308,6 +308,7 @@ function new_xml_parser($live)
|
||||
{
|
||||
global $parser_live;
|
||||
$xml_parser = xml_parser_create();
|
||||
xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8");
|
||||
xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 0);
|
||||
xml_set_element_handler($xml_parser, "startElement", "endElement");
|
||||
|
||||
@ -330,15 +331,16 @@ if (!(list($xml_parser, $live) = new_xml_parser($live))) {
|
||||
$data = $output[0];
|
||||
if (!xml_parse($xml_parser, $data)) {
|
||||
$now=date($timeformat);
|
||||
echo("There is a xmllist file for debugging under $AbsolutPath/tmp/debugxml$now<br><br>");
|
||||
echo("There is a xmllist file for debugging: $AbsolutPath/tmp/debugxml$now<br><br>");
|
||||
$handle=fopen("tmp/debugxml$now","w");
|
||||
fwrite($handle,$outputvar);
|
||||
fclose($handle);
|
||||
$warning=sprintf("XML error: %s at line %d\n",
|
||||
xml_error_string(xml_get_error_code($xml_parser)),
|
||||
xml_get_current_line_number($xml_parser));
|
||||
echo $warning;
|
||||
};
|
||||
fwrite($handle,$warning);
|
||||
fclose($handle);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -358,6 +360,7 @@ xml_parser_free($xml_parser);
|
||||
$culhmdevs=array();
|
||||
$fhtdevs=array();
|
||||
$logpaths=array();
|
||||
$actors=array();
|
||||
|
||||
for($i=0; $i < count($stack[0][children]); $i++)
|
||||
{
|
||||
@ -852,6 +855,7 @@ ht><font $fontcolor1><b>
|
||||
$counter++;
|
||||
echo"<a href='$phpfileurl?Action=exec&order=$order&showroom=$showroom$link'><img src='include/fs20.php?drawfs20=$fs20&statefs20=$state&datefs20=$measured&icon=$icon&emap=$emap&subType=$subType&room=$room'></a>";
|
||||
if (fmod($counter,$fs20maxiconperline)== 0.0) echo "<br>";
|
||||
array_push($actors,array($phpfileurl,$order,$showroom,$link,$fs20,$state,$measured,$icon,$emap,$subType,$room));
|
||||
};
|
||||
# $fs20="";
|
||||
$state="";
|
||||
|
Loading…
Reference in New Issue
Block a user