2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

FileLog avg fix

git-svn-id: https://svn.fhem.de/fhem/trunk@613 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2010-04-02 10:22:38 +00:00
parent 59877b2ce9
commit 1d8e3022c7
3 changed files with 18 additions and 13 deletions

View File

@ -153,7 +153,7 @@ FileLog_Set($@)
# - delta-h / delta-d to get rain/h and rain/d values from continuous data.
#
# It will set the %data values
# min<x>, max<x>, avg<x>, cnt<x>, lastd<x>, lastv<x>
# min<x>, max<x>, avg<x>, cnt<x>, lastd<x>, lastv<x>, sum<x>
# for each requested column, beggining with <x> = 1
sub
@ -315,8 +315,8 @@ FileLog_Get($@)
$min[$i] = $val if($min[$i] == 999999);
$max[$i] = $val if($max[$i] == -999999);
$lastv[$i] = $val if(!$lastv[$i]);
$sum[$i] = $val if(!$sum[$i]);
$cnt[$i] = 1 if(!$cnt[$i]);
$sum[$i] = ($sum[$i] ? $sum[$i] + $val : $val);
$cnt[$i]++;
my @lda = split("[_:]", $lastdate{$hd});
my $ts = "12:00:00"; # middle timestamp

View File

@ -87,6 +87,9 @@
screenshot gallery</a>
<br><br>
fheME: <a href="http://www.phynx.de/?p=108"> screenshot gallery</a>
<br><br>
iPhone frontends:
<a href="http://www.gschaden.com/wp/2009/01/18/fhem-iphone-gateway/">
fhemgw</a>,
@ -120,9 +123,8 @@
<ul>
<li>Via an attached CUL or CUN (see <a
href="http://www.busware.de">www.busware.de</a>) access to the
following protocols: FS20 (Receive/Send, all devices), EM (EM1000EM,
EM1000GZ and EM1000WZ), FHT80b, HMS, S300 (KS300, S300TH, KS555,
S555TH, etc)</li>
following protocols: FS20 (all devices), EM (EM1000EM, EM1000GZ and
EM1000WZ), FHT80b, HMS, S300 (KS300, S300TH, KS555, S555TH, etc)</li>
<br>
<li>Via an attached FHZ1000 or FHZ1300 access to the following protocols:
@ -158,6 +160,9 @@
href="http://owfs.org/index.php?page=usb-ds9490r">DS9490R</a> or <a
href="http://owfs.org/index.php?page=com-ds9097-passive">DS9097</a>
access to the following sensors: DS18S20, DS1820, DS18B20</li>
<br>
<li>Via an attached KM271 access to the Buderus Logamatic 2107</li>
</ul>
<a name="Documentation"></a>

View File

@ -18,11 +18,11 @@ set format y "%0.1f"
set ylabel "Minutes"
set yrange [0:]
#FileLog 4:Warmwasseristtemperatur:0:
#FileLog 4:Brennerlaufzeit:0:delta-h
#FileLog 4:WW_Isttemperatur:0:
#FileLog 4:Brenner_Laufzeit1_Minuten\x3a:0:delta-h
plot "<IN>" using 1:4 axes x1y2 title 'WW-Temp' with lines lw 2,\
"<grep Brennerlaufzeit <IN> | perl -ane '\
plot "<grep WW_Isttemperatur <IN>" using 1:4 axes x1y2 title 'WW-Temp' with lines lw 2,\
"<grep Brenner_Laufzeit1_Minuten: <IN> | perl -ane '\
@a = split(\"[_:]\", $F[0]);\
if(defined($lh) && $lh ne $a[1])\
{ printf(\"${ld}_$lh:30:00 %f\n\", $hv); $hv = 0; }\