mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-19 12:46:03 +00:00
statistics: added reading luminosity
git-svn-id: https://svn.fhem.de/fhem/trunk@12128 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
9196ea2e91
commit
f2613a388f
@ -72,6 +72,7 @@ sub statistics_UpdateDevReading($$$$);
|
|||||||
,"humidity" => 1
|
,"humidity" => 1
|
||||||
,"lightsensor" => 3
|
,"lightsensor" => 3
|
||||||
,"lock" => 3
|
,"lock" => 3
|
||||||
|
,"luminosity" => 1
|
||||||
,"motion" => 3
|
,"motion" => 3
|
||||||
,"power" => 1
|
,"power" => 1
|
||||||
,"pressure" => 4
|
,"pressure" => 4
|
||||||
@ -189,7 +190,8 @@ sub statistics_Set($$@)
|
|||||||
my $resultStr = "";
|
my $resultStr = "";
|
||||||
|
|
||||||
if ($cmd eq 'resetStatistics') {
|
if ($cmd eq 'resetStatistics') {
|
||||||
if ($val ne "") {
|
if ($val ne "") {
|
||||||
|
Log3 $name, 3, "statistics: set $name $cmd $val";
|
||||||
my $regExp;
|
my $regExp;
|
||||||
if ($val eq "all") { $regExp = ""; }
|
if ($val eq "all") { $regExp = ""; }
|
||||||
else { $regExp = $val.":.*"; }
|
else { $regExp = $val.":.*"; }
|
||||||
@ -210,6 +212,7 @@ sub statistics_Set($$@)
|
|||||||
return $resultStr;
|
return $resultStr;
|
||||||
|
|
||||||
} elsif ($cmd eq 'doStatistics') {
|
} elsif ($cmd eq 'doStatistics') {
|
||||||
|
Log3 $name, 3, "statistics: set $name $cmd";
|
||||||
statistics_DoStatisticsAll($hash,0);
|
statistics_DoStatisticsAll($hash,0);
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
@ -542,7 +545,8 @@ sub statistics_doStatisticMinMaxSingle ($$$$$$)
|
|||||||
$hidden[1] = 0; $hidden[3] = 0; $hidden[9] = 1;
|
$hidden[1] = 0; $hidden[3] = 0; $hidden[9] = 1;
|
||||||
$stat[1] = $value; $stat[3] = $value; $stat[5] = $value;
|
$stat[1] = $value; $stat[3] = $value; $stat[5] = $value;
|
||||||
$stat[7] = strftime ("%Y-%m-%d_%H:%M:%S",localtime() );
|
$stat[7] = strftime ("%Y-%m-%d_%H:%M:%S",localtime() );
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
# Do calculations if hidden reading exists
|
# Do calculations if hidden reading exists
|
||||||
@hidden = split / /, $hash->{READINGS}{$hiddenReadingName}{VAL}; # Internal values
|
@hidden = split / /, $hash->{READINGS}{$hiddenReadingName}{VAL}; # Internal values
|
||||||
@stat = split / /, $dev->{READINGS}{$statReadingName}{VAL};
|
@stat = split / /, $dev->{READINGS}{$statReadingName}{VAL};
|
||||||
@ -1141,6 +1145,10 @@ sub statistics_UpdateDevReading($$$$)
|
|||||||
=pod
|
=pod
|
||||||
=begin html
|
=begin html
|
||||||
|
|
||||||
|
=item helper
|
||||||
|
=item summary Calculates for statistical values and adds them to the devices.
|
||||||
|
=item summary_DE Berechnet statistische Werte und fügt sie dem Gerät hinzu.
|
||||||
|
|
||||||
<a name="statistics"></a>
|
<a name="statistics"></a>
|
||||||
<h3>statistics</h3>
|
<h3>statistics</h3>
|
||||||
(en | <a href="http://fhem.de/commandref_DE.html#statistics">de</a>)
|
(en | <a href="http://fhem.de/commandref_DE.html#statistics">de</a>)
|
||||||
@ -1157,7 +1165,7 @@ sub statistics_UpdateDevReading($$$$)
|
|||||||
<br>
|
<br>
|
||||||
over a period of day, month and year:
|
over a period of day, month and year:
|
||||||
<br>
|
<br>
|
||||||
<i>brightness, current, energy_current, humidity, temperature, voltage</i>
|
<i>brightness, current, energy_current, humidity, luminosity, temperature, voltage</i>
|
||||||
<br>
|
<br>
|
||||||
over a period of hour, day, month and year:
|
over a period of hour, day, month and year:
|
||||||
<br>
|
<br>
|
||||||
@ -1325,7 +1333,7 @@ sub statistics_UpdateDevReading($$$$)
|
|||||||
<br>
|
<br>
|
||||||
über den Zeitraum Tag, Monat und Jahr:
|
über den Zeitraum Tag, Monat und Jahr:
|
||||||
<br>
|
<br>
|
||||||
<i>brightness, current, energy_current, humidity, temperature, voltage</i>
|
<i>brightness, current, energy_current, humidity, luminosity, temperature, voltage</i>
|
||||||
<br>
|
<br>
|
||||||
über den Zeitraum Stunde, Tag, Monat und Jahr:
|
über den Zeitraum Stunde, Tag, Monat und Jahr:
|
||||||
<br>
|
<br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user