98_statistics: update commandref to id format

git-svn-id: https://svn.fhem.de/fhem/trunk@26211 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2022-07-12 05:25:06 +00:00
parent 337631ebe5
commit fe3612042c

View File

@ -1167,13 +1167,15 @@ sub statistics_UpdateDevReading($$$$)
1; 1;
__END__
=pod =pod
=item summary Calculates statistical values and adds them to the devices. =item summary Calculates statistical values and adds them to the devices.
=item summary_DE Berechnet statistische Werte und fügt sie dem Gerät hinzu. =item summary_DE Berechnet statistische Werte und fügt sie dem Gerät hinzu.
=item helper =item helper
=begin html =begin html
<a name="statistics"></a> <a id="statistics"></a>
<h3>statistics</h3> <h3>statistics</h3>
<div> <div>
<ul> <ul>
@ -1207,12 +1209,10 @@ sub statistics_UpdateDevReading($$$$)
</ul> </ul>
Further readings can be added via the <a href="#statisticsattr">attributes</a> <code>deltaReadings, durationReadings, minAvgMaxReadings, tendencyReadings</code>. Further readings can be added via the <a href="#statisticsattr">attributes</a> <code>deltaReadings, durationReadings, minAvgMaxReadings, tendencyReadings</code>.
This allows also to assign a reading to another statistic type. This allows also to assign a reading to another statistic type.
<br>&nbsp;
<br> <a id="statistics-define"></a>
<h4>Define</h4>
<b>Define</b>
<ul> <ul>
<br>
<code>define &lt;name&gt; statistics &lt;deviceNameRegExp&gt; [Prefix]</code> <code>define &lt;name&gt; statistics &lt;deviceNameRegExp&gt; [Prefix]</code>
<br> <br>
Example: <code>define Statistik statistics Sensor_.*|Wettersensor</code> Example: <code>define Statistik statistics Sensor_.*|Wettersensor</code>
@ -1224,77 +1224,73 @@ sub statistics_UpdateDevReading($$$$)
<li><code>[Prefix]</code> <li><code>[Prefix]</code>
<br> <br>
Optional. Prefix set is place before statistical data. Default is <i>stat</i> Optional. Prefix set is place before statistical data. Default is <i>stat</i>
</li><br> </li>
</ul> </ul>
<br> <a id="statistics-set"></a>
<b>Set</b> <h4>Set</h4>
<ul> <ul>
<br> <a id="statistics-set-resetStatistics"></a><li><code>resetStatistics &lt;All|DeviceName&gt;</code>
<li><code>resetStatistics &lt;All|DeviceName&gt;</code>
<br> <br>
Resets the statistic values of the selected device. Resets the statistic values of the selected device.
</li><br> </li><br>
<li><code>doStatistics</code> <a id="statistics-set-doStatistics"></a><li><code>doStatistics</code>
<br> <br>
Calculates the current statistic values of all monitored devices. Calculates the current statistic values of all monitored devices.
</li><br> </li>
</ul> </ul>
<br> <a id="statistics-get"></a>
<b>Get</b> <h4>Get</h4>
<ul>not implemented yet <ul>not implemented yet
</ul> </ul>
<br> <a id="statistics-attr"></a>
<a name="statisticsattr"></a> <h4>Attributes</h4>
<b>Attributes</b>
<ul> <ul>
<br> <a id="statistics-attr-dayChangeTime"></a><li><code>dayChangeTime &lt;time&gt;</code>
<li><code>dayChangeTime &lt;time&gt;</code>
<br> <br>
Time of day change. Default is 00:00. For weather data the day change can be set e.g. to 06:50. Time of day change. Default is 00:00. For weather data the day change can be set e.g. to 06:50.
</li><br> </li><br>
<li><code>deltaReadings &lt;readings&gt;</code> <a id="statistics-attr-deltaReadings"></a><li><code>deltaReadings &lt;readings&gt;</code>
<br> <br>
Comma separated list of reading names for which a delta statistic shall be calculated. Comma separated list of reading names for which a delta statistic shall be calculated.
</li><br> </li><br>
<li><code>durationPeriodHour &lt; 1 | 0 &gt;</code> <a id="statistics-attr-durationPeriodHour"></a><li><code>durationPeriodHour &lt; 1 | 0 &gt;</code>
<br> <br>
If set to 1, then duration readings will get hourly statistics too. If set to 1, then duration readings will get hourly statistics too.
</li><br> </li><br>
<li><code>durationReadings &lt;readings&gt;</code> <a id="statistics-attr-durationReadings"></a><li><code>durationReadings &lt;readings&gt;</code>
<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 &lt;DeviceRegExp:ReadingNameRegExp&gt;</code> <a id="statistics-attr-excludedReadings"></a><li><code>excludedReadings &lt;DeviceRegExp:ReadingNameRegExp&gt;</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>. The reading have to be entered in the form <i>deviceName:readingName</i>.
<br> <br>
E.g. <code>FritzDect:current|Sensor_.*:humidity</code> E.g. <code>FritzDect:current|Sensor_.*:humidity</code>
<br> </li>
</li><br>
<li><code>ignoreDefaultAssignments <code>&lt; 0 | 1 &gt;</code></code> <a id="statistics-attr-ignoreDefaultAssignments"></a><li><code>ignoreDefaultAssignments <code>&lt; 0 | 1 &gt;</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.
<br> <br>
</li><br> </li><br>
<li><code>minAvgMaxReadings &lt;readings&gt;</code> <a id="statistics-attr-minAvgMaxReadings"></a><li><code>minAvgMaxReadings &lt;readings&gt;</code>
<br> <br>
Comma separated list of reading names for which a min/average/max statistic shall be calculated. Comma separated list of reading names for which a min/average/max statistic shall be calculated.
</li><br> </li><br>
<li><code>periodChangePreset &lt;seconds&gt;</code> <a id="statistics-attr-periodChangePreset"></a><li><code>periodChangePreset &lt;seconds&gt;</code>
<br> <br>
Preponed start of the calculation of periodical data. Default is 5 second before each full hour. Preponed start of the calculation of periodical data. Default is 5 second before each full hour.
<br> <br>
Allows thus the correct timely assignment within plots. Should be adapted to the CPU speed or load of the server. 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 &lt;DeviceRegExp:ReadingRegExp&gt;:statTypes:period</code> <a id="statistics-attr-singularReadings"></a><li><code>singularReadings &lt;DeviceRegExp:ReadingRegExp&gt;:statTypes:period</code>
<ul> <ul>
<li>statTypes: Min|Avg|Max|Delta|<i>DurationState</i>|<span style="color:blue;">Tendency</span></li> <li>statTypes: Min|Avg|Max|Delta|<i>DurationState</i>|<span style="color:blue;">Tendency</span></li>
<li>period: Hour|Day|Month|Year|<span style="color:blue;">1h|2h|3h|6h</span></li> <li>period: Hour|Day|Month|Year|<span style="color:blue;">1h|2h|3h|6h</span></li>
@ -1308,7 +1304,7 @@ sub statistics_UpdateDevReading($$$$)
<code>Badfenster:Window:(Open|Open_Count):Month</code> <code>Badfenster:Window:(Open|Open_Count):Month</code>
</dd> </dd>
</li><br> </li><br>
<li><code>specialDeltaPeriods &lt;Device:Reading:Period:count1:count2:...&gt;</code> <a id="statistics-attr-specialDeltaPeriods"></a><li><code>specialDeltaPeriods &lt;Device:Reading:Period:count1:count2:...&gt;</code>
<br> <br>
Creates for the given delta reading additional singular readings of the given numbers of a period (Hour, Day, Month) Creates for the given delta reading additional singular readings of the given numbers of a period (Hour, Day, Month)
<br> <br>
@ -1324,12 +1320,12 @@ sub statistics_UpdateDevReading($$$$)
<br> <br>
This will create 4 additional readings for the rain of the last 48 hours and the last 30 Days and the energy consumtion of the last 6 and 12 months. This will create 4 additional readings for the rain of the last 48 hours and the last 30 Days and the energy consumtion of the last 6 and 12 months.
</dd> </dd>
</li><br> </li><br>
<li><code>specialDeltaPeriodHours</code> <a id="statistics-attr-specialDeltaPeriodHours"></a><li><code>specialDeltaPeriodHours</code>
<br> <br>
depreciated depreciated
</li><br> </li><br>
<li><code>tendencyReadings &lt;readings&gt;</code> <a id="statistics-attr-tendencyReadings"></a><li><code>tendencyReadings &lt;readings&gt;</code>
<br> <br>
Comma separated list of reading names for which a tendendy statistic shall be calculated. Comma separated list of reading names for which a tendendy statistic shall be calculated.
</li><br> </li><br>
@ -1340,7 +1336,7 @@ sub statistics_UpdateDevReading($$$$)
=begin html_DE =begin html_DE
<a name="statistics"></a> <a id="statistics"></a>
<h3>statistics</h3> <h3>statistics</h3>
<div> <div>
<ul> <ul>
@ -1372,13 +1368,11 @@ sub statistics_UpdateDevReading($$$$)
<i>lightsensor, lock, motion, Window, window, state (wenn kein anderer Gerätewert gültig)</i> <i>lightsensor, lock, motion, Window, window, state (wenn kein anderer Gerätewert gültig)</i>
</li><br> </li><br>
</ul> </ul>
Über die <a href="#statisticsattr">Attribute</a> <code>deltaReadings, durationReadings, minAvgMaxReadings, tendencyReadings</code> können weitere Gerätewerte hinzugefügt oder einem anderen Statistik-Typ zugeordnet werden. Über die <a href="#statisticsattr">Attribute</a> <code>deltaReadings, durationReadings, minAvgMaxReadings, tendencyReadings</code> können weitere Gerätewerte hinzugefügt oder einem anderen Statistik-Typ zugeordnet werden.
<br>&nbsp;
<br>
<b>Define</b> <a id="statistics-define"></a>
<h4>Define</h4>
<ul> <ul>
<br>
<code>define &lt;Name&gt; statistics &lt;GeräteNameRegExp&gt; [Prefix]</code> <code>define &lt;Name&gt; statistics &lt;GeräteNameRegExp&gt; [Prefix]</code>
<br> <br>
Beispiel: <code>define Statistik statistics Wettersensor|Badsensor</code> Beispiel: <code>define Statistik statistics Wettersensor|Badsensor</code>
@ -1390,57 +1384,54 @@ sub statistics_UpdateDevReading($$$$)
<li><code>[Prefix]</code> <li><code>[Prefix]</code>
<br> <br>
Optional. Der Prefix wird vor den Namen der statistischen Gerätewerte gesetzt. Standardmäßig <i>stat</i> Optional. Der Prefix wird vor den Namen der statistischen Gerätewerte gesetzt. Standardmäßig <i>stat</i>
</li><br> </li>
</ul> </ul>
<br> <a id="statistics-set"></a>
<b>Set</b> <h4>Set</h4>
<ul> <ul>
<br> <a id="statistics-set-resetStatistics"></a><li><code>resetStatistics &lt;All|Gerätename&gt;</code>
<li><code>resetStatistics &lt;All|Gerätename&gt;</code>
<br> <br>
Setzt die Statistiken der ausgewählten Geräte zurück. Setzt die Statistiken der ausgewählten Geräte zurück.
</li><br> </li><br>
<li><code>doStatistics</code> <li><code>doStatistics</code>
<br> <br>
Berechnet die aktuellen Statistiken aller beobachteten Geräte. Berechnet die aktuellen Statistiken aller beobachteten Geräte.
</li><br> </li>
</ul> </ul>
<br>
<b>Get</b> <a id="statistics-get"></a>
<ul>nicht implementiert <h4>Get</h4>
</ul> <ul>nicht implementiert
<br> </ul>
<a name="statisticsattr"></a> <a id="statistics-attr"></a>
<b>Attributes</b> <h4>Attribute</h4>
<ul> <ul>
<br> <a id="statistics-attr-dayChangeTime"></a><li><code>dayChangeTime &lt;Zeit&gt;</code>
<li><code>dayChangeTime &lt;Zeit&gt;</code>
<br> <br>
Uhrzeit des Tageswechsels. Standardmäßig 00:00. Bei Wetterdaten kann der Tageswechsel z.B. auf 6:50 gesetzt werden. Uhrzeit des Tageswechsels. Standardmäßig 00:00. Bei Wetterdaten kann der Tageswechsel z.B. auf 6:50 gesetzt werden.
</li><br> </li><br>
<li><code>deltaReadings &lt;Gerätewerte&gt;</code> <a id="statistics-attr-deltaReadings"></a><li><code>deltaReadings &lt;Gerätewerte&gt;</code>
<br> <br>
Durch Kommas getrennte Liste von weiteren Gerätewerten, für welche die Differenz zwischen den Werten am Anfang und Ende einer Periode (Stunde/Tag/Monat/Jahr) bestimmt wird. Durch Kommas getrennte Liste von weiteren Gerätewerten, für welche die Differenz zwischen den Werten am Anfang und Ende einer Periode (Stunde/Tag/Monat/Jahr) bestimmt wird.
</li><br> </li><br>
<li><code>durationPeriodHour &lt; 1 | 0 &gt;</code> <a id="statistics-attr-durationPeriodHour"></a><li><code>durationPeriodHour &lt; 1 | 0 &gt;</code>
<br> <br>
Wenn auf 1 gesetzt, dann werden für "durationReadings" auch stündliche Statistiken gebildet. Wenn auf 1 gesetzt, dann werden für "durationReadings" auch stündliche Statistiken gebildet.
</li><br> </li><br>
<li><code>durationReadings &lt;Gerätewerte&gt;</code> <a id="statistics-attr-durationReadings"></a><li><code>durationReadings &lt;Gerätewerte&gt;</code>
<br> <br>
Durch Kommas getrennte Liste von weiteren Gerätewerten, für welche die Dauer einzelner Gerätewerte innerhalb bestimmte Zeiträume (Stunde/Tag/Monat/Jahr) erfasst wird. Durch Kommas getrennte Liste von weiteren Gerätewerten, für welche die Dauer einzelner Gerätewerte innerhalb bestimmte Zeiträume (Stunde/Tag/Monat/Jahr) erfasst wird.
</li><br> </li><br>
<li><code>excludedReadings &lt;GerätenameRegExp:GerätewertRegExp&gt;</code> <a id="statistics-attr-excludedReadings"></a><li><code>excludedReadings &lt;GerätenameRegExp:GerätewertRegExp&gt;</code>
<br> <br>
Regulärer Ausdruck der Gerätewerte die nicht ausgewertet werden sollen. Regulärer Ausdruck der Gerätewerte die nicht ausgewertet werden sollen.
z.B. <code>FritzDect:current|Sensor_.*:humidity</code> z.B. <code>FritzDect:current|Sensor_.*:humidity</code>
<br> <br>
</li><br> </li><br>
<li><code>ignoreDefaultAssignments <code>&lt;0 | 1&gt;</code></code> <a id="statistics-attr-ignoreDefaultAssignments"></a><li><code>ignoreDefaultAssignments <code>&lt;0 | 1&gt;</code></code>
<br> <br>
Ignoriert die Standardzuordnung von Gerätewerten zu Statistik-Typen..<br> Ignoriert die Standardzuordnung von Gerätewerten zu Statistik-Typen..<br>
D.h., nur die Gerätewerte, die über Attribute den Statistik-Typen zugeordnet sind, werden ausgewertet. D.h., nur die Gerätewerte, die über Attribute den Statistik-Typen zugeordnet sind, werden ausgewertet.
@ -1451,18 +1442,18 @@ sub statistics_UpdateDevReading($$$$)
<br> <br>
noch nicht implementiert - Es werden keine gesammelten Statistiken angezeigt, sondern nur die unter "singularReadings" definierten Einzelwerte noch nicht implementiert - Es werden keine gesammelten Statistiken angezeigt, sondern nur die unter "singularReadings" definierten Einzelwerte
</li><br> </li><br>
<li><code>minAvgMaxReadings &lt;Gerätewerte&gt;</code> <a id="statistics-attr-minAvgMaxReadings"></a><li><code>minAvgMaxReadings &lt;Gerätewerte&gt;</code>
<br> <br>
Durch Kommas getrennte Liste von Gerätewerten, für die in bestimmten Zeiträumen (Tag, Monat, Jahr) Minimum, Mittelwert und Maximum erfasst werden. Durch Kommas getrennte Liste von Gerätewerten, für die in bestimmten Zeiträumen (Tag, Monat, Jahr) Minimum, Mittelwert und Maximum erfasst werden.
</li><br> </li><br>
<li><code>periodChangePreset &lt;Sekunden&gt;</code> <a id="statistics-attr-periodChangePreset"></a><li><code>periodChangePreset &lt;Sekunden&gt;</code>
<br> <br>
Start der Berechnung der periodischen Daten, standardmäßig 5 Sekunden vor der vollen Stunde, Start der Berechnung der periodischen Daten, standardmäßig 5 Sekunden vor der vollen Stunde,
<br> <br>
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 &lt;GerätRegExp:GeräteWertRegExp:Statistiktyp:Zeitraum&gt;</code> <a id="statistics-attr-singularReadings"></a><li><code>singularReadings &lt;GerätRegExp:GeräteWertRegExp:Statistiktyp:Zeitraum&gt;</code>
<ul> <ul>
<li>Statistik-Typ: Min|Avg|Max|Delta|<i>DurationState</i>|<span style="color:blue;">Tendency</span></li> <li>Statistik-Typ: 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>
@ -1478,7 +1469,7 @@ sub statistics_UpdateDevReading($$$$)
<code>Wettersensor:rain:Delta:(Hour|Day)|FritzDect:power:Delta:Day</code> <code>Wettersensor:rain:Delta:(Hour|Day)|FritzDect:power:Delta:Day</code>
</dd> </dd>
</li><br> </li><br>
<li><code>specialDeltaPeriods &lt;Gerät:Gerätewert:Zeitraum:Anzahl1:Anzahl2:...&gt;</code> <a id="statistics-attr-specialDeltaPeriods"></a><li><code>specialDeltaPeriods &lt;Gerät:Gerätewert:Zeitraum:Anzahl1:Anzahl2:...&gt;</code>
<br> <br>
Erzeugt für die angegebenen "delta"-Gerätewerte zusätzliche Einzelwerte über die angegebene Anzahl eines Zeitraums (Hour, Day, Month). Erzeugt für die angegebenen "delta"-Gerätewerte zusätzliche Einzelwerte über die angegebene Anzahl eines Zeitraums (Hour, Day, Month).
<br> <br>
@ -1495,11 +1486,11 @@ sub statistics_UpdateDevReading($$$$)
Dies erzeugt 4 zusätzliche Werte für die Regenmenge in den letzten 48 Stunden und den letzten 30 Tagen und den Energieverbrauch der letzten 6 und 12 Monate. Dies erzeugt 4 zusätzliche Werte für die Regenmenge in den letzten 48 Stunden und den letzten 30 Tagen und den Energieverbrauch der letzten 6 und 12 Monate.
</dd> </dd>
</li><br> </li><br>
<li><code>specialDeltaPeriodHours</code> <a id="statistics-attr-specialDeltaPeriodHours"></a><li><code>specialDeltaPeriodHours</code>
<br> <br>
veraltet veraltet
</li><br> </li><br>
<li><code>tendencyReadings &lt;Gerätewerte&gt;</code> <a id="statistics-attr-tendencyReadings"></a><li><code>tendencyReadings &lt;Gerätewerte&gt;</code>
<br> <br>
Durch Kommas getrennte Liste von weiteren Gerätewerten, für die innerhalb bestimmter Zeiträume (1h, 2h, 3h, 6h) die Differenz zwischen Anfangs- und Endwert ermittelt wird. Durch Kommas getrennte Liste von weiteren Gerätewerten, für die innerhalb bestimmter Zeiträume (1h, 2h, 3h, 6h) die Differenz zwischen Anfangs- und Endwert ermittelt wird.
</li><br> </li><br>