mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 13:24:56 +00:00
statistics: NOTIFYDEV
git-svn-id: https://svn.fhem.de/fhem/trunk@16357 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
9d1a5700d7
commit
833c483791
@ -124,7 +124,6 @@ sub statistics_Initialize($)
|
||||
$hash->{DefFn} = "statistics_Define";
|
||||
$hash->{UndefFn} = "statistics_Undefine";
|
||||
$hash->{NotifyFn} = "statistics_Notify";
|
||||
$hash->{NOTIFYDEV} = "global";
|
||||
$hash->{SetFn} = "statistics_Set";
|
||||
|
||||
$hash->{NotifyOrderPrefix} = "10-"; # Want to be called before the rest
|
||||
@ -155,7 +154,7 @@ sub statistics_Define($$)
|
||||
|
||||
my $name = $a[0];
|
||||
my $devName = $a[2];
|
||||
|
||||
|
||||
if (@a == 4) {$hash->{PREFIX} = $a[3];}
|
||||
else {$hash->{PREFIX} = "stat";}
|
||||
|
||||
@ -163,6 +162,9 @@ sub statistics_Define($$)
|
||||
return "Bad regexp: $@" if($@);
|
||||
$hash->{DEV_REGEXP} = $devName;
|
||||
|
||||
# Only global and the devices in devName should trigger the notify sub of statistics
|
||||
$hash->{NOTIFYDEV} = "global,".$devName;
|
||||
|
||||
$hash->{STATE} = "Waiting for notifications";
|
||||
$hash->{fhem}{modulVersion} = '$Date$';
|
||||
|
||||
@ -1158,7 +1160,6 @@ sub statistics_UpdateDevReading($$$$)
|
||||
|
||||
<a name="statistics"></a>
|
||||
<h3>statistics</h3>
|
||||
(en | <a href="http://fhem.de/commandref_DE.html#statistics">de</a>)
|
||||
<div>
|
||||
<ul>
|
||||
This modul calculates for certain readings of given devices statistical values and adds them to the devices.
|
||||
@ -1326,7 +1327,6 @@ sub statistics_UpdateDevReading($$$$)
|
||||
|
||||
<a name="statistics"></a>
|
||||
<h3>statistics</h3>
|
||||
(<a href="http://fhem.de/commandref.html#statistics">en</a> | de)
|
||||
<div>
|
||||
<ul>
|
||||
Dieses Modul wertet von den angegebenen Geräten (als regulärer Ausdruck) bestimmte Werte statistisch aus und fügt das Ergebnis den jeweiligen Geräten als neue Werte hinzu.
|
||||
|
Loading…
x
Reference in New Issue
Block a user