diff --git a/fhem/CHANGED b/fhem/CHANGED
index fe6446e0f..84c9050a5 100644
--- a/fhem/CHANGED
+++ b/fhem/CHANGED
@@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
+ - bugfix: 93_DbRep: V5.6.2, commandref revised
- feature: 00_MQTT: OnMessageFn, last-will, onConnect/onDisconnect
- feature: 10_MQTT_DEVICE: improved publishSet, retain, subscribeReadings
- feature: 10_MQTT_BRIDGE: improved retain, subscribeSet
diff --git a/fhem/FHEM/93_DbRep.pm b/fhem/FHEM/93_DbRep.pm
index 5a13e8fa6..98db65170 100644
--- a/fhem/FHEM/93_DbRep.pm
+++ b/fhem/FHEM/93_DbRep.pm
@@ -37,6 +37,7 @@
###########################################################################################################################
# Versions History:
#
+# 5.6.2 28.08.2017 commandref revised
# 5.6.1 18.07.2017 commandref revised, minor fixes
# 5.6.0 17.07.2017 default timeout changed to 86400, new get-command "procinfo" (MySQL)
# 5.5.2 16.07.2017 dbmeta_DoParse -> show variables (no global)
@@ -231,7 +232,7 @@ use Encode qw(encode_utf8);
sub DbRep_Main($$;$);
-my $DbRepVersion = "5.6.1";
+my $DbRepVersion = "5.6.2";
my %dbrep_col = ("DEVICE" => 64,
"TYPE" => 64,
@@ -6472,29 +6473,38 @@ sub bdump {
(*) The format of timestamp is as used with DbLog "YYYY-MM-DD HH:MM:SS". For the attributes "timestamp_begin", "timestamp_end"
you can also use one of the following entries. The timestamp-attribute will be dynamically set to:
- current_year_begin : "<current year>-01-01 00:00:00"
- current_year_end : "<current year>-12-31 23:59:59"
- previous_year_begin : "<previous year>-01-01 00:00:00"
- previous_year_end : "<previous year>-12-31 23:59:59"
- current_month_begin : "<current month first day> 00:00:00"
- current_month_end : "<current month last day> 23:59:59"
- previous_month_begin : "<previous month first day> 00:00:00"
- previous_month_end : "<previous month last day> 23:59:59"
- current_week_begin : "<first day of current week> 00:00:00"
- current_week_end : "<last day of current week> 23:59:59"
- previous_week_begin : "<first day of previous week> 00:00:00"
- previous_week_end : "<last day of previous week> 23:59:59"
- current_day_begin : "<current day> 00:00:00"
- current_day_end : "<current day> 23:59:59"
- previous_day_begin : "<previous day> 00:00:00"
- previous_day_end : "<previous day> 23:59:59"
- current_hour_begin : "<current hour>:00:00"
- current_hour_end : "<current hour>:59:59"
- previous_hour_begin : "<previous hour>:00:00"
- previous_hour_end : "<previous hour>:59:59"
+ current_year_begin : matches "<current year>-01-01 00:00:00"
+ current_year_end : matches "<current year>-12-31 23:59:59"
+ previous_year_begin : matches "<previous year>-01-01 00:00:00"
+ previous_year_end : matches "<previous year>-12-31 23:59:59"
+ current_month_begin : matches "<current month first day> 00:00:00"
+ current_month_end : matches "<current month last day> 23:59:59"
+ previous_month_begin : matches "<previous month first day> 00:00:00"
+ previous_month_end : matches "<previous month last day> 23:59:59"
+ current_week_begin : matches "<first day of current week> 00:00:00"
+ current_week_end : matches "<last day of current week> 23:59:59"
+ previous_week_begin : matches "<first day of previous week> 00:00:00"
+ previous_week_end : matches "<last day of previous week> 23:59:59"
+ current_day_begin : matches "<current day> 00:00:00"
+ current_day_end : matches "<current day> 23:59:59"
+ previous_day_begin : matches "<previous day> 00:00:00"
+ previous_day_end : matches "<previous day> 23:59:59"
+ current_hour_begin : matches "<current hour>:00:00"
+ current_hour_end : matches "<current hour>:59:59"
+ previous_hour_begin : matches "<previous hour>:00:00"
+ previous_hour_end : matches "<previous hour>:59:59"
Make sure that "timestamp_begin" < "timestamp_end" is fulfilled.
+
+ Example:
+ attr <DbRep-device> timestamp_begin current_year_begin
+ attr <DbRep-device> timestamp_end current_year_end
+
+ # Analyzes the database between the time limits of the current year.
+
+
+
Note
If the attribute "timeDiffToNow" will be set, the attributes "timestamp_begin" respectively "timestamp_end" will be deleted if they were set before.
@@ -6520,7 +6530,7 @@ sub bdump {
called by the interface in your 99_myUtls.pm as shown in by the example:
- sub UserExitFn {
+ sub UserFunction {
my ($name,$reading,$value) = @_;
my $hash = $defs{$name};
...
@@ -6548,7 +6558,7 @@ sub bdump {
For further processing following parameters will be forwarded to the function:
- - $hash - the hash of the DbRep-Device
+ - $name - the name of the DbRep-Device
- $reading - the name of the created reading
- $value - the value of the reading
@@ -7404,29 +7414,38 @@ sub bdump {
(*) Das Format von Timestamp ist wie in DbLog "YYYY-MM-DD HH:MM:SS". Für die Attribute "timestamp_begin", "timestamp_end"
kann ebenso eine der folgenden Eingaben verwendet werden. Dabei wird das timestamp-Attribut dynamisch belegt:
- current_year_begin : "<aktuelles Jahr>-01-01 00:00:00"
- current_year_end : "<aktuelles Jahr>-12-31 23:59:59"
- previous_year_begin : "<vorheriges Jahr>-01-01 00:00:00"
- previous_year_end : "<vorheriges Jahr>-12-31 23:59:59"
- current_month_begin : "<aktueller Monat erster Tag> 00:00:00"
- current_month_end : "<aktueller Monat letzter Tag> 23:59:59"
- previous_month_begin : "<Vormonat erster Tag> 00:00:00"
- previous_month_end : "<Vormonat letzter Tag> 23:59:59"
- current_week_begin : "<erster Tag der akt. Woche> 00:00:00"
- current_week_end : "<letzter Tag der akt. Woche> 23:59:59"
- previous_week_begin : "<erster Tag Vorwoche> 00:00:00"
- previous_week_end : "<letzter Tag Vorwoche> 23:59:59"
- current_day_begin : "<aktueller Tag> 00:00:00"
- current_day_end : "<aktueller Tag> 23:59:59"
- previous_day_begin : "<Vortag> 00:00:00"
- previous_day_end : "<Vortag> 23:59:59"
- current_hour_begin : "<aktuelle Stunde>:00:00"
- current_hour_end : "<aktuelle Stunde>:59:59"
- previous_hour_begin : "<vorherige Stunde>:00:00"
- previous_hour_end : "<vorherige Stunde>:59:59"
+ current_year_begin : entspricht "<aktuelles Jahr>-01-01 00:00:00"
+ current_year_end : entspricht "<aktuelles Jahr>-12-31 23:59:59"
+ previous_year_begin : entspricht "<vorheriges Jahr>-01-01 00:00:00"
+ previous_year_end : entspricht "<vorheriges Jahr>-12-31 23:59:59"
+ current_month_begin : entspricht "<aktueller Monat erster Tag> 00:00:00"
+ current_month_end : entspricht "<aktueller Monat letzter Tag> 23:59:59"
+ previous_month_begin : entspricht "<Vormonat erster Tag> 00:00:00"
+ previous_month_end : entspricht "<Vormonat letzter Tag> 23:59:59"
+ current_week_begin : entspricht "<erster Tag der akt. Woche> 00:00:00"
+ current_week_end : entspricht "<letzter Tag der akt. Woche> 23:59:59"
+ previous_week_begin : entspricht "<erster Tag Vorwoche> 00:00:00"
+ previous_week_end : entspricht "<letzter Tag Vorwoche> 23:59:59"
+ current_day_begin : entspricht "<aktueller Tag> 00:00:00"
+ current_day_end : entspricht "<aktueller Tag> 23:59:59"
+ previous_day_begin : entspricht "<Vortag> 00:00:00"
+ previous_day_end : entspricht "<Vortag> 23:59:59"
+ current_hour_begin : entspricht "<aktuelle Stunde>:00:00"
+ current_hour_end : entspricht "<aktuelle Stunde>:59:59"
+ previous_hour_begin : entspricht "<vorherige Stunde>:00:00"
+ previous_hour_end : entspricht "<vorherige Stunde>:59:59"
Natürlich sollte man immer darauf achten dass "timestamp_begin" < "timestamp_end" ist.
+
+
+ Beispiel:
+ attr <DbRep-device> timestamp_begin current_year_begin
+ attr <DbRep-device> timestamp_end current_year_end
+
+ # Wertet die Datenbank in den Zeitgrenzen des aktuellen Jahres aus.
+
+
Hinweis
@@ -7452,7 +7471,7 @@ sub bdump {
99_myUtls.pm nach folgendem Muster erstellt:
- sub UserExitFn {
+ sub UserFunction {
my ($name,$reading,$value) = @_;
my $hash = $defs{$name};
...
@@ -7481,7 +7500,7 @@ sub bdump {
Zur Weiterverarbeitung werden der aufgerufenenen Funktion folgende Variablen übergeben:
- - $hash - der Hash des DbRep-Devices
+ - $name - der Name des DbRep-Devices
- $reading - der Namen des erstellen Readings
- $value - der Wert des Readings