diff --git a/fhem/CHANGED b/fhem/CHANGED index 572f5fa34..4985317af 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -411,7 +411,7 @@ - feature: webpgm2 generates SVG's from logs: no need for gnuplot - bugfix: examples corrected to work with current syntax -- ==DATE== (4.4) +- 2008-08-04 (4.4) - feature: RM100-2 battery empty warning (mare 23.07.08) - feature: optimising the pgm2/SVG memory usage - feature: autoloading FHEM modules @@ -421,3 +421,6 @@ - feature: HMS100-FIT added (01.01.08 by Peter and 22.01.08 by Juergen) - feature: 91_watchdog added to handle the HMS100-FIT - feature: cum_kWh/cum_m3 added to EMWZ/EMGZ (11.01.08 by Peter) + +- ==DATE== (4.5) + - feature: further 01_FHEMWEB cleanup diff --git a/fhem/FHEM/92_FileLog.pm b/fhem/FHEM/92_FileLog.pm index ca2ba1a7e..d21943033 100755 --- a/fhem/FHEM/92_FileLog.pm +++ b/fhem/FHEM/92_FileLog.pm @@ -41,7 +41,7 @@ FileLog_Define($@) my @t = localtime; my $f = ResolveDateWildcards($a[2], @t); $fh = new IO::File ">>$f"; - return "Can't open $f" if(!defined($fh)); + return "Can't open $f: $!" if(!defined($fh)); $hash->{FH} = $fh; $hash->{REGEXP} = $a[3]; @@ -226,6 +226,7 @@ FileLog_Get($@) } my %lastdate; + my $d; # Used by eval functions while(my $l = <$ifh>) { last if($l gt $to); my @fld = split("[ \r\n]+", $l); # 40% @@ -263,7 +264,6 @@ FileLog_Get($@) } $h->{last2} = $fld[$col]; $lastdate{$hd} = $fld[0]; - next if(!$line); } elsif($t == 3) { # int function my $val = $fld[$col]; @@ -272,6 +272,7 @@ FileLog_Get($@) } else { # evaluate $line = "$fld[0] " . eval($h->{fn}) . "\n"; } + next if(!$line); if($outf eq "-") { $h->{ret} .= $line; @@ -318,7 +319,7 @@ FileLog_Get($@) } if($internal) { $internal_data = \$ret; - return "OK"; + return undef; } return ($outf eq "-") ? $ret : join(" ", @fname); diff --git a/fhem/docs/HOWTO.html b/fhem/docs/HOWTO.html index 1ccfc64d5..a12d95e70 100644 --- a/fhem/docs/HOWTO.html +++ b/fhem/docs/HOWTO.html @@ -225,6 +225,14 @@
  • Start httpd with the startssl option (SSL or the like must be set in one of your system files, look at /etc/init.d/httpd).
  • +

    + + To display "foreign" (non fhem) files as a plot or a just as plain text, + configure a fake logfile with the correct filename and an unused regexp, + e.g.
    +      define messages FileLog /var/log/messages fakelog
    +      
    +

    diff --git a/fhem/docs/commandref.html b/fhem/docs/commandref.html index 80096891f..cf7288008 100644 --- a/fhem/docs/commandref.html +++ b/fhem/docs/commandref.html @@ -515,17 +515,25 @@ fs20usr as an SVG script to the frontend, which will compute the image: no need for gnuplot on the backend. + See also the attribute fixedrange.
  • plotsize
    Can be applied to FHEMWEB devices. (webfrontend/pgm2)
    Specifies - the defult size of the plot, in pixels, separated by comma: + the default size of the plot, in pixels, separated by comma: width,height. You can set individual sizes by setting the plotsize of the weblink.

  • - - + + +
  • fixedrange
    + Can be applied to weblink devices (FHEMWEB).
    + Contains two time specs in the form YYYY-MM-DD separated by a space. + In plotmode gnuplot-scroll or SVG the given time-range will be used, + and no scrolling for this weblinks will be possible. Needed e.g. for + looking at last-years data without scrolling. +

  • Examples: