diff --git a/FHEM/14_CUL_WS.pm b/FHEM/14_CUL_WS.pm index b65cb715c..d2fb7c94b 100755 --- a/FHEM/14_CUL_WS.pm +++ b/FHEM/14_CUL_WS.pm @@ -27,7 +27,7 @@ CUL_WS_Initialize($) $hash->{DefFn} = "CUL_WS_Define"; $hash->{UndefFn} = "CUL_WS_Undef"; $hash->{ParseFn} = "CUL_WS_Parse"; - $hash->{AttrList} = "do_not_notify:0,1 showtime:0,1 model:S300TH loglevel"; + $hash->{AttrList} = "do_not_notify:0,1 showtime:0,1 model:S300TH,KS300 loglevel"; } @@ -41,8 +41,8 @@ CUL_WS_Define($$) return "wrong syntax: define CUL_WS [corr1...corr4]" if(int(@a) < 3 || int(@a) > 6); $a[2] = lc($a[2]); - return "Define $a[0]: wrong CODE format: valid is 1-7" - if($a[2] !~ m/^[1-7]$/); + return "Define $a[0]: wrong CODE format: valid is 1-8" + if($a[2] !~ m/^[1-8]$/); $hash->{CODE} = $a[2]; $hash->{corr1} = ((int(@a) > 3) ? $a[3] : 0); @@ -79,7 +79,7 @@ CUL_WS_Parse($$) my $firstbyte = hex($a[1]); my $cde = ($firstbyte&7) + 1; - my $type = $tlist{$a[2]} ? $tlist{$a[2]} : "unknown"; + my $type = $tlist{$a[2]} ? $tlist{$a[2]} : "unknown"; if(!$defptr{$cde}) { Log 1, "CUL_WS UNDEFINED $type sensor detected, code $cde"; return "UNDEFINED CUL_WS: $cde"; diff --git a/FHEM/15_CUL_EM.pm b/FHEM/15_CUL_EM.pm index a45c29597..0e9f0bac9 100755 --- a/FHEM/15_CUL_EM.pm +++ b/FHEM/15_CUL_EM.pm @@ -19,7 +19,7 @@ CUL_EM_Initialize($) $hash->{DefFn} = "CUL_EM_Define"; $hash->{UndefFn} = "CUL_EM_Undef"; $hash->{ParseFn} = "CUL_EM_Parse"; - $hash->{AttrList} = "do_not_notify:0,1 showtime:0,1 model:S300TH loglevel"; + $hash->{AttrList} = "do_not_notify:0,1 showtime:0,1 model:EMEM,EMWZ,EMGZ loglevel"; } ##################################### diff --git a/FHEM/50_WS300.pm b/FHEM/50_WS300.pm index 43d3f640b..0fcb08157 100644 --- a/FHEM/50_WS300.pm +++ b/FHEM/50_WS300.pm @@ -64,18 +64,18 @@ WS300_Initialize($) my ($hash) = @_; # Provider - $hash->{Clients} = ":WS300:"; - $hash->{ReadFn} = "WS300_Read"; - $hash->{WriteFn} = "WS300_Write"; - $hash->{Type} = "FHZ1000"; - $hash->{Match} = "^WS300.*"; - $hash->{SetFn} = "WS300_Set"; - $hash->{GetFn} = "WS300_Get"; - $hash->{DefFn} = "WS300_Define"; - $hash->{UndefFn} = "WS300_Undef"; - $hash->{ParseFn} = "WS300_Parse"; - $hash->{ReadFn} = "WS300_Read"; $hash->{AttrList} = "do_not_notify:0,1 showtime:0,1 model:ws300 loglevel:0,1,2,3,4,5,6"; + $hash->{DefFn} = "WS300_Define"; + $hash->{GetFn} = "WS300_Get"; + $hash->{ParseFn} = "WS300_Parse"; + $hash->{SetFn} = "WS300_Set"; + $hash->{UndefFn} = "WS300_Undef"; + + $hash->{Clients} = ":WS300:"; # Not needed + $hash->{Match} = "^WS300.*"; # Not needed + $hash->{ReadFn} = "WS300_Read"; # Not needed + $hash->{Type} = "FHZ1000"; # Not needed + $hash->{WriteFn} = "WS300_Write"; # Not needed } ################################### diff --git a/FHEM/90_at.pm b/FHEM/90_at.pm index bc165cd74..95a12fc07 100755 --- a/FHEM/90_at.pm +++ b/FHEM/90_at.pm @@ -66,6 +66,7 @@ at_Define($$) } $hash->{NTM} = $ntm if($rel eq "+" || $fn); $hash->{TRIGGERTIME} = $nt; + RemoveInternalTimer($name); InternalTimer($nt, "at_Exec", $name, 0); $hash->{STATE} = ("Next: " . FmtTime($nt)) diff --git a/webfrontend/pgm2/01_FHEMWEB.pm b/webfrontend/pgm2/01_FHEMWEB.pm index 06bb57122..12921f63b 100755 --- a/webfrontend/pgm2/01_FHEMWEB.pm +++ b/webfrontend/pgm2/01_FHEMWEB.pm @@ -794,6 +794,8 @@ FW_showLog($) if($pm =~ m/gnuplot/) { my $tmpfile = "/tmp/file.$$"; + my $errfile = "/tmp/gnuplot.err"; + if($pm eq "gnuplot" || !$__devs{$d}{from}) { # Looking for the logfile.... @@ -819,7 +821,7 @@ FW_showLog($) $gplot_script =~ s/(set timefmt ".*")/$1\n$fr/; } - open(FH, "|gnuplot > /dev/null");# feed it to gnuplot + open(FH, "|gnuplot >> $errfile 2>&1");# feed it to gnuplot print FH $gplot_script; close(FH); @@ -864,7 +866,7 @@ FW_showLog($) close(FH); } - open(FH, "|gnuplot > /dev/null");# feed it to gnuplot + open(FH, "|gnuplot >> $errfile 2>&1");# feed it to gnuplot print FH $gplot_script, $xrange, $plot; close(FH); foreach my $p (@path) { diff --git a/webfrontend/pgm2/cul_em.gplot b/webfrontend/pgm2/cul_em.gplot new file mode 100644 index 000000000..e15fe0165 --- /dev/null +++ b/webfrontend/pgm2/cul_em.gplot @@ -0,0 +1,25 @@ +############################ +# Display the power reported by the EM1010 +# Corresponding FileLog definition: +# define ememlog FileLog /var/log/fhem/emem-%Y.log emem:power.* + +set terminal png transparent size crop +set output '.png' +set xdata time +set timefmt "%Y-%m-%d_%H:%M:%S" +set xlabel " " + +set title '' +set ylabel "Power (KW)" +set y2label "Power (KW)" +set grid +set ytics +set y2tics +set format y "%.1f" +set format y2 "%.1f" + +#FileLog 8:emem:0: +#FileLog 8:emwz:0: + +plot "" using 1:8 title 'EMEM' with lines,\ + "" using 1:8 title 'EMWZ' with lines diff --git a/webfrontend/pgm2/cul_ws.gplot b/webfrontend/pgm2/cul_ws.gplot new file mode 100644 index 000000000..bc6e2db98 --- /dev/null +++ b/webfrontend/pgm2/cul_ws.gplot @@ -0,0 +1,27 @@ +############################ +# Display the s300th data reported by the CUL +# Corresponding FileLog definition: +# define ememlog FileLog /var/log/fhem/s300th-%Y.log s300th.* + +set terminal png transparent size crop +set output '.png' +set xdata time +set timefmt "%Y-%m-%d_%H:%M:%S" +set xlabel " " + +set title '' +set ylabel "Temp (C)" +set y2label "Temp (C)" +set grid +set ytics +set y2tics +set format y "%.1f" +set format y2 "%.1f" + +#FileLog 4:s300th1:0: +#FileLog 4:s300th3:0: +#FileLog 4:s300th5:0: + +plot "" using 1:8 title '1' with lines,\ + "" using 1:8 title '3' with lines,\ + "" using 1:8 title '5' with lines