diff --git a/fhem/FHEM/01_FHEMWEB.pm b/fhem/FHEM/01_FHEMWEB.pm
index d4d4949e9..46922c325 100755
--- a/fhem/FHEM/01_FHEMWEB.pm
+++ b/fhem/FHEM/01_FHEMWEB.pm
@@ -454,7 +454,10 @@ FW_answerCall($)
#Returns undef if it already sent a HTTP header
($FW_RETTYPE, $FW_RET) = &{$h->{FUNC}}($arg);
use strict "refs";
- last if(!$FW_RET);
+ if(!$FW_RET) {
+ $FW_RETTYPE = "text/html; charset=$FW_encoding";
+ last;
+ }
return defined($FW_RETTYPE) ? 0 : -1;
}
}
diff --git a/fhem/FHEM/98_weblink.pm b/fhem/FHEM/98_weblink.pm
index bbef51018..4590cda13 100755
--- a/fhem/FHEM/98_weblink.pm
+++ b/fhem/FHEM/98_weblink.pm
@@ -295,9 +295,10 @@ wl_PEdit($$$$)
$ret .="
Y-Axis,Plot-Type,Style | ";
my ($colnums, $colregs, $coldata) = wl_getRegFromFile($file);
- $colnums = join(",", 3..$colnums);
+ $colnums = join(",", 4..$colnums);
my $max = @{$conf{lAxis}}+1;
$max = 7 if($max > 7);
+ $max = 1 if(!$conf{lTitle}[0]);
my $r = 0;
for($r=0; $r < $max; $r++) {
$ret .= "";
@@ -339,6 +340,12 @@ weblink_WriteGplot($)
my ($arg) = @_;
FW_digestCgi($arg);
+ my $hasTl;
+ for(my $i=0; $i <= 8; $i++) {
+ $hasTl = 1 if($FW_webArgs{"title_$i"});
+ }
+ return if(!$hasTl);
+
my $fName = $FW_webArgs{gplotName};
return if(!$fName);
if(!open(FH, ">$fName")) {
@@ -351,7 +358,7 @@ weblink_WriteGplot($)
print FH "set xdata time\n";
print FH "set timefmt \"%Y-%m-%d_%H:%M:%S\"\n";
print FH "set xlabel \" \"\n";
- print FH "set title ''\n";
+ print FH "set title ''\n";
print FH "set ytics ".$FW_webArgs{ytics}."\n";
print FH "set y2tics ".$FW_webArgs{y2tics}."\n";
print FH "set grid".($FW_webArgs{gridy} ? " ytics" :"").
diff --git a/fhem/www/gplot/template.gplot b/fhem/www/gplot/template.gplot
index f98816ab3..c03fbe4f7 100644
--- a/fhem/www/gplot/template.gplot
+++ b/fhem/www/gplot/template.gplot
@@ -10,14 +10,12 @@ set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set title ''
-set ylabel "Power (KW)"
-set y2label "Power (KW)"
+set ylabel "Humidity"
+set y2label "Temperature"
set grid
set ytics
set y2tics
-set format y "%.1f"
-set format y2 "%.1f"
-#FileLog 4::0:
+#FileLog 4:RegExp::
-plot "" using 1:4 notitle with lines
+plot "" using 1:2 title 'Line 1' with lines
|