mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 23:06:37 +00:00
git-svn-id: https://svn.fhem.de/fhem/trunk@6020 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e25fdf433a
commit
09f5ce0991
@ -1823,7 +1823,6 @@ LUXTRONIK2_doStatisticDeltaSingle ($$$$$$$)
|
||||
<ul style="width:800px">
|
||||
Die Luxtronik 2.0 ist eine Heizungssteuerung, welche in Wärmepumpen von <a href="http://www.alpha-innotec.de">Alpha Innotec</a>,
|
||||
Siemens Novelan (WPR NET) und Wolf Heiztechnik (BWL/BWS) verbaut ist.
|
||||
<br>
|
||||
Sie besitzt einen Ethernet Anschluss, so dass sie direkt in lokale Netzwerke (LAN) integriert werden kann.
|
||||
<br>
|
||||
<i>Das Modul wurde bisher mit folgender Steuerungs-Firmware getestet: V1.51, V1.54C, V1.60, V1.69, V1.70.</i>
|
||||
@ -1847,6 +1846,7 @@ LUXTRONIK2_doStatisticDeltaSingle ($$$$$$$)
|
||||
<b>Set</b><br>
|
||||
<ul>
|
||||
Durch einen Firmware-Test wird vor jeder Set-Operation sichergestellt, dass Wärmepumpen mit ungetester Firmware nicht unabsichtlich beschädigt werden.
|
||||
<br>
|
||||
<li><code>activeTariff < 0 - 9 ></code>
|
||||
<br>
|
||||
Erlaubt die gezielte, separate Erfassung der statistischen Verbrauchswerte (doStatistics = 1) für verschiedene Tarife (Doppelstromzähler)<br>
|
||||
@ -1922,7 +1922,9 @@ LUXTRONIK2_doStatisticDeltaSingle ($$$$$$$)
|
||||
und Abschätzung des elektrischen Verbrauches
|
||||
</li><br>
|
||||
<li><code>heatPumpElectricalPowerFactor</code><br>
|
||||
Änderung der elektrischen Leistungsaufnahme per 1 K Vorlauftemperaturdifferenz zu 35 °C (z.B. 2% pro 1 K = 0,02)<br>
|
||||
Änderung der elektrischen Leistungsaufnahme per 1 K Vorlauftemperaturdifferenz zu 35 °C
|
||||
<br>
|
||||
(z.B. 2% pro 1 K = 0,02)
|
||||
</li><br>
|
||||
<li><code>heatHeatRodElectricalPowerWatt</code><br>
|
||||
Betriebsleistung der Heizstäbe zur Abschätzung des elektrischen Verbrauches
|
||||
|
@ -941,9 +941,9 @@ JSONMETER_doStatisticDeltaSingle ($$$$$$)
|
||||
<br>
|
||||
Polling interval in seconds
|
||||
</li><br>
|
||||
<li><code>resetStatistics <all|statElectricityConsumed...|statElectricityConsumedTariff...|statElectricityPower...></code>
|
||||
<li><code>resetStatistics <statReadings></code>
|
||||
<br>
|
||||
Deletes the selected statistic values.
|
||||
Deletes the selected statistic values: <i>all, statElectricityConsumed..., statElectricityConsumedTariff..., statElectricityPower...</i>
|
||||
</li><br>
|
||||
<li><code>restartJsonAnalysis</code><br>
|
||||
Restarts the analysis of the json file for known readings (compliant to the OBIS standard).
|
||||
@ -1007,7 +1007,6 @@ JSONMETER_doStatisticDeltaSingle ($$$$$$)
|
||||
<h3>JSONMETER</h3>
|
||||
<ul style="width:800px">
|
||||
Dieses Modul liest Daten von Messgeräten (z.B. Stromzähler, Gaszähler oder Wärmezähler, so genannte Smartmeter),
|
||||
<br>
|
||||
welche <a href="http://de.wikipedia.org/wiki/OBIS-Kennzahlen">OBIS</a> kompatible Daten im JSON-Format auf einem Webserver oder auf dem FHEM-Dateisystem zur Verfügung stellen.
|
||||
<br>
|
||||
|
||||
@ -1049,22 +1048,21 @@ JSONMETER_doStatisticDeltaSingle ($$$$$$)
|
||||
<ul>
|
||||
<li><code>activeTariff < 0 - 9 ></code>
|
||||
<br>
|
||||
Erlaubt die gezielte, separate Erfassung der statistischen Verbrauchswerte (doStatistics = 1) für verschiedene Tarife (Doppelstromzähler), wenn der Stromzähler dies selbst nicht unterscheiden kann (z.B. LS110) oder wenn geprüft werden soll, ob ein zeitabhängiger Tarif preiswerter wäre.<br>
|
||||
Dieser Wert muss entsprechend des vorhandenen oder geplanten Tarifes zum jeweiligen Zeitpunkt z.B. durch den FHEM-Befehl "at" gesetzt werden.<br>
|
||||
Erlaubt die gezielte, separate Erfassung der statistischen Verbrauchswerte (doStatistics = 1) für verschiedene Tarife (Doppelstromzähler), wenn der Stromzähler dies selbst nicht unterscheiden kann (z.B. LS110) oder wenn geprüft werden soll, ob ein zeitabhängiger Tarif preiswerter wäre. Dieser Wert muss entsprechend des vorhandenen oder geplanten Tarifes zum jeweiligen Zeitpunkt z.B. durch den FHEM-Befehl "at" gesetzt werden.<br>
|
||||
0 = tariflos
|
||||
</li><br>
|
||||
<li><code>INTERVAL <Abfrageinterval></code>
|
||||
<br>
|
||||
Abfrageinterval in Sekunden
|
||||
</li><br>
|
||||
<li><code>resetStatistics <all|statElectricityConsumed...|statElectricityConsumedTariff...|statElectricityPower...></code>
|
||||
<li><code>resetStatistics <statWerte></code>
|
||||
<br>
|
||||
Löscht die ausgewählten statisischen Werte.
|
||||
Löscht die ausgewählten statisischen Werte: <i>all, statElectricityConsumed..., statElectricityConsumedTariff..., statElectricityPower...</i>
|
||||
|
||||
</li><br>
|
||||
<li><code>restartJsonAnalysis</code>
|
||||
<br>
|
||||
Neustart der Analyse der json-Datei zum Auffinden bekannter Gerätewerte (kompatibel zum OBIS Standard).
|
||||
<br>
|
||||
Diese Analysie wird normaler Weise nur einmalig durchgeführt, nachdem Gerätewerte gefunden wurden.
|
||||
</li><br>
|
||||
<li><code>statusRequest</code>
|
||||
@ -1098,7 +1096,6 @@ JSONMETER_doStatisticDeltaSingle ($$$$$$)
|
||||
<li><code>doStatistics < 0 | 1 ></code>
|
||||
<br>
|
||||
Bildet tägliche, monatliche und jährliche Statistiken bestimmter Gerätewerte (Mittel/Min/Max oder kumulierte Werte).
|
||||
<br>
|
||||
Für grafische Auswertungen können die Werte der Form 'stat<i>ReadingName</i><b>Last</b>' genutzt werden.
|
||||
</li><br>
|
||||
<li><code>pathString <Zeichenkette></code>
|
||||
|
@ -128,9 +128,7 @@ statistics_Define($$)
|
||||
|
||||
RemoveInternalTimer($hash);
|
||||
|
||||
# Run period change procedure next full hour (15 seconds before).
|
||||
my $periodEndTime = 3600 * ( int(gettimeofday()/3600) + 1 ) - 15 ;
|
||||
InternalTimer( $periodEndTime, "statistics_PeriodChange", $hash, 0);
|
||||
InternalTimer( gettimeofday() + 11, "statistics_PeriodChange", $hash, 0);
|
||||
|
||||
return undef;
|
||||
}
|
||||
@ -196,7 +194,6 @@ statistics_Notify($$)
|
||||
delete($hash->{READINGS}{$r});
|
||||
}
|
||||
}
|
||||
statistics_DoStatisticsAll $hash, 0;
|
||||
my %unknownDevices;
|
||||
foreach my $r (keys %{$hash->{READINGS}}) {
|
||||
if ($r =~ /^\.(.*):.*/) { $unknownDevices{$1}++; }
|
||||
@ -210,7 +207,7 @@ statistics_Notify($$)
|
||||
}
|
||||
if ($val ne "") {
|
||||
Log3 $name,4,"$name: Initialization - Found hidden readings for device(s) '$val'.";
|
||||
readingsSingleUpdate($hash,"monitoredDevicesUnknownType",$val,1);
|
||||
readingsSingleUpdate($hash,"monitoredDevicesUnknown",$val,1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -272,7 +269,7 @@ statistics_PeriodChange($)
|
||||
|
||||
RemoveInternalTimer($hash);
|
||||
# Run period change procedure each full hour ("periodChangePreset" second before).
|
||||
my $periodEndTime = 3600 * ( int((gettimeofday()+1800)/3600) + 1 ) - $periodChangePreset ;
|
||||
my $periodEndTime = 3600 * ( int((gettimeofday()+$periodChangePreset)/3600) + 1 ) - $periodChangePreset ;
|
||||
# Run procedure also for given dayChangeTime
|
||||
$val = "";
|
||||
if ( $dayChangeDelay>0 && gettimeofday()<$dayChangeTime && $dayChangeTime<=$periodEndTime ) {
|
||||
@ -282,12 +279,11 @@ statistics_PeriodChange($)
|
||||
$val = strftime ("%Y-%m-%d %H:%M:%S", localtime($periodEndTime)) . $val;
|
||||
InternalTimer( $periodEndTime, "statistics_PeriodChange", $hash, 1);
|
||||
readingsSingleUpdate($hash, "nextPeriodChangeCalc", $val, 0);
|
||||
Log3 $name,4,"$name: Next period change will be calculated at ".strftime ("%H:%M:%S", localtime($periodEndTime));
|
||||
Log3 $name,4,"$name: Next period change will be calculated at $val";
|
||||
|
||||
return if( AttrVal($name, "disable", 0 ) == 1 );
|
||||
|
||||
# Determine if time period switched (day, month, year)
|
||||
# Get deltaValue and Tariff of previous call
|
||||
|
||||
my $periodSwitch = 0;
|
||||
my $yearLast;
|
||||
@ -299,20 +295,23 @@ statistics_PeriodChange($)
|
||||
my $monthNow;
|
||||
my $yearNow;
|
||||
|
||||
if ($dayChangeDelay>0 && $isDayChange) {
|
||||
($dummy, $dummy, $hourLast, $dayLast, $monthLast, $yearLast) = localtime (gettimeofday() - $dayChangeDelay);
|
||||
($dummy, $dummy, $hourNow, $dayNow, $monthNow, $yearNow) = localtime (gettimeofday() + $periodEndTime);
|
||||
if ($yearNow != $yearLast) { $periodSwitch = -4; }
|
||||
elsif ($monthNow != $monthLast) { $periodSwitch = -3; }
|
||||
elsif ($dayNow != $dayLast) { $periodSwitch = -2; }
|
||||
if ($dayChangeDelay % 3600 == 0) { $periodSwitch = abs($periodSwitch); }
|
||||
if ($isDayChange) {
|
||||
Log3 $name,4,"$name: Calculating day change";
|
||||
($dummy, $dummy, $hourLast, $dayLast, $monthLast, $yearLast) = localtime (gettimeofday() - $dayChangeDelay + $periodChangePreset - 59);
|
||||
($dummy, $dummy, $hourNow, $dayNow, $monthNow, $yearNow) = localtime (gettimeofday() + $periodChangePreset);
|
||||
if ($yearNow != $yearLast) { $periodSwitch = -4; }
|
||||
elsif ($monthNow != $monthLast) { $periodSwitch = -3; }
|
||||
elsif ($dayNow != $dayLast) { $periodSwitch = -2; }
|
||||
if ($dayChangeDelay % 3600 == 0) { $periodSwitch = abs($periodSwitch); }
|
||||
} else {
|
||||
($dummy, $dummy, $hourLast, $dayLast, $monthLast, $yearLast) = localtime (gettimeofday() - 1800);
|
||||
($dummy, $dummy, $hourNow, $dayNow, $monthNow, $yearNow) = localtime (gettimeofday() + 1800);
|
||||
if ($yearNow != $yearLast) { $periodSwitch = 4; }
|
||||
elsif ($monthNow != $monthLast) { $periodSwitch = 3; }
|
||||
elsif ($dayNow != $dayLast) { $periodSwitch = 2; }
|
||||
elsif ($hourNow != $hourLast) { $periodSwitch = 1; }
|
||||
($dummy, $dummy, $hourLast, $dummy, $dummy, $dummy) = localtime (gettimeofday());
|
||||
($dummy, $dummy, $hourNow, $dummy, $dummy, $dummy) = localtime (gettimeofday() + $periodChangePreset);
|
||||
if ($hourNow != $hourLast) {
|
||||
$periodSwitch = 1;
|
||||
Log3 $name,4,"$name: Calculating hour change";
|
||||
} else {
|
||||
Log3 $name,4,"$name: Calculating statistics at startup";
|
||||
}
|
||||
}
|
||||
|
||||
statistics_DoStatisticsAll $hash, $periodSwitch;
|
||||
@ -622,7 +621,7 @@ statistics_doStatisticDelta ($$$$$)
|
||||
}
|
||||
# If change of day, change daily statistic
|
||||
if ($periodSwitch >= 2 || $periodSwitch <= -2){
|
||||
$last[3] = $stat[3];
|
||||
$last[3] = sprintf "%.".$decPlaces."f", $stat[3];
|
||||
$stat[3] = 0;
|
||||
if ($showDate == 5) { $showDate = 4; } # Do not show the "since:" value for day changes anymore
|
||||
if ($showDate >= 6) { # Shows the "since:" value for the first day change
|
||||
@ -671,11 +670,11 @@ statistics_doStatisticDelta ($$$$$)
|
||||
my $statValue = sprintf "%.".$decPlaces."f", $stat[1];
|
||||
statistics_storeSingularReadings ($name,$singularReadings,$dev,$statReadingName,$readingName,"Delta","Hour",$statValue,$last[1],$periodSwitch >= 1);
|
||||
$statValue = sprintf "%.".$decPlaces."f", $stat[3];
|
||||
statistics_storeSingularReadings ($name,$singularReadings,$dev,$statReadingName,$readingName,"Delta","Day",$statValue,$last[3],$periodSwitch >= 2);
|
||||
statistics_storeSingularReadings ($name,$singularReadings,$dev,$statReadingName,$readingName,"Delta","Day",$statValue,$last[3],$periodSwitch >= 2 || $periodSwitch <= -2);
|
||||
$statValue = sprintf "%.".$decPlaces."f", $stat[5];
|
||||
statistics_storeSingularReadings ($name,$singularReadings,$dev,$statReadingName,$readingName,"Delta","Month",$statValue,$last[5],$periodSwitch >= 3);
|
||||
statistics_storeSingularReadings ($name,$singularReadings,$dev,$statReadingName,$readingName,"Delta","Month",$statValue,$last[5],$periodSwitch >= 3 || $periodSwitch <= -3);
|
||||
$statValue = sprintf "%.".$decPlaces."f", $stat[7];
|
||||
statistics_storeSingularReadings ($name,$singularReadings,$dev,$statReadingName,$readingName,"Delta","Year",$statValue,$last[7],$periodSwitch >= 4);
|
||||
statistics_storeSingularReadings ($name,$singularReadings,$dev,$statReadingName,$readingName,"Delta","Year",$statValue,$last[7],$periodSwitch == 4 || $periodSwitch == -4);
|
||||
}
|
||||
|
||||
return ;
|
||||
@ -695,9 +694,9 @@ statistics_doStatisticDuration ($$$$)
|
||||
|
||||
Log3 $name, 4, "Calculating duration statistics for '".$dev->{NAME}.":$readingName = $state'";
|
||||
# Daily Statistic
|
||||
statistics_doStatisticDurationSingle $hash, $dev, $readingName, "Day", $state, ($periodSwitch >= 2);
|
||||
statistics_doStatisticDurationSingle $hash, $dev, $readingName, "Day", $state, ($periodSwitch >= 2 || $periodSwitch <= -2);
|
||||
# Monthly Statistic
|
||||
statistics_doStatisticDurationSingle $hash, $dev, $readingName, "Month", $state, ($periodSwitch >= 3);
|
||||
statistics_doStatisticDurationSingle $hash, $dev, $readingName, "Month", $state, ($periodSwitch >= 3 || $periodSwitch <= -3);
|
||||
|
||||
return ;
|
||||
|
||||
@ -939,7 +938,7 @@ statistics_FormatDuration($)
|
||||
<ul>
|
||||
<li><b>Minimal-, Mittel- und Maximalwerte:</b> brightness, current, energy_current, humidity, temperature, voltage, wind, wind_speed, windSpeed</li>
|
||||
<li><b>Deltawerte:</b> count, energy, energy_total, power, total, rain, rain_rate, rain_total</li>
|
||||
<li><b>Dauer der Stati:</b> lightsensor, lock, motion, Window, window, state <i>(wenn kein anderer Gerätewert gültig)</i></li>
|
||||
<li><b>Dauer der Status:</b> lightsensor, lock, motion, Window, window, state <i>(wenn kein anderer Gerätewert gültig)</i></li>
|
||||
</ul>
|
||||
Weitere Gerätewerte können über die entsprechenden <a href="#statisticsattr">Attribute</a> hinzugefügt werden
|
||||
<br>
|
||||
@ -1009,12 +1008,15 @@ statistics_FormatDuration($)
|
||||
Erlaubt die korrekte zeitliche Zuordnung in Plots, kann je nach Systemauslastung verringert oder vergrößert werden
|
||||
<br>
|
||||
</li><br>
|
||||
<li><code>singularReadings <GerätenameRegExp:GerätewertRegExp>:Statistiktypen<i>(Min|Avg|Max|Delta)</i>:ZeitPeriode<i>(Hour|Day|Month|Year)</i></code>
|
||||
<br>
|
||||
<li><code>singularReadings <GerätenameRegExp:GerätewertRegExp>:Statistiktypen:ZeitPeriode</code>
|
||||
<ul>
|
||||
<li>Statistiktypen: Min|Avg|Max|Delta</li>
|
||||
<li>ZeitPeriode: Hour|Day|Month|Year</li>
|
||||
</ul>
|
||||
Regulärer Ausdruck statistischer Werte, die nicht nur in zusammengefassten sondern auch als einzelne Werte gespeichert werden sollen.
|
||||
Erleichtert die Erzeugung von Plots.
|
||||
<br>
|
||||
z.B. <code>Wettersensor:rain:Delta:(Hour|Day))|(FritzDect:(current|power):(Avg|Max|Delta):(Hour|Day)</code>
|
||||
z.B. <code>Wettersensor:rain:Delta:(Hour|Day))|FritzDect:power:Delta:Day</code>
|
||||
<br>
|
||||
</li><br>
|
||||
<li><a href="#readingFnAttributes">readingFnAttributes</a>
|
||||
|
Loading…
x
Reference in New Issue
Block a user