statistics: docu
git-svn-id: https://svn.fhem.de/fhem/trunk@7342 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -1065,6 +1065,7 @@ sub statistics_UpdateDevReading($$$$)
|
|||||||
|
|
||||||
<a name="statistics"></a>
|
<a name="statistics"></a>
|
||||||
<h3>statistics</h3>
|
<h3>statistics</h3>
|
||||||
|
(en | <a href="commandref_DE.html#statistics">de</a>)
|
||||||
<div style="width:800px">
|
<div style="width:800px">
|
||||||
<ul>
|
<ul>
|
||||||
This modul calculates for certain readings of given devices statistical values and adds them to the devices.
|
This modul calculates for certain readings of given devices statistical values and adds them to the devices.
|
||||||
@@ -1074,22 +1075,26 @@ sub statistics_UpdateDevReading($$$$)
|
|||||||
<br>
|
<br>
|
||||||
<li><b>Min|Avg|Max</b> Minimum, average and maximum of instantaneous values:
|
<li><b>Min|Avg|Max</b> Minimum, average and maximum of instantaneous values:
|
||||||
<br>
|
<br>
|
||||||
over a period of day, month and year: <i>brightness, current, energy_current, humidity, temperature, voltage</i>
|
over a period of day, month and year:
|
||||||
<br>
|
<br>
|
||||||
over a period of hour, day, month and year: <i>wind, wind_speed, windSpeed</i>
|
<i>brightness, current, energy_current, humidity, temperature, voltage</i>
|
||||||
|
<br>
|
||||||
|
over a period of hour, day, month and year:
|
||||||
|
<br>
|
||||||
|
<i>wind, wind_speed, windSpeed</i>
|
||||||
</li><br>
|
</li><br>
|
||||||
<li><b>Tendency</b> over 1h, 2h, 3h und 6h: <i>pressure</i>
|
<li><b>Tendency</b> over 1h, 2h, 3h und 6h: <i>pressure</i>
|
||||||
</li><br>
|
</li><br>
|
||||||
<li><b>Delta</b> between start and end values over a period of hour, day, month and year:
|
<li><b>Delta</b> between start and end values - over a period of hour, day, month and year:
|
||||||
<br>
|
<br>
|
||||||
<i>count, energy, energy_total, power, total, rain, rain_rate, rain_total</i>
|
<i>count, energy, energy_total, power, total, rain, rain_rate, rain_total</i>
|
||||||
</li><br>
|
</li><br>
|
||||||
<li><b>Duration</b> (and counter) of the states over a period of day, month and year:
|
<li><b>Duration</b> (and counter) of the states (on, off, open, closed...) over a period of day, month and year:
|
||||||
<br>
|
<br>
|
||||||
<i>lightsensor, lock, motion, Window, window, state (if no other reading is recognized)</i>
|
<i>lightsensor, lock, motion, Window, window, state (if no other reading is recognized)</i>
|
||||||
</li><br>
|
</li><br>
|
||||||
</ul>
|
</ul>
|
||||||
Further readings can be added via the correspondent <a href="#statisticsattr">attribute</a>.
|
Further readings can be added via the correspondent <a href="#statisticsattr">attributes</a>.
|
||||||
This allows also to assign a reading to another statistic type.
|
This allows also to assign a reading to another statistic type.
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
@@ -1118,19 +1123,19 @@ sub statistics_UpdateDevReading($$$$)
|
|||||||
<li><code>resetStatistics <All|DeviceName></code>
|
<li><code>resetStatistics <All|DeviceName></code>
|
||||||
<br>
|
<br>
|
||||||
Resets the statistic values of the selected device.
|
Resets the statistic values of the selected device.
|
||||||
<br></li>
|
</li><br>
|
||||||
<li><code>doStatistics</code>
|
<li><code>doStatistics</code>
|
||||||
<br>
|
<br>
|
||||||
Calculates the current statistic values of all monitored devices.
|
Calculates the current statistic values of all monitored devices.
|
||||||
<br></li>
|
</li><br>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
|
||||||
|
|
||||||
|
<br>
|
||||||
<b>Get</b>
|
<b>Get</b>
|
||||||
<ul>not implemented yet
|
<ul>not implemented yet
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
|
||||||
|
|
||||||
|
<br>
|
||||||
<a name="statisticsattr"></a>
|
<a name="statisticsattr"></a>
|
||||||
<b>Attributes</b>
|
<b>Attributes</b>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -1147,14 +1152,16 @@ sub statistics_UpdateDevReading($$$$)
|
|||||||
<br>
|
<br>
|
||||||
Comma separated list of reading names for which a duration statistic shall be calculated.
|
Comma separated list of reading names for which a duration statistic shall be calculated.
|
||||||
</li><br>
|
</li><br>
|
||||||
<li><code>excludedReadings <code><DeviceRegExp:ReadingNameRegExp></code></code>
|
<li><code>excludedReadings <DeviceRegExp:ReadingNameRegExp></code>
|
||||||
<br>
|
<br>
|
||||||
Regular expression of the readings that shall be excluded from the statistics.<br>
|
Regular expression of the readings that shall be excluded from the statistics.<br>
|
||||||
The reading have to be entered in the form <i>deviceName:readingName</i>. E.g. <code>FritzDect:current|Sensor_.*:humidity</code>
|
The reading have to be entered in the form <i>deviceName:readingName</i>.
|
||||||
|
<br>
|
||||||
|
E.g. <code>FritzDect:current|Sensor_.*:humidity</code>
|
||||||
<br>
|
<br>
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<li><code>ignoreDefaultAssignments <code><1 | 0></code></code>
|
<li><code>ignoreDefaultAssignments <code>< 0 | 1 ></code></code>
|
||||||
<br>
|
<br>
|
||||||
Ignores the default assignments of readings to a statistic type (see above).<br>
|
Ignores the default assignments of readings to a statistic type (see above).<br>
|
||||||
So, only the readings that are listed in the specific attributes are evaluated.
|
So, only the readings that are listed in the specific attributes are evaluated.
|
||||||
@@ -1167,9 +1174,9 @@ sub statistics_UpdateDevReading($$$$)
|
|||||||
</li><br>
|
</li><br>
|
||||||
<li><code>periodChangePreset <seconds></code>
|
<li><code>periodChangePreset <seconds></code>
|
||||||
<br>
|
<br>
|
||||||
Start of the calculation of periodical data before each full hour. Default is 5 Sekunden.
|
Preponed start of the calculation of periodical data. Default is 5 seconds before each full hour.
|
||||||
<br>
|
<br>
|
||||||
Allows the correct timely assignment within plots, can be adapted to CPU load.
|
Allows thus the correct timely assignment within plots. Should be adapted to the CPU speed or load of the server.
|
||||||
<br>
|
<br>
|
||||||
</li><br>
|
</li><br>
|
||||||
<li><code>singularReadings <DeviceRegExp:ReadingRegExp>:statTypes:period</code>
|
<li><code>singularReadings <DeviceRegExp:ReadingRegExp>:statTypes:period</code>
|
||||||
@@ -1202,25 +1209,34 @@ sub statistics_UpdateDevReading($$$$)
|
|||||||
|
|
||||||
<a name="statistics"></a>
|
<a name="statistics"></a>
|
||||||
<h3>statistics</h3>
|
<h3>statistics</h3>
|
||||||
|
(<a href="commandref.html#statistics">en</a> | de)
|
||||||
<div style="width:800px">
|
<div style="width:800px">
|
||||||
<ul>
|
<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.
|
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.
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
Derzeit werden die folgenden Statistik-Typen für bestimmte Gerätewerte vom Modul automatisch berechnet:
|
Es unterscheidet in vier Statistik-Typen denen bereits standardmässig Gerätewerte zugeordnet sind:
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>Min|Avg|Max</b> Minimum, Durchschnitt und Maximum von Momentanwerten:
|
<li><b>Min|Avg|Max</b> Minimum, Durchschnitt und Maximum von Momentanwerten:
|
||||||
<br>
|
<br>
|
||||||
über den Zeitraum Tag, Monat und Jahr: <i>brightness, current, energy_current, humidity, temperature, voltage</i>
|
über den Zeitraum Tag, Monat und Jahr:
|
||||||
<br>
|
<br>
|
||||||
über den Zeitraum Stunde, Tag, Monat und Jahr: <i>wind, wind_speed, windSpeed</i></li>
|
<i>brightness, current, energy_current, humidity, temperature, voltage</i>
|
||||||
<li><b>Tendency</b> Tendenz über 1h, 2h, 3h und 6h: <i>pressure</i></li>
|
<br>
|
||||||
|
über den Zeitraum Stunde, Tag, Monat und Jahr:
|
||||||
|
<br>
|
||||||
|
<i>wind, wind_speed, windSpeed</i>
|
||||||
|
</li><br>
|
||||||
|
<li><b>Tendency</b> Tendenz über 1h, 2h, 3h und 6h: <i>pressure</i>
|
||||||
|
</li><br>
|
||||||
<li><b>Delta</b> Differenz zwischen Anfangs- und Endwerte innerhalb eines Zeitraums (Stunde, Tag, Monat, Jahr):
|
<li><b>Delta</b> Differenz zwischen Anfangs- und Endwerte innerhalb eines Zeitraums (Stunde, Tag, Monat, Jahr):
|
||||||
<br>
|
<br>
|
||||||
<i>count, energy, energy_total, power, total, rain, rain_rate, rain_total</i></li>
|
<i>count, energy, energy_total, power, total, rain, rain_rate, rain_total</i>
|
||||||
<li><b>Duration</b> Dauer und Anzahl der Zustände (on, off, open, closed ...) innerhalb eines Zeitraums (Tag, Monat, Jahr):
|
</li><br>
|
||||||
|
<li><b>Duration</b> Dauer und Anzahl der Zustände (on, off, open, closed...) innerhalb eines Zeitraums (Tag, Monat, Jahr):
|
||||||
<br>
|
<br>
|
||||||
<i>lightsensor, lock, motion, Window, window, state (wenn kein anderer Gerätewert gültig)</i></li>
|
<i>lightsensor, lock, motion, Window, window, state (wenn kein anderer Gerätewert gültig)</i>
|
||||||
|
</li><br>
|
||||||
</ul>
|
</ul>
|
||||||
Über die entsprechenden <a href="#statisticsattr">Attribute</a> können weitere Gerätewerte hinzugefügt oder
|
Über die entsprechenden <a href="#statisticsattr">Attribute</a> können weitere Gerätewerte hinzugefügt oder
|
||||||
einem anderem Statistik-Typ zugeordnet werden.
|
einem anderem Statistik-Typ zugeordnet werden.
|
||||||
@@ -1287,9 +1303,9 @@ sub statistics_UpdateDevReading($$$$)
|
|||||||
<br>
|
<br>
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<li><code>ignoreDefaultAssignments <code><1 | 0></code></code>
|
<li><code>ignoreDefaultAssignments <code><0 | 1></code></code>
|
||||||
<br>
|
<br>
|
||||||
Ignoriert die oben beschriebene Standardzuordnung von Gerätewerten zu Statistiktypen..<br>
|
Ignoriert die Standardzuordnung von Gerätewerten zu Statistiktypen..<br>
|
||||||
D.h., nur die Gerätewerte, die über Attribute den Statistiktypen zugeordnet sind, werden ausgewertet.
|
D.h., nur die Gerätewerte, die über Attribute den Statistiktypen zugeordnet sind, werden ausgewertet.
|
||||||
<br>
|
<br>
|
||||||
</li><br>
|
</li><br>
|
||||||
@@ -1309,15 +1325,19 @@ sub statistics_UpdateDevReading($$$$)
|
|||||||
Erlaubt die korrekte zeitliche Zuordnung in Plots, kann je nach Systemauslastung verringert oder vergrößert werden.
|
Erlaubt die korrekte zeitliche Zuordnung in Plots, kann je nach Systemauslastung verringert oder vergrößert werden.
|
||||||
<br>
|
<br>
|
||||||
</li><br>
|
</li><br>
|
||||||
<li><code>singularReadings <GeräteNameRegExp:GeräteWertRegExp:Statistiktypen:Zeitraum></code>
|
<li><code>singularReadings <GerätRegExp:GeräteWertRegExp:Statistiktyp:Zeitraum></code>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Statistiktypen: Min|Avg|Max|Delta|<i>DurationState</i>|<span style="color:blue;">Tendency</span></li>
|
<li>Statistiktyp: Min|Avg|Max|Delta|<i>DurationState</i>|<span style="color:blue;">Tendency</span></li>
|
||||||
<li>Zeitraum: Hour|Day|Month|Year|<span style="color:blue;">1h|2h|3h|6h</span></li>
|
<li>Zeitraum: Hour|Day|Month|Year|<span style="color:blue;">1h|2h|3h|6h</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
Regulärer Ausdruck statistischer Werte, die nicht nur in zusammengefassten sondern auch als einzelne Werte gespeichert werden sollen.
|
Regulärer Ausdruck statistischer Werte, die nicht nur in zusammengefassten sondern auch als einzelne Werte gespeichert werden sollen.
|
||||||
Erleichtert die Erzeugung von Plots und anderer Auswertungen (notify). Für "duration"-Gerätewerte muss der Name des jeweiligen Statuswertes als Statistiktyp eingesetzt werden.
|
Erleichtert die Erzeugung von Plots und anderer Auswertungen (notify).
|
||||||
<br>
|
<br>
|
||||||
Beispiel: <code>Wettersensor:rain:Delta:(Hour|Day)|FritzDect:power:Delta:Day</code>
|
Für "duration"-Gerätewerte muss der Name des jeweiligen Statuswertes als <code>Statistiktyp</code> eingesetzt werden.
|
||||||
|
<br>
|
||||||
|
Beispiel:
|
||||||
|
<br>
|
||||||
|
<code>Wettersensor:rain:Delta:(Hour|Day)|FritzDect:power:Delta:Day</code>
|
||||||
<br>
|
<br>
|
||||||
<code>Badfenster:Window:(Open|Open_Count):Month</code>
|
<code>Badfenster:Window:(Open|Open_Count):Month</code>
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|||||||
Reference in New Issue
Block a user