mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
93_DbRep: V8.8.0, attribute valueFilter applied to more functions, new attribute 'fastStart'
git-svn-id: https://svn.fhem.de/fhem/trunk@17703 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b52e405179
commit
66a3870237
@ -1,5 +1,7 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- feature: 93_DbRep: V8.8.0, attribute valueFilter applied to more functions,
|
||||||
|
new attribute 'fastStart'. (see 'get ... versionNotes')
|
||||||
- feature: 00_10_MQTT2_CLIENT added (Forum #92888)
|
- feature: 00_10_MQTT2_CLIENT added (Forum #92888)
|
||||||
- bugfix: 46_Aqicn: fix commandref, change to packages
|
- bugfix: 46_Aqicn: fix commandref, change to packages
|
||||||
- bugfix: 88_HMCCU: fixed set toggle command
|
- bugfix: 88_HMCCU: fixed set toggle command
|
||||||
|
@ -57,17 +57,19 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch';
|
|||||||
|
|
||||||
# Versions History intern
|
# Versions History intern
|
||||||
our %DbRep_vNotesIntern = (
|
our %DbRep_vNotesIntern = (
|
||||||
|
"8.8.0" => "06.11.2018 first connect routine switched to DbRep_Main, get COLSET from DBLOG-instance, attribute 'fastStart' added ",
|
||||||
|
"8.7.0" => "04.11.2018 attribute valueFilter applied to functions based on 'SELECT', 'UPDATE', 'DELETE' and 'valueFilter' generally applied to field 'VALUE' ",
|
||||||
"8.6.0" => "29.10.2018 reduceLog use attributes device/reading (can be overwritten by set-options) ",
|
"8.6.0" => "29.10.2018 reduceLog use attributes device/reading (can be overwritten by set-options) ",
|
||||||
"8.5.0" => "27.10.2018 versionNotes revised, EXCLUDE of reading/device possible (DbRep_specsForSql changed) ",
|
"8.5.0" => "27.10.2018 versionNotes revised, EXCLUDE of reading/device possible (DbRep_specsForSql changed) ",
|
||||||
"8.4.0" => "22.10.2018 countEntries separately for every reading if attribute \"countEntriesDetail\" is set, ".
|
"8.4.0" => "22.10.2018 countEntries separately for every reading if attribute \"countEntriesDetail\" is set, ".
|
||||||
"versionNotes changed to support en/de, get dbValue as textfield-long ",
|
"versionNotes changed to support en/de, get dbValue as textfield-long ",
|
||||||
"8.3.0" => "17.10.2018 reduceLog from DbLog integrated into DbRep, textField-long as default for sqlCmd, both attributes timeOlderThan and timeDiffToNow can be set at same time",
|
"8.3.0" => "17.10.2018 reduceLog from DbLog integrated into DbRep, textField-long as default for sqlCmd, both attributes timeOlderThan and timeDiffToNow can be set at same time",
|
||||||
"8.2.3" => "07.10.2018 check availability of DbLog-device at definition time of DbRep-device ",
|
"8.2.3" => "07.10.2018 check availability of DbLog-device at definition time of DbRep-device ",
|
||||||
"8.2.2" => "07.10.2018 DbRep_getMinTs changed, fix don't get the real min timestamp in rare cases ",
|
"8.2.2" => "07.10.2018 DbRep_getInitData changed, fix don't get the real min timestamp in rare cases ",
|
||||||
"8.2.1" => "07.10.2018 \$hash->{dbloghash}{HELPER}{REOPEN_RUNS_UNTIL} contains time until DB is closed ",
|
"8.2.1" => "07.10.2018 \$hash->{dbloghash}{HELPER}{REOPEN_RUNS_UNTIL} contains time until DB is closed ",
|
||||||
"8.2.0" => "05.10.2018 direct help for attributes ",
|
"8.2.0" => "05.10.2018 direct help for attributes ",
|
||||||
"8.1.0" => "02.10.2018 new get versionNotes command ",
|
"8.1.0" => "02.10.2018 new get versionNotes command ",
|
||||||
"8.0.1" => "20.09.2018 DbRep_getMinTs improved",
|
"8.0.1" => "20.09.2018 DbRep_getInitData improved",
|
||||||
"8.0.0" => "11.09.2018 get filesize in DbRep_WriteToDumpFile corrected, restoreMySQL for clientSide dumps, minor fixes ",
|
"8.0.0" => "11.09.2018 get filesize in DbRep_WriteToDumpFile corrected, restoreMySQL for clientSide dumps, minor fixes ",
|
||||||
"7.20.0" => "04.09.2018 deviceRename can operate a Device name with blank, e.g. 'current balance' as old device name ",
|
"7.20.0" => "04.09.2018 deviceRename can operate a Device name with blank, e.g. 'current balance' as old device name ",
|
||||||
"7.19.0" => "25.08.2018 attribute 'valueFilter' to filter datasets in fetchrows ",
|
"7.19.0" => "25.08.2018 attribute 'valueFilter' to filter datasets in fetchrows ",
|
||||||
@ -121,6 +123,12 @@ our %DbRep_vNotesIntern = (
|
|||||||
|
|
||||||
# Versions History extern:
|
# Versions History extern:
|
||||||
our %DbRep_vNotesExtern = (
|
our %DbRep_vNotesExtern = (
|
||||||
|
"8.8.0" => "06.11.2018 new attribute 'fastStart'. Usually every DbRep-device is making a short connect to its database when "
|
||||||
|
."FHEM is restarted. When this attribute is set, the initial connect is done when the DbRep-device is doing its "
|
||||||
|
."first task. ",
|
||||||
|
"8.7.0" => "04.11.2018 attribute valueFilter applied to functions 'averageValue, changeValue, countEntries, delEntries, "
|
||||||
|
."delSeqDoublets, diffValue, exportToFile, fetchrows, maxValue, minValue, reduceLog, sumValue, syncStandby' ,"
|
||||||
|
." 'valueFilter' generally applied to database field 'VALUE' ",
|
||||||
"8.6.0" => "29.10.2018 reduceLog use attributes device/reading (can be overwritten by set-options) ",
|
"8.6.0" => "29.10.2018 reduceLog use attributes device/reading (can be overwritten by set-options) ",
|
||||||
"8.5.0" => "27.10.2018 devices and readings can be excluded by EXCLUDE-option in attributes \$reading/\$device ",
|
"8.5.0" => "27.10.2018 devices and readings can be excluded by EXCLUDE-option in attributes \$reading/\$device ",
|
||||||
"8.4.0" => "22.10.2018 New attribute \"countEntriesDetail\". Function countEntries creates number of datasets for every ".
|
"8.4.0" => "22.10.2018 New attribute \"countEntriesDetail\". Function countEntries creates number of datasets for every ".
|
||||||
@ -232,6 +240,10 @@ our %DbRep_vNotesExtern = (
|
|||||||
|
|
||||||
# Hint Hash en
|
# Hint Hash en
|
||||||
our %DbRep_vHintsExt_en = (
|
our %DbRep_vHintsExt_en = (
|
||||||
|
"4" => "The attribute 'valueFilter' can specify a REGEXP expression that is used for additional field selection as described in set-function. "
|
||||||
|
."If you need more assistance please to the manual of your used database. For example the overview about REGEXP for "
|
||||||
|
."MariaDB refer to <a href=\"https://mariadb.com/kb/en/library/regular-expressions-overview\">Regular Expressions "
|
||||||
|
."Overview</a>. ",
|
||||||
"3" => "Features and restrictions of complex <a href=\"https://fhem.de/commandref.html#devspec\">device specifications (devspec) ",
|
"3" => "Features and restrictions of complex <a href=\"https://fhem.de/commandref.html#devspec\">device specifications (devspec) ",
|
||||||
"2" => "<a href='https://www.dwd.de/DE/leistungen/klimadatendeutschland/beschreibung_tagesmonatswerte.html'>Rules</a> of german weather service for calculation of average temperatures. ",
|
"2" => "<a href='https://www.dwd.de/DE/leistungen/klimadatendeutschland/beschreibung_tagesmonatswerte.html'>Rules</a> of german weather service for calculation of average temperatures. ",
|
||||||
"1" => "Some helpful <a href=\"https://wiki.fhem.de/wiki/DbRep_-_Reporting_und_Management_von_DbLog-Datenbankinhalten#Praxisbeispiele_.2F_Hinweise_und_L.C3.B6sungsans.C3.A4tze_f.C3.BCr_verschiedene_Aufgaben\">FHEM-Wiki</a> Entries."
|
"1" => "Some helpful <a href=\"https://wiki.fhem.de/wiki/DbRep_-_Reporting_und_Management_von_DbLog-Datenbankinhalten#Praxisbeispiele_.2F_Hinweise_und_L.C3.B6sungsans.C3.A4tze_f.C3.BCr_verschiedene_Aufgaben\">FHEM-Wiki</a> Entries."
|
||||||
@ -239,6 +251,10 @@ our %DbRep_vHintsExt_en = (
|
|||||||
|
|
||||||
# Hint Hash de
|
# Hint Hash de
|
||||||
our %DbRep_vHintsExt_de = (
|
our %DbRep_vHintsExt_de = (
|
||||||
|
"4" => "Im Attribut 'valueFilter' können REGEXP zur erweiterten Feldselektion angegeben werden. Welche Felder berücksichtigt "
|
||||||
|
."werden, ist in der jeweiligen set-Funktion beschrieben. Für weitere Hilfe bitte die REGEXP-Dokumentation ihrer "
|
||||||
|
."verwendeten Datenbank konsultieren. Ein Überblick über REGEXP mit MariaDB ist zum Beispiel hier verfügbar:\n"
|
||||||
|
."<a href=\"https://mariadb.com/kb/en/library/regular-expressions-overview\">Regular Expressions Overview</a>. ",
|
||||||
"3" => "Merkmale und Restriktionen von komplexen <a href=\"https://fhem.de/commandref_DE.html#devspec\">Geräte-Spezifikationen (devspec) ",
|
"3" => "Merkmale und Restriktionen von komplexen <a href=\"https://fhem.de/commandref_DE.html#devspec\">Geräte-Spezifikationen (devspec) ",
|
||||||
"2" => "<a href='https://www.dwd.de/DE/leistungen/klimadatendeutschland/beschreibung_tagesmonatswerte.html'>Regularien</a> des deutschen Wetterdienstes zur Berechnung von Durchschnittstemperaturen. ",
|
"2" => "<a href='https://www.dwd.de/DE/leistungen/klimadatendeutschland/beschreibung_tagesmonatswerte.html'>Regularien</a> des deutschen Wetterdienstes zur Berechnung von Durchschnittstemperaturen. ",
|
||||||
"1" => "Hilfreiche Hinweise zu DbRep im <a href=\"https://wiki.fhem.de/wiki/DbRep_-_Reporting_und_Management_von_DbLog-Datenbankinhalten#Praxisbeispiele_.2F_Hinweise_und_L.C3.B6sungsans.C3.A4tze_f.C3.BCr_verschiedene_Aufgaben\">FHEM-Wiki</a>."
|
"1" => "Hilfreiche Hinweise zu DbRep im <a href=\"https://wiki.fhem.de/wiki/DbRep_-_Reporting_und_Management_von_DbLog-Datenbankinhalten#Praxisbeispiele_.2F_Hinweise_und_L.C3.B6sungsans.C3.A4tze_f.C3.BCr_verschiedene_Aufgaben\">FHEM-Wiki</a>."
|
||||||
@ -285,6 +301,7 @@ sub DbRep_Initialize($) {
|
|||||||
"executeBeforeProc ".
|
"executeBeforeProc ".
|
||||||
"executeAfterProc ".
|
"executeAfterProc ".
|
||||||
"expimpfile ".
|
"expimpfile ".
|
||||||
|
"fastStart:1,0 ".
|
||||||
"fetchRoute:ascent,descent ".
|
"fetchRoute:ascent,descent ".
|
||||||
"fetchMarkDuplicates:red,blue,brown,green,orange ".
|
"fetchMarkDuplicates:red,blue,brown,green,orange ".
|
||||||
"ftpDebug:1,0 ".
|
"ftpDebug:1,0 ".
|
||||||
@ -356,6 +373,7 @@ sub DbRep_Define($@) {
|
|||||||
$hash->{ROLE} = AttrVal($name, "role", "Client");
|
$hash->{ROLE} = AttrVal($name, "role", "Client");
|
||||||
$hash->{MODEL} = $hash->{ROLE};
|
$hash->{MODEL} = $hash->{ROLE};
|
||||||
$hash->{HELPER}{DBLOGDEVICE} = $a[2];
|
$hash->{HELPER}{DBLOGDEVICE} = $a[2];
|
||||||
|
$hash->{HELPER}{IDRETRIES} = 3; # Anzahl wie oft versucht wird initiale Daten zu holen
|
||||||
$hash->{VERSION} = (reverse sort(keys %DbRep_vNotesIntern))[0];
|
$hash->{VERSION} = (reverse sort(keys %DbRep_vNotesIntern))[0];
|
||||||
$hash->{NOTIFYDEV} = "global,".$name; # nur Events dieser Devices an DbRep_Notify weiterleiten
|
$hash->{NOTIFYDEV} = "global,".$name; # nur Events dieser Devices an DbRep_Notify weiterleiten
|
||||||
my $dbconn = $defs{$a[2]}{dbconn};
|
my $dbconn = $defs{$a[2]}{dbconn};
|
||||||
@ -368,12 +386,12 @@ sub DbRep_Define($@) {
|
|||||||
Log3 ($name, 4, "DbRep $name - history sql commandlist read from file ".$attr{global}{modpath}."/FHEM/FhemUtils/cacheDbRep");
|
Log3 ($name, 4, "DbRep $name - history sql commandlist read from file ".$attr{global}{modpath}."/FHEM/FhemUtils/cacheDbRep");
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoveInternalTimer($hash);
|
|
||||||
InternalTimer(gettimeofday()+int(rand(45)), 'DbRep_firstconnect', $hash, 0);
|
|
||||||
|
|
||||||
Log3 ($name, 4, "DbRep $name - initialized");
|
Log3 ($name, 4, "DbRep $name - initialized");
|
||||||
ReadingsSingleUpdateValue ($hash, 'state', 'initialized', 1);
|
ReadingsSingleUpdateValue ($hash, 'state', 'initialized', 1);
|
||||||
|
|
||||||
|
RemoveInternalTimer($hash);
|
||||||
|
InternalTimer(gettimeofday()+int(rand(45)), 'DbRep_firstconnect', "$name||onBoot|", 0);
|
||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -872,7 +890,9 @@ sub DbRep_Get($@) {
|
|||||||
$hash->{LASTCMD} = $prop?"$opt $prop":"$opt";
|
$hash->{LASTCMD} = $prop?"$opt $prop":"$opt";
|
||||||
DbRep_delread($hash);
|
DbRep_delread($hash);
|
||||||
ReadingsSingleUpdateValue ($hash, "state", "running", 1);
|
ReadingsSingleUpdateValue ($hash, "state", "running", 1);
|
||||||
DbRep_firstconnect($hash);
|
$hash->{HELPER}{IDRETRIES} = 3; # Anzahl wie oft versucht wird initiale Daten zu holen
|
||||||
|
$prop = $prop?$prop:'';
|
||||||
|
DbRep_firstconnect("$name|$opt|$prop|");
|
||||||
|
|
||||||
} elsif ($opt =~ /dbValue/) {
|
} elsif ($opt =~ /dbValue/) {
|
||||||
return "get \"$opt\" needs at least an argument" if ( @a < 3 );
|
return "get \"$opt\" needs at least an argument" if ( @a < 3 );
|
||||||
@ -999,6 +1019,7 @@ sub DbRep_Attr($$$$) {
|
|||||||
executeBeforeProc
|
executeBeforeProc
|
||||||
executeAfterProc
|
executeAfterProc
|
||||||
expimpfile
|
expimpfile
|
||||||
|
fastStart
|
||||||
ftpUse
|
ftpUse
|
||||||
ftpUser
|
ftpUser
|
||||||
ftpUseSSL
|
ftpUseSSL
|
||||||
@ -1030,10 +1051,7 @@ sub DbRep_Attr($$$$) {
|
|||||||
$do = 0 if($cmd eq "del");
|
$do = 0 if($cmd eq "del");
|
||||||
my $val = ($do == 1 ? "disabled" : "initialized");
|
my $val = ($do == 1 ? "disabled" : "initialized");
|
||||||
ReadingsSingleUpdateValue ($hash, "state", $val, 1);
|
ReadingsSingleUpdateValue ($hash, "state", $val, 1);
|
||||||
if ($do == 0) {
|
if ($do == 1) {
|
||||||
RemoveInternalTimer($hash);
|
|
||||||
InternalTimer(time+5, 'DbRep_firstconnect', $hash, 0);
|
|
||||||
} else {
|
|
||||||
my $dbh = $hash->{DBH};
|
my $dbh = $hash->{DBH};
|
||||||
$dbh->disconnect() if($dbh);
|
$dbh->disconnect() if($dbh);
|
||||||
}
|
}
|
||||||
@ -1330,9 +1348,10 @@ return undef;
|
|||||||
# Verbindung zur DB aufbauen und den Timestamp des ältesten
|
# Verbindung zur DB aufbauen und den Timestamp des ältesten
|
||||||
# Datensatzes ermitteln
|
# Datensatzes ermitteln
|
||||||
###################################################################################
|
###################################################################################
|
||||||
sub DbRep_firstconnect($) {
|
sub DbRep_firstconnect(@) {
|
||||||
my ($hash) = @_;
|
my ($string) = @_;
|
||||||
my $name = $hash->{NAME};
|
my ($name,$opt,$prop,$fret) = split("\\|", $string);
|
||||||
|
my $hash = $defs{$name};
|
||||||
my $to = "120";
|
my $to = "120";
|
||||||
my $dbloghash = $hash->{dbloghash};
|
my $dbloghash = $hash->{dbloghash};
|
||||||
my $dbconn = $dbloghash->{dbconn};
|
my $dbconn = $dbloghash->{dbconn};
|
||||||
@ -1340,12 +1359,27 @@ sub DbRep_firstconnect($) {
|
|||||||
|
|
||||||
RemoveInternalTimer($hash, "DbRep_firstconnect");
|
RemoveInternalTimer($hash, "DbRep_firstconnect");
|
||||||
return if(IsDisabled($name));
|
return if(IsDisabled($name));
|
||||||
|
|
||||||
if ($init_done == 1) {
|
if ($init_done == 1) {
|
||||||
|
if (AttrVal($name, "fastStart", 0) && $prop eq "onBoot" ) {
|
||||||
|
$hash->{LASTCMD} = "initial database connect stopped due to attribute 'fastStart'";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
# DB Struktur aus DbLog Instanz übernehmen
|
||||||
|
$hash->{HELPER}{DBREPCOL}{COLSET} = $dbloghash->{HELPER}{COLSET};
|
||||||
|
$hash->{HELPER}{DBREPCOL}{DEVICECOL} = $dbloghash->{HELPER}{DEVICECOL};
|
||||||
|
$hash->{HELPER}{DBREPCOL}{EVENTCOL} = $dbloghash->{HELPER}{EVENTCOL};
|
||||||
|
$hash->{HELPER}{DBREPCOL}{READINGCOL} = $dbloghash->{HELPER}{READINGCOL};
|
||||||
|
$hash->{HELPER}{DBREPCOL}{TYPECOL} = $dbloghash->{HELPER}{TYPECOL};
|
||||||
|
$hash->{HELPER}{DBREPCOL}{UNITCOL} = $dbloghash->{HELPER}{UNITCOL};
|
||||||
|
$hash->{HELPER}{DBREPCOL}{VALUECOL} = $dbloghash->{HELPER}{VALUECOL};
|
||||||
|
|
||||||
|
# DB Strukturelemente abrufen
|
||||||
Log3 ($name, 3, "DbRep $name - Connectiontest to database $dbconn with user $dbuser") if($hash->{LASTCMD} ne "minTimestamp");
|
Log3 ($name, 3, "DbRep $name - Connectiontest to database $dbconn with user $dbuser") if($hash->{LASTCMD} ne "minTimestamp");
|
||||||
$hash->{HELPER}{RUNNING_PID} = BlockingCall("DbRep_getMinTs", "$name", "DbRep_getMinTsDone", $to, "DbRep_getMinTsAborted", $hash);
|
$hash->{HELPER}{RUNNING_PID} = BlockingCall("DbRep_getInitData", "$name|$opt|$prop|$fret", "DbRep_getInitDataDone", $to, "DbRep_getInitDataAborted", $hash);
|
||||||
$hash->{HELPER}{RUNNING_PID}{loglevel} = 5 if($hash->{HELPER}{RUNNING_PID}); # Forum #77057
|
$hash->{HELPER}{RUNNING_PID}{loglevel} = 5 if($hash->{HELPER}{RUNNING_PID}); # Forum #77057
|
||||||
} else {
|
} else {
|
||||||
InternalTimer(time+1, "DbRep_firstconnect", $hash, 0);
|
InternalTimer(time+1, "DbRep_firstconnect", "$name|$opt|$prop|$fret", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -1354,8 +1388,9 @@ return;
|
|||||||
####################################################################################################
|
####################################################################################################
|
||||||
# den ältesten Datensatz (Timestamp) in der DB bestimmen
|
# den ältesten Datensatz (Timestamp) in der DB bestimmen
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
sub DbRep_getMinTs($) {
|
sub DbRep_getInitData($) {
|
||||||
my ($name) = @_;
|
my ($string) = @_;
|
||||||
|
my ($name,$opt,$prop,$fret) = split("\\|", $string);
|
||||||
my $hash = $defs{$name};
|
my $hash = $defs{$name};
|
||||||
my $dbloghash = $hash->{dbloghash};
|
my $dbloghash = $hash->{dbloghash};
|
||||||
my $dbconn = $dbloghash->{dbconn};
|
my $dbconn = $dbloghash->{dbconn};
|
||||||
@ -1379,8 +1414,6 @@ sub DbRep_getMinTs($) {
|
|||||||
my $st = [gettimeofday];
|
my $st = [gettimeofday];
|
||||||
|
|
||||||
eval { $mints = $dbh->selectrow_array("SELECT min(TIMESTAMP) FROM history;"); };
|
eval { $mints = $dbh->selectrow_array("SELECT min(TIMESTAMP) FROM history;"); };
|
||||||
# eval { $mints = $dbh->selectrow_array("select TIMESTAMP from history limit 1;"); };
|
|
||||||
# eval { $mints = $dbh->selectrow_array("select TIMESTAMP from history order by TIMESTAMP limit 1;"); };
|
|
||||||
|
|
||||||
$dbh->disconnect;
|
$dbh->disconnect;
|
||||||
|
|
||||||
@ -1393,14 +1426,15 @@ sub DbRep_getMinTs($) {
|
|||||||
my $brt = tv_interval($bst);
|
my $brt = tv_interval($bst);
|
||||||
|
|
||||||
$rt = $rt.",".$brt;
|
$rt = $rt.",".$brt;
|
||||||
|
no warnings 'uninitialized';
|
||||||
|
|
||||||
return "$name|$mints|$rt|0";
|
return "$name|$mints|$rt|0|$opt|$prop|$fret";
|
||||||
}
|
}
|
||||||
|
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
# Auswertungsroutine den ältesten Datensatz (Timestamp) in der DB bestimmen
|
# Auswertungsroutine den ältesten Datensatz (Timestamp) in der DB bestimmen
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
sub DbRep_getMinTsDone($) {
|
sub DbRep_getInitDataDone($) {
|
||||||
my ($string) = @_;
|
my ($string) = @_;
|
||||||
my @a = split("\\|",$string);
|
my @a = split("\\|",$string);
|
||||||
my $hash = $defs{$a[0]};
|
my $hash = $defs{$a[0]};
|
||||||
@ -1409,6 +1443,9 @@ sub DbRep_getMinTsDone($) {
|
|||||||
my $bt = $a[2];
|
my $bt = $a[2];
|
||||||
my ($rt,$brt) = split(",", $bt);
|
my ($rt,$brt) = split(",", $bt);
|
||||||
my $err = $a[3]?decode_base64($a[3]):undef;
|
my $err = $a[3]?decode_base64($a[3]):undef;
|
||||||
|
my $opt = $a[4];
|
||||||
|
my $prop = $a[5];
|
||||||
|
my $fret = \&{$a[6]} if($a[6]);
|
||||||
my $dblogdevice = $hash->{HELPER}{DBLOGDEVICE};
|
my $dblogdevice = $hash->{HELPER}{DBLOGDEVICE};
|
||||||
$hash->{dbloghash} = $defs{$dblogdevice};
|
$hash->{dbloghash} = $defs{$dblogdevice};
|
||||||
my $dbconn = $hash->{dbloghash}{dbconn};
|
my $dbconn = $hash->{dbloghash}{dbconn};
|
||||||
@ -1420,9 +1457,8 @@ sub DbRep_getMinTsDone($) {
|
|||||||
readingsEndUpdate($hash, 1);
|
readingsEndUpdate($hash, 1);
|
||||||
delete($hash->{HELPER}{RUNNING_PID});
|
delete($hash->{HELPER}{RUNNING_PID});
|
||||||
Log3 ($name, 2, "DbRep $name - DB connect failed. Make sure credentials of database $hash->{DATABASE} are valid and database is reachable.");
|
Log3 ($name, 2, "DbRep $name - DB connect failed. Make sure credentials of database $hash->{DATABASE} are valid and database is reachable.");
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
} else {
|
||||||
my $state = ($hash->{LASTCMD} eq "minTimestamp")?"done":"connected";
|
my $state = ($hash->{LASTCMD} eq "minTimestamp")?"done":"connected";
|
||||||
$state = "invalid timestamp \"$mints\" found in database - please delete it" if($mints =~ /^0000-00-00.*$/);
|
$state = "invalid timestamp \"$mints\" found in database - please delete it" if($mints =~ /^0000-00-00.*$/);
|
||||||
|
|
||||||
@ -1431,19 +1467,21 @@ sub DbRep_getMinTsDone($) {
|
|||||||
ReadingsBulkUpdateTimeState($hash,$brt,$rt,$state);
|
ReadingsBulkUpdateTimeState($hash,$brt,$rt,$state);
|
||||||
readingsEndUpdate($hash, 1);
|
readingsEndUpdate($hash, 1);
|
||||||
|
|
||||||
Log3 ($name, 4, "DbRep $name - Connectiontest to db $dbconn successful") if($hash->{LASTCMD} ne "minTimestamp");
|
Log3 ($name, 3, "DbRep $name - Connectiontest to db $dbconn successful") if($hash->{LASTCMD} ne "minTimestamp");
|
||||||
|
|
||||||
$hash->{HELPER}{MINTS} = $mints;
|
$hash->{HELPER}{MINTS} = $mints;
|
||||||
|
}
|
||||||
|
|
||||||
delete($hash->{HELPER}{RUNNING_PID});
|
delete($hash->{HELPER}{RUNNING_PID});
|
||||||
|
|
||||||
return;
|
return if(!$fret);
|
||||||
|
return &$fret($hash,$opt,$prop);
|
||||||
}
|
}
|
||||||
|
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
# Abbruchroutine den ältesten Datensatz (Timestamp) in der DB bestimmen
|
# Abbruchroutine den ältesten Datensatz (Timestamp) in der DB bestimmen
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
sub DbRep_getMinTsAborted(@) {
|
sub DbRep_getInitDataAborted(@) {
|
||||||
my ($hash,$cause) = @_;
|
my ($hash,$cause) = @_;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
@ -1552,6 +1590,16 @@ sub DbRep_Main($$;$) {
|
|||||||
BlockingKill($hash->{HELPER}{RUNNING_PID});
|
BlockingKill($hash->{HELPER}{RUNNING_PID});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# initiale Datenermittlung wie minimal Timestamp, Datenbankstrukturen, ...
|
||||||
|
if(!$hash->{HELPER}{MINTS} or !$hash->{HELPER}{DBREPCOL}{COLSET}) {
|
||||||
|
my $dbname = $hash->{DATABASE};
|
||||||
|
Log3 ($name, 3, "DbRep $name - get initial structure information of database \"$dbname\", remaining attempts: ".$hash->{HELPER}{IDRETRIES});
|
||||||
|
$prop = $prop?$prop:'';
|
||||||
|
DbRep_firstconnect("$name|$opt|$prop|DbRep_Main") if($hash->{HELPER}{IDRETRIES} > 0);
|
||||||
|
$hash->{HELPER}{IDRETRIES}--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ReadingsSingleUpdateValue ($hash, "state", "running", 1);
|
ReadingsSingleUpdateValue ($hash, "state", "running", 1);
|
||||||
|
|
||||||
# only for this block because of warnings if details of readings are not set
|
# only for this block because of warnings if details of readings are not set
|
||||||
@ -2570,6 +2618,7 @@ sub count_DoParse($) {
|
|||||||
my $dblogname = $dbloghash->{NAME};
|
my $dblogname = $dbloghash->{NAME};
|
||||||
my $dbpassword = $attr{"sec$dblogname"}{secret};
|
my $dbpassword = $attr{"sec$dblogname"}{secret};
|
||||||
my $ced = AttrVal($name,"countEntriesDetail",0);
|
my $ced = AttrVal($name,"countEntriesDetail",0);
|
||||||
|
my $vf = AttrVal($name,"valueFilter","");
|
||||||
my ($dbh,$sql,$sth,$err);
|
my ($dbh,$sql,$sth,$err);
|
||||||
|
|
||||||
# Background-Startzeit
|
# Background-Startzeit
|
||||||
@ -4278,7 +4327,7 @@ sub change_Push($) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
# nichtblockierendes DB deviceRename / readingRename
|
# nichtblockierendes DB changeValue (Field VALUE)
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
sub changeval_Push($) {
|
sub changeval_Push($) {
|
||||||
my ($string) = @_;
|
my ($string) = @_;
|
||||||
@ -4537,7 +4586,6 @@ sub fetchrows_DoParse($) {
|
|||||||
my $limit = AttrVal($name, "limit", 1000);
|
my $limit = AttrVal($name, "limit", 1000);
|
||||||
my $utf8 = defined($hash->{UTF8})?$hash->{UTF8}:0;
|
my $utf8 = defined($hash->{UTF8})?$hash->{UTF8}:0;
|
||||||
my $fetchroute = AttrVal($name, "fetchRoute", "descent");
|
my $fetchroute = AttrVal($name, "fetchRoute", "descent");
|
||||||
my $valfilter = AttrVal($name, "valueFilter", undef); # nur Anzeige von Datensätzen die "valueFilter" enthalten
|
|
||||||
$fetchroute = ($fetchroute eq "descent")?"DESC":"ASC";
|
$fetchroute = ($fetchroute eq "descent")?"DESC":"ASC";
|
||||||
my ($err,$dbh,$sth,$sql,$rowlist,$nrows);
|
my ($err,$dbh,$sth,$sql,$rowlist,$nrows);
|
||||||
|
|
||||||
@ -4580,16 +4628,6 @@ sub fetchrows_DoParse($) {
|
|||||||
no warnings 'uninitialized';
|
no warnings 'uninitialized';
|
||||||
my @row_array = map { $_->[0]."_ESC_".$_->[1]."_ESC_".($_->[2] =~ s/ /_ESC_/r)."_ESC_".$_->[3]."_ESC_".$_->[4]."\n" } @{$sth->fetchall_arrayref()};
|
my @row_array = map { $_->[0]."_ESC_".$_->[1]."_ESC_".($_->[2] =~ s/ /_ESC_/r)."_ESC_".$_->[3]."_ESC_".$_->[4]."\n" } @{$sth->fetchall_arrayref()};
|
||||||
|
|
||||||
# eventuell gesetzten Datensatz-Filter anwenden
|
|
||||||
if($valfilter) {
|
|
||||||
my @fiarr;
|
|
||||||
foreach my $row (@row_array) {
|
|
||||||
next if($row !~ /$valfilter/);
|
|
||||||
push @fiarr,$row;
|
|
||||||
}
|
|
||||||
@row_array = @fiarr;
|
|
||||||
}
|
|
||||||
|
|
||||||
use warnings;
|
use warnings;
|
||||||
$nrows = $#row_array+1; # Anzahl der Ergebniselemente
|
$nrows = $#row_array+1; # Anzahl der Ergebniselemente
|
||||||
pop @row_array if($nrows>$limit); # das zuviel selektierte Element wegpoppen wenn Limit überschritten
|
pop @row_array if($nrows>$limit); # das zuviel selektierte Element wegpoppen wenn Limit überschritten
|
||||||
@ -4649,7 +4687,7 @@ sub fetchrows_ParseDone($) {
|
|||||||
my @row_array = split("\\|", $rowlist);
|
my @row_array = split("\\|", $rowlist);
|
||||||
s/_E#S#C_/\|/g for @row_array; # escaped Pipe return to "|"
|
s/_E#S#C_/\|/g for @row_array; # escaped Pipe return to "|"
|
||||||
|
|
||||||
Log3 ($name, 5, "DbRep $name - row_array decoded: @row_array");
|
Log3 ($name, 5, "DbRep $name - row_array decoded:\n @row_array");
|
||||||
|
|
||||||
# Readingaufbereitung
|
# Readingaufbereitung
|
||||||
readingsBeginUpdate($hash);
|
readingsBeginUpdate($hash);
|
||||||
@ -8071,7 +8109,8 @@ sub DbRep_createSelectSql($$$$$$$$) {
|
|||||||
my ($hash,$table,$selspec,$device,$reading,$tf,$tn,$addon) = @_;
|
my ($hash,$table,$selspec,$device,$reading,$tf,$tn,$addon) = @_;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
my $dbmodel = $hash->{dbloghash}{MODEL};
|
my $dbmodel = $hash->{dbloghash}{MODEL};
|
||||||
my $sql;
|
my $valfilter = AttrVal($name, "valueFilter", undef); # Wertefilter
|
||||||
|
my ($sql,$vf);
|
||||||
my $tnfull = 0;
|
my $tnfull = 0;
|
||||||
|
|
||||||
my ($idevs,$idanz,$ireading,$iranz,$edevs,$edanz,$ereading,$eranz) = DbRep_specsForSql($hash,$device,$reading);
|
my ($idevs,$idanz,$ireading,$iranz,$edevs,$edanz,$ereading,$eranz) = DbRep_specsForSql($hash,$device,$reading);
|
||||||
@ -8080,6 +8119,14 @@ sub DbRep_createSelectSql($$$$$$$$) {
|
|||||||
$tnfull = 1;
|
$tnfull = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(defined $valfilter) {
|
||||||
|
if ($dbmodel eq "POSTGRESQL") {
|
||||||
|
$vf = "VALUE ~ '$valfilter' AND ";
|
||||||
|
} else {
|
||||||
|
$vf = "VALUE REGEXP '$valfilter' AND ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$sql = "SELECT $selspec FROM $table where ";
|
$sql = "SELECT $selspec FROM $table where ";
|
||||||
# included devices
|
# included devices
|
||||||
$sql .= "DEVICE LIKE '$idevs' AND " if($idanz <= 1 && $idevs !~ m(^%$) && $idevs =~ m(\%));
|
$sql .= "DEVICE LIKE '$idevs' AND " if($idanz <= 1 && $idevs !~ m(^%$) && $idevs =~ m(\%));
|
||||||
@ -8097,6 +8144,9 @@ sub DbRep_createSelectSql($$$$$$$$) {
|
|||||||
$sql .= "READING NOT LIKE '$ereading' AND " if($eranz && $eranz == 1 && $ereading =~ m(\%));
|
$sql .= "READING NOT LIKE '$ereading' AND " if($eranz && $eranz == 1 && $ereading =~ m(\%));
|
||||||
$sql .= "READING != '$ereading' AND " if($eranz && $eranz == 1 && $ereading !~ m(\%));
|
$sql .= "READING != '$ereading' AND " if($eranz && $eranz == 1 && $ereading !~ m(\%));
|
||||||
$sql .= "READING NOT IN ($ereading) AND " if($eranz > 1);
|
$sql .= "READING NOT IN ($ereading) AND " if($eranz > 1);
|
||||||
|
# add valueFilter
|
||||||
|
$sql .= $vf if(defined $vf);
|
||||||
|
# Timestamp Filter
|
||||||
if (($tf && $tn)) {
|
if (($tf && $tn)) {
|
||||||
$sql .= "TIMESTAMP >= $tf AND TIMESTAMP ".($tnfull?"<=":"<")." $tn ";
|
$sql .= "TIMESTAMP >= $tf AND TIMESTAMP ".($tnfull?"<=":"<")." $tn ";
|
||||||
} else {
|
} else {
|
||||||
@ -8118,7 +8168,8 @@ sub DbRep_createUpdateSql($$$$$$$$) {
|
|||||||
my ($hash,$table,$selspec,$device,$reading,$tf,$tn,$addon) = @_;
|
my ($hash,$table,$selspec,$device,$reading,$tf,$tn,$addon) = @_;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
my $dbmodel = $hash->{dbloghash}{MODEL};
|
my $dbmodel = $hash->{dbloghash}{MODEL};
|
||||||
my $sql;
|
my $valfilter = AttrVal($name, "valueFilter", undef); # Wertefilter
|
||||||
|
my ($sql,$vf);
|
||||||
my $tnfull = 0;
|
my $tnfull = 0;
|
||||||
|
|
||||||
my ($idevs,$idanz,$ireading,$iranz,$edevs,$edanz,$ereading,$eranz) = DbRep_specsForSql($hash,$device,$reading);
|
my ($idevs,$idanz,$ireading,$iranz,$edevs,$edanz,$ereading,$eranz) = DbRep_specsForSql($hash,$device,$reading);
|
||||||
@ -8127,6 +8178,14 @@ sub DbRep_createUpdateSql($$$$$$$$) {
|
|||||||
$tnfull = 1;
|
$tnfull = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(defined $valfilter) {
|
||||||
|
if ($dbmodel eq "POSTGRESQL") {
|
||||||
|
$vf = "VALUE ~ '$valfilter' AND ";
|
||||||
|
} else {
|
||||||
|
$vf = "VALUE REGEXP '$valfilter' AND ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$sql = "UPDATE $table SET $selspec AND ";
|
$sql = "UPDATE $table SET $selspec AND ";
|
||||||
# included devices
|
# included devices
|
||||||
$sql .= "DEVICE LIKE '$idevs' AND " if($idanz <= 1 && $idevs !~ m(^%$) && $idevs =~ m(\%));
|
$sql .= "DEVICE LIKE '$idevs' AND " if($idanz <= 1 && $idevs !~ m(^%$) && $idevs =~ m(\%));
|
||||||
@ -8144,6 +8203,9 @@ sub DbRep_createUpdateSql($$$$$$$$) {
|
|||||||
$sql .= "READING NOT LIKE '$ereading' AND " if($eranz && $eranz == 1 && $ereading =~ m(\%));
|
$sql .= "READING NOT LIKE '$ereading' AND " if($eranz && $eranz == 1 && $ereading =~ m(\%));
|
||||||
$sql .= "READING != '$ereading' AND " if($eranz && $eranz == 1 && $ereading !~ m(\%));
|
$sql .= "READING != '$ereading' AND " if($eranz && $eranz == 1 && $ereading !~ m(\%));
|
||||||
$sql .= "READING NOT IN ($ereading) AND " if($eranz > 1);
|
$sql .= "READING NOT IN ($ereading) AND " if($eranz > 1);
|
||||||
|
# add valueFilter
|
||||||
|
$sql .= $vf if(defined $vf);
|
||||||
|
# Timestamp Filter
|
||||||
if (($tf && $tn)) {
|
if (($tf && $tn)) {
|
||||||
$sql .= "TIMESTAMP >= $tf AND TIMESTAMP ".($tnfull?"<=":"<")." $tn ";
|
$sql .= "TIMESTAMP >= $tf AND TIMESTAMP ".($tnfull?"<=":"<")." $tn ";
|
||||||
} else {
|
} else {
|
||||||
@ -8165,7 +8227,8 @@ sub DbRep_createDeleteSql($$$$$$$) {
|
|||||||
my ($hash,$table,$device,$reading,$tf,$tn,$addon) = @_;
|
my ($hash,$table,$device,$reading,$tf,$tn,$addon) = @_;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
my $dbmodel = $hash->{dbloghash}{MODEL};
|
my $dbmodel = $hash->{dbloghash}{MODEL};
|
||||||
my $sql;
|
my $valfilter = AttrVal($name, "valueFilter", undef); # Wertefilter
|
||||||
|
my ($sql,$vf);
|
||||||
my $tnfull = 0;
|
my $tnfull = 0;
|
||||||
|
|
||||||
if($table eq "current") {
|
if($table eq "current") {
|
||||||
@ -8179,6 +8242,14 @@ sub DbRep_createDeleteSql($$$$$$$) {
|
|||||||
$tnfull = 1;
|
$tnfull = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(defined $valfilter) {
|
||||||
|
if ($dbmodel eq "POSTGRESQL") {
|
||||||
|
$vf = "VALUE ~ '$valfilter' AND ";
|
||||||
|
} else {
|
||||||
|
$vf = "VALUE REGEXP '$valfilter' AND ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$sql = "delete FROM $table where ";
|
$sql = "delete FROM $table where ";
|
||||||
# included devices
|
# included devices
|
||||||
$sql .= "DEVICE LIKE '$idevs' AND " if($idanz <= 1 && $idevs !~ m(^%$) && $idevs =~ m(\%));
|
$sql .= "DEVICE LIKE '$idevs' AND " if($idanz <= 1 && $idevs !~ m(^%$) && $idevs =~ m(\%));
|
||||||
@ -8196,6 +8267,9 @@ sub DbRep_createDeleteSql($$$$$$$) {
|
|||||||
$sql .= "READING NOT LIKE '$ereading' AND " if($eranz && $eranz == 1 && $ereading =~ m(\%));
|
$sql .= "READING NOT LIKE '$ereading' AND " if($eranz && $eranz == 1 && $ereading =~ m(\%));
|
||||||
$sql .= "READING != '$ereading' AND " if($eranz && $eranz == 1 && $ereading !~ m(\%));
|
$sql .= "READING != '$ereading' AND " if($eranz && $eranz == 1 && $ereading !~ m(\%));
|
||||||
$sql .= "READING NOT IN ($ereading) AND " if($eranz > 1);
|
$sql .= "READING NOT IN ($ereading) AND " if($eranz > 1);
|
||||||
|
# add valueFilter
|
||||||
|
$sql .= $vf if(defined $vf);
|
||||||
|
# Timestamp Filter
|
||||||
if ($tf && $tn) {
|
if ($tf && $tn) {
|
||||||
$sql .= "TIMESTAMP >= '$tf' AND TIMESTAMP ".($tnfull?"<=":"<")." '$tn' $addon;";
|
$sql .= "TIMESTAMP >= '$tf' AND TIMESTAMP ".($tnfull?"<=":"<")." '$tn' $addon;";
|
||||||
} else {
|
} else {
|
||||||
@ -10042,6 +10116,24 @@ return;
|
|||||||
avgam_day_totalpac <br>
|
avgam_day_totalpac <br>
|
||||||
# <creation function>_<aggregation>_<original reading> <br>
|
# <creation function>_<aggregation>_<original reading> <br>
|
||||||
</ul>
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Summarized the relevant attributes to control this function are: <br><br>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<table>
|
||||||
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
|
<tr><td> <b>averageCalcForm</b> </td><td>: choose the calculation variant for average determination </td></tr>
|
||||||
|
<tr><td> <b>device</b> </td><td>: include or exclude <device> from selection </td></tr>
|
||||||
|
<tr><td> <b>reading</b> </td><td>: include or exclude <reading> from selection </td></tr>
|
||||||
|
<tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: an additional REGEXP to control the record selection. The REGEXP is applied to the database field 'VALUE'. </td></tr>
|
||||||
|
</table>
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<li><b> cancelDump </b> - stops a running database dump. </li> <br>
|
<li><b> cancelDump </b> - stops a running database dump. </li> <br>
|
||||||
@ -10097,6 +10189,7 @@ return;
|
|||||||
<tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
|
<tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
|
||||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execute a FHEM command (or perl-routine) before start of changeValue </td></tr>
|
<tr><td> <b>executeBeforeProc</b> </td><td>: execute a FHEM command (or perl-routine) before start of changeValue </td></tr>
|
||||||
<tr><td> <b>executeAfterProc</b> </td><td>: execute a FHEM command (or perl-routine) after changeValue is finished </td></tr>
|
<tr><td> <b>executeAfterProc</b> </td><td>: execute a FHEM command (or perl-routine) after changeValue is finished </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: an additional REGEXP to control the record selection. The REGEXP is applied to the database field 'VALUE'. </td></tr>
|
||||||
</table>
|
</table>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
@ -10123,10 +10216,11 @@ return;
|
|||||||
<table>
|
<table>
|
||||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
<tr><td> <b>aggregation</b> </td><td>: aggregatiion/grouping of time intervals </td></tr>
|
<tr><td> <b>aggregation</b> </td><td>: aggregatiion/grouping of time intervals </td></tr>
|
||||||
<tr><td> <b>countEntriesDetail</b></td><td>: detailed report the count of datasets (per reading) </td></tr>
|
<tr><td> <b>countEntriesDetail</b> </td><td>: detailed report the count of datasets (per reading) </td></tr>
|
||||||
<tr><td> <b>device</b> </td><td>: include or exclude <device> from selection </td></tr>
|
<tr><td> <b>device</b> </td><td>: include or exclude <device> from selection </td></tr>
|
||||||
<tr><td> <b>reading</b> </td><td>: include or exclude <reading> from selection </td></tr>
|
<tr><td> <b>reading</b> </td><td>: include or exclude <reading> from selection </td></tr>
|
||||||
<tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
|
<tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: an additional REGEXP to control the record selection. The REGEXP is applied to the database field 'VALUE'. </td></tr>
|
||||||
</table>
|
</table>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
@ -10155,7 +10249,8 @@ return;
|
|||||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
<tr><td> <b>allowDeletion</b> </td><td>: unlock the delete function </td></tr>
|
<tr><td> <b>allowDeletion</b> </td><td>: unlock the delete function </td></tr>
|
||||||
<tr><td> <b>device</b> </td><td>: include or exclude <device> from selection </td></tr>
|
<tr><td> <b>device</b> </td><td>: include or exclude <device> from selection </td></tr>
|
||||||
<tr><td> <b>reading</b> </td><td>: include or exclude <reading> from selection </td></tr> <tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
|
<tr><td> <b>reading</b> </td><td>: include or exclude <reading> from selection </td></tr>
|
||||||
|
<tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
|
||||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execute a FHEM command (or perl-routine) before start of delEntries </td></tr>
|
<tr><td> <b>executeBeforeProc</b> </td><td>: execute a FHEM command (or perl-routine) before start of delEntries </td></tr>
|
||||||
<tr><td> <b>executeAfterProc</b> </td><td>: execute a FHEM command (or perl-routine) after delEntries is finished </td></tr>
|
<tr><td> <b>executeAfterProc</b> </td><td>: execute a FHEM command (or perl-routine) after delEntries is finished </td></tr>
|
||||||
</table>
|
</table>
|
||||||
@ -10231,6 +10326,25 @@ return;
|
|||||||
<b>2017-11-25_23-58-09__eg.az.fridge_Pwr__power 51.73 </b> <br>
|
<b>2017-11-25_23-58-09__eg.az.fridge_Pwr__power 51.73 </b> <br>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Summarized the relevant attributes to control this function are: <br><br>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<table>
|
||||||
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
|
<tr><td> <b>allowDeletion</b> </td><td>: needs to be set to execute the delete option </td></tr>
|
||||||
|
<tr><td> <b>aggregation</b> </td><td>: choose the aggregation period </td></tr>
|
||||||
|
<tr><td> <b>limit</b> </td><td>: limits ONLY the count of datasets to display </td></tr>
|
||||||
|
<tr><td> <b>device</b> </td><td>: include or exclude <device> from selection </td></tr>
|
||||||
|
<tr><td> <b>reading</b> </td><td>: include or exclude <reading> from selection </td></tr>
|
||||||
|
<tr><td> <b>executeBeforeProc</b> </td><td>: execute a FHEM command (or perl-routine) before start of delEntries </td></tr>
|
||||||
|
<tr><td> <b>executeAfterProc</b> </td><td>: execute a FHEM command (or perl-routine) after delEntries is finished </td></tr>
|
||||||
|
<tr><td> <b>seqDoubletsVariance</b> </td><td>: Up to this value consecutive numerical datasets are handled as identical and should be deleted </td></tr>
|
||||||
|
<tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: an additional REGEXP to control the record selection. The REGEXP is applied to the database field 'VALUE'. </td></tr>
|
||||||
|
</table>
|
||||||
|
</ul>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
@ -10263,7 +10377,7 @@ return;
|
|||||||
The difference will be generated from the first available dataset (VALUE-Field) to the last available dataset between the
|
The difference will be generated from the first available dataset (VALUE-Field) to the last available dataset between the
|
||||||
specified time linits/aggregation, in which a balanced difference value of the previous aggregation period will be transfered to the
|
specified time linits/aggregation, in which a balanced difference value of the previous aggregation period will be transfered to the
|
||||||
following aggregation period in case this period contains a value. <br>
|
following aggregation period in case this period contains a value. <br>
|
||||||
An possible counter overrun (restart with value "0") will be considered (compare <a href="#DbRepattr">attribute</a> "diffAccept"). <br><br>
|
A possible counter overrun (restart with value "0") will be considered (compare <a href="#DbRepattr">attribute</a> "diffAccept"). <br><br>
|
||||||
|
|
||||||
If only one dataset will be found within the evalution period, the difference can be calculated only in combination with the balanced
|
If only one dataset will be found within the evalution period, the difference can be calculated only in combination with the balanced
|
||||||
difference of the previous aggregation period. In this case a logical inaccuracy according the assignment of the difference to the particular aggregation period
|
difference of the previous aggregation period. In this case a logical inaccuracy according the assignment of the difference to the particular aggregation period
|
||||||
@ -10294,6 +10408,25 @@ return;
|
|||||||
diff_day_totalpac <br>
|
diff_day_totalpac <br>
|
||||||
# <creation function>_<aggregation>_<original reading> <br>
|
# <creation function>_<aggregation>_<original reading> <br>
|
||||||
</ul>
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Summarized the relevant attributes to control this function are: <br><br>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<table>
|
||||||
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
|
<tr><td> <b>aggregation</b> </td><td>: choose the aggregation period </td></tr>
|
||||||
|
<tr><td> <b>diffAccept</b> </td><td>: the maximum accepted difference between sequential records </td></tr>
|
||||||
|
<tr><td> <b>device</b> </td><td>: include or exclude <device> from selection </td></tr>
|
||||||
|
<tr><td> <b>reading</b> </td><td>: include or exclude <reading> from selection </td></tr>
|
||||||
|
<tr><td> <b>readingNameMap</b> </td><td>: rename the resulted reading name </td></tr>
|
||||||
|
<tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: an additional REGEXP to control the record selection. The REGEXP is applied to the database field 'VALUE'. </td></tr>
|
||||||
|
</table>
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
|
|
||||||
@ -10537,6 +10670,8 @@ return;
|
|||||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or perl-routine) after export </td></tr>
|
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or perl-routine) after export </td></tr>
|
||||||
<tr><td> <b>expimpfile</b> </td><td>: the name of exportfile </td></tr>
|
<tr><td> <b>expimpfile</b> </td><td>: the name of exportfile </td></tr>
|
||||||
<tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
|
<tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: an additional REGEXP to control the record selection. The REGEXP is applied to the database field 'VALUE'. </td></tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -10587,9 +10722,9 @@ return;
|
|||||||
<tr><td> <b>limit</b> </td><td>: limits the number of datasets to select and display </td></tr>
|
<tr><td> <b>limit</b> </td><td>: limits the number of datasets to select and display </td></tr>
|
||||||
<tr><td> <b>fetchMarkDuplicates</b> </td><td>: Highlighting of found doublets </td></tr>
|
<tr><td> <b>fetchMarkDuplicates</b> </td><td>: Highlighting of found doublets </td></tr>
|
||||||
<tr><td> <b>device</b> </td><td>: include or exclude <device> from selection </td></tr>
|
<tr><td> <b>device</b> </td><td>: include or exclude <device> from selection </td></tr>
|
||||||
<tr><td> <b>reading</b> </td><td>: include or exclude <reading> from selection </td></tr> <tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
|
<tr><td> <b>reading</b> </td><td>: include or exclude <reading> from selection </td></tr>
|
||||||
<tr><td> <b>time.*</b> </td><td>: A number of attributes to limit selection by time </td></tr>
|
<tr><td> <b>time.*</b> </td><td>: A number of attributes to limit selection by time </td></tr>
|
||||||
<tr><td> <b>valueFilter</b> </td><td>: Filter datasets which are to show by a regular expression. The regex is applied to the whole selected dataset. </td></tr>
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: an additional REGEXP to control the record selection. The REGEXP is applied to the database field 'VALUE'. </td></tr>
|
||||||
</table>
|
</table>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
@ -10676,6 +10811,22 @@ return;
|
|||||||
max_day_totalpac <br>
|
max_day_totalpac <br>
|
||||||
# <creation function>_<aggregation>_<original reading> <br>
|
# <creation function>_<aggregation>_<original reading> <br>
|
||||||
</ul>
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Summarized the relevant attributes to control this function are: <br><br>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<table>
|
||||||
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
|
<tr><td> <b>aggregation</b> </td><td>: choose the aggregation period </td></tr>
|
||||||
|
<tr><td> <b>device</b> </td><td>: include or exclude <device> from selection </td></tr>
|
||||||
|
<tr><td> <b>reading</b> </td><td>: include or exclude <reading> from selection </td></tr>
|
||||||
|
<tr><td> <b>readingNameMap</b> </td><td>: rename the resulted readings </td></tr>
|
||||||
|
<tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: an additional REGEXP to control the record selection. The REGEXP is applied to the database field 'VALUE'. </td></tr>
|
||||||
|
</table>
|
||||||
|
</ul>
|
||||||
|
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<li><b> minValue [display | writeToDB]</b>
|
<li><b> minValue [display | writeToDB]</b>
|
||||||
@ -10700,6 +10851,22 @@ return;
|
|||||||
min_day_totalpac <br>
|
min_day_totalpac <br>
|
||||||
# <creation function>_<aggregation>_<original reading> <br>
|
# <creation function>_<aggregation>_<original reading> <br>
|
||||||
</ul>
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Summarized the relevant attributes to control this function are: <br><br>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<table>
|
||||||
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
|
<tr><td> <b>aggregation</b> </td><td>: choose the aggregation period </td></tr>
|
||||||
|
<tr><td> <b>device</b> </td><td>: include or exclude <device> from selection </td></tr>
|
||||||
|
<tr><td> <b>reading</b> </td><td>: include or exclude <reading> from selection </td></tr>
|
||||||
|
<tr><td> <b>readingNameMap</b> </td><td>: rename the resulted readings </td></tr>
|
||||||
|
<tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: an additional REGEXP to control the record selection. The REGEXP is applied to the database field 'VALUE'. </td></tr>
|
||||||
|
</table>
|
||||||
|
</ul>
|
||||||
|
|
||||||
</li><br>
|
</li><br>
|
||||||
|
|
||||||
<li><b> optimizeTables </b> - optimize tables in the connected database (MySQL). <br>
|
<li><b> optimizeTables </b> - optimize tables in the connected database (MySQL). <br>
|
||||||
@ -10757,11 +10924,12 @@ return;
|
|||||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execution of FHEM command (or perl-routine) before reducelog </td></tr>
|
<tr><td> <b>executeBeforeProc</b> </td><td>: execution of FHEM command (or perl-routine) before reducelog </td></tr>
|
||||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or perl-routine) after reducelog </td></tr>
|
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or perl-routine) after reducelog </td></tr>
|
||||||
<tr><td> <b>device</b> </td><td>: include or exclude <device> for selection </td></tr>
|
<tr><td> <b>device</b> </td><td>: include or exclude <device> for selection </td></tr>
|
||||||
<tr><td> <b>reading</b> </td><td>: include or exclude <reading> for selection </td></tr> <tr><td> <b>time.*</b> </td><td>: Attribute zur Zeitabgrenzung der zu übertragenden Datensätze. </td></tr>
|
<tr><td> <b>reading</b> </td><td>: include or exclude <reading> for selection </td></tr>
|
||||||
<tr><td> <b>timeOlderThan</b> </td><td>: records <b>older</b> than this attribute will be reduced </td></tr>
|
<tr><td> <b>timeOlderThan</b> </td><td>: records <b>older</b> than this attribute will be reduced </td></tr>
|
||||||
<tr><td> <b>timestamp_end</b> </td><td>: records <b>older</b> than this attribute will be reduced </td></tr>
|
<tr><td> <b>timestamp_end</b> </td><td>: records <b>older</b> than this attribute will be reduced </td></tr>
|
||||||
<tr><td> <b>timeDiffToNow</b> </td><td>: records <b>newer</b> than this attribute will be reduced </td></tr>
|
<tr><td> <b>timeDiffToNow</b> </td><td>: records <b>newer</b> than this attribute will be reduced </td></tr>
|
||||||
<tr><td> <b>timestamp_begin</b> </td><td>: records <b>newer</b> than this attribute will be reduced </td></tr>
|
<tr><td> <b>timestamp_begin</b> </td><td>: records <b>newer</b> than this attribute will be reduced </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: an additional REGEXP to control the record selection. The REGEXP is applied to the database field 'VALUE'. </td></tr>
|
||||||
</table>
|
</table>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
@ -10990,10 +11158,25 @@ return;
|
|||||||
<b>Example of building a new reading name from the original reading "totalpac":</b> <br>
|
<b>Example of building a new reading name from the original reading "totalpac":</b> <br>
|
||||||
sum_day_totalpac <br>
|
sum_day_totalpac <br>
|
||||||
# <creation function>_<aggregation>_<original reading> <br>
|
# <creation function>_<aggregation>_<original reading> <br>
|
||||||
</li> <br>
|
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
Summarized the relevant attributes to control this function are: <br><br>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<table>
|
||||||
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
|
<tr><td> <b>aggregation</b> </td><td>: choose the aggregation period </td></tr>
|
||||||
|
<tr><td> <b>device</b> </td><td>: include or exclude <device> from selection </td></tr>
|
||||||
|
<tr><td> <b>reading</b> </td><td>: include or exclude <reading> from selection </td></tr>
|
||||||
|
<tr><td> <b>readingNameMap</b> </td><td>: rename the resulted readings </td></tr>
|
||||||
|
<tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: an additional REGEXP to control the record selection. The REGEXP is applied to the database field 'VALUE'. </td></tr>
|
||||||
|
</table>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</li> <br>
|
||||||
|
|
||||||
<li><b> syncStandby <DbLog-Device Standby> </b>
|
<li><b> syncStandby <DbLog-Device Standby> </b>
|
||||||
- datasets of the connected database (source) are transmitted into another database
|
- datasets of the connected database (source) are transmitted into another database
|
||||||
(Standby-database). <br>
|
(Standby-database). <br>
|
||||||
@ -11014,12 +11197,13 @@ return;
|
|||||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
<tr><td> <b>aggregation</b> </td><td>: adjustment of time slices for data transmission (hour,day,week) </td></tr>
|
<tr><td> <b>aggregation</b> </td><td>: adjustment of time slices for data transmission (hour,day,week) </td></tr>
|
||||||
<tr><td> <b>device</b> </td><td>: include or exclude <device> for transmission </td></tr>
|
<tr><td> <b>device</b> </td><td>: include or exclude <device> for transmission </td></tr>
|
||||||
<tr><td> <b>reading</b> </td><td>: include or exclude <reading> for transmission </td></tr> <tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
|
<tr><td> <b>reading</b> </td><td>: include or exclude <reading> for transmission </td></tr>
|
||||||
<tr><td> <b>time.*</b> </td><td>: A number of attributes to limit selection by time </td></tr>
|
<tr><td> <b>time.*</b> </td><td>: a number of attributes to limit selection by time </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: an additional REGEXP to control the record selection. The REGEXP is applied to the database field 'VALUE'. </td></tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
</li> <br>
|
</li> <br>
|
||||||
|
|
||||||
<li><b> tableCurrentFillup </b> - the current-table will be filled u with an extract of the history-table.
|
<li><b> tableCurrentFillup </b> - the current-table will be filled u with an extract of the history-table.
|
||||||
@ -11445,6 +11629,15 @@ sub bdump {
|
|||||||
<a href="https://fhem.de/commandref.html#FileLog">Filelog</a>. <br>
|
<a href="https://fhem.de/commandref.html#FileLog">Filelog</a>. <br>
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
|
<a name="fastStart"></a>
|
||||||
|
<li><b>fastStart </b> - Usually every DbRep device is making a short connect to its database when FHEM is started to
|
||||||
|
retrieve some important informations and the reading "state" switches to "connected" on success.
|
||||||
|
If this attrbute is set, the initial database connection is executed not till then the
|
||||||
|
DbRep device is processing its first command. <br>
|
||||||
|
While the reading "state" is remaining in state "initialized" after FHEM-start.
|
||||||
|
This approach my be helpful if a lot of DbRep devices are defined.
|
||||||
|
</li> <br>
|
||||||
|
|
||||||
<a name="fetchMarkDuplicates"></a>
|
<a name="fetchMarkDuplicates"></a>
|
||||||
<li><b>fetchMarkDuplicates </b>
|
<li><b>fetchMarkDuplicates </b>
|
||||||
- Highlighting of multiple occuring datasets in result of "fetchrows" command </li> <br>
|
- Highlighting of multiple occuring datasets in result of "fetchrows" command </li> <br>
|
||||||
@ -11851,10 +12044,11 @@ sub bdump {
|
|||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
<a name="valueFilter"></a>
|
<a name="valueFilter"></a>
|
||||||
<li><b>valueFilter </b> - Regular expression to filter datasets within particular functions. The regex is
|
<li><b>valueFilter </b> - Regular expression (REGEXP) to filter datasets within particular functions. The REGEXP is
|
||||||
applied to a particular field or to the whole selected dataset (inclusive Device, Reading and
|
applied to a particular field or to the whole selected dataset (inclusive Device, Reading and
|
||||||
so on).
|
so on).
|
||||||
Please consider the explanations within the set-commands. </li> <br>
|
Please consider the explanations within the set-commands. Further information is available
|
||||||
|
with command "get <name> versionNotes 4". </li> <br>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</ul></ul>
|
</ul></ul>
|
||||||
@ -12069,7 +12263,7 @@ sub bdump {
|
|||||||
IO::Uncompress::Gunzip <br>
|
IO::Uncompress::Gunzip <br>
|
||||||
Blocking (FHEM-Modul) <br><br>
|
Blocking (FHEM-Modul) <br><br>
|
||||||
|
|
||||||
Aus Performancegründen sollten zusätzlich folgender Index erstellt werden: <br>
|
Aus Performancegründen sollte zusätzlich folgender Index erstellt werden: <br>
|
||||||
<code>
|
<code>
|
||||||
CREATE INDEX Report_Idx ON `history` (TIMESTAMP, READING) USING BTREE;
|
CREATE INDEX Report_Idx ON `history` (TIMESTAMP, READING) USING BTREE;
|
||||||
</code>
|
</code>
|
||||||
@ -12121,8 +12315,27 @@ sub bdump {
|
|||||||
<b>Beispiel neuer Readingname gebildet aus dem Originalreading "totalpac":</b> <br>
|
<b>Beispiel neuer Readingname gebildet aus dem Originalreading "totalpac":</b> <br>
|
||||||
avgam_day_totalpac <br>
|
avgam_day_totalpac <br>
|
||||||
# <Bildungsfunktion>_<Aggregation>_<Originalreading> <br>
|
# <Bildungsfunktion>_<Aggregation>_<Originalreading> <br>
|
||||||
</li> <br>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Zusammengefasst sind die zur Steuerung dieser Funktion relevanten Attribute: <br><br>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<table>
|
||||||
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
|
<tr><td> <b>aggregation</b> </td><td>: Auswahl einer Aggregationsperiode </td></tr>
|
||||||
|
<tr><td> <b>averageCalcForm</b> </td><td>: Auswahl der Berechnungsvariante für den Durchschnitt</td></tr>
|
||||||
|
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
||||||
|
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr>
|
||||||
|
<tr><td> <b>readingNameMap</b> </td><td>: die entstehenden Ergebnisreadings werden partiell umbenannt </td></tr>
|
||||||
|
<tr><td> <b>time.*</b> </td><td>: eine Reihe von Attributen zur Zeitabgrenzung </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: ein zusätzliches REGEXP um die Datenselektion zu steuern. Der REGEXP wird auf das Datenbankfeld 'VALUE' angewendet. </td></tr>
|
||||||
|
</table>
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
</li> <br>
|
||||||
|
|
||||||
<li><b> cancelDump </b> - bricht einen laufenden Datenbankdump ab. </li> <br>
|
<li><b> cancelDump </b> - bricht einen laufenden Datenbankdump ab. </li> <br>
|
||||||
|
|
||||||
@ -12172,10 +12385,12 @@ sub bdump {
|
|||||||
<table>
|
<table>
|
||||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
||||||
|
<tr><td> <b>aggregation</b> </td><td>: Auswahl einer Aggregationsperiode </td></tr>
|
||||||
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr>
|
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr>
|
||||||
<tr><td> <b>time.*</b> </td><td>: eine Reihe von Attributen zur Zeitabgrenzung </td></tr>
|
<tr><td> <b>time.*</b> </td><td>: eine Reihe von Attributen zur Zeitabgrenzung </td></tr>
|
||||||
<tr><td> <b>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) vor Start changeValue </td></tr>
|
<tr><td> <b>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) vor Start changeValue </td></tr>
|
||||||
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) nach Ende changeValue </td></tr>
|
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) nach Ende changeValue </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: ein zusätzliches REGEXP um die Datenselektion zu steuern. Der REGEXP wird auf das Datenbankfeld 'VALUE' angewendet. </td></tr>
|
||||||
</table>
|
</table>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
@ -12203,9 +12418,12 @@ sub bdump {
|
|||||||
<table>
|
<table>
|
||||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
<tr><td> <b>aggregation</b> </td><td>: Zusammenfassung/Gruppierung von Zeitintervallen </td></tr>
|
<tr><td> <b>aggregation</b> </td><td>: Zusammenfassung/Gruppierung von Zeitintervallen </td></tr>
|
||||||
<tr><td> <b>countEntriesDetail</b></td><td>: detaillierte Ausgabe der Datensatzanzahl </td></tr>
|
<tr><td> <b>countEntriesDetail</b> </td><td>: detaillierte Ausgabe der Datensatzanzahl </td></tr>
|
||||||
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
||||||
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr> <tr><td> <b>time.*</b> </td><td>: eine Reihe von Attributen zur Zeitabgrenzung </td></tr>
|
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr>
|
||||||
|
<tr><td> <b>time.*</b> </td><td>: eine Reihe von Attributen zur Zeitabgrenzung </td></tr>
|
||||||
|
<tr><td> <b>readingNameMap</b> </td><td>: die entstehenden Ergebnisreadings werden partiell umbenannt </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: ein zusätzliches REGEXP um die Datenselektion zu steuern. Der REGEXP wird auf das Datenbankfeld 'VALUE' angewendet. </td></tr>
|
||||||
</table>
|
</table>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
@ -12222,8 +12440,9 @@ sub bdump {
|
|||||||
beide Timestamps gesetzt <b>-></b> gelöscht werden DB-Einträge <b>zwischen</b> diesen Zeitpunkten <br>
|
beide Timestamps gesetzt <b>-></b> gelöscht werden DB-Einträge <b>zwischen</b> diesen Zeitpunkten <br>
|
||||||
"timeOlderThan" gesetzt <b>-></b> gelöscht werden DB-Einträge <b>älter</b> als aktuelle Zeit minus "timeOlderThan" <br>
|
"timeOlderThan" gesetzt <b>-></b> gelöscht werden DB-Einträge <b>älter</b> als aktuelle Zeit minus "timeOlderThan" <br>
|
||||||
"timeDiffToNow" gesetzt <b>-></b> gelöscht werden DB-Einträge <b>ab</b> aktueller Zeit minus "timeDiffToNow" bis jetzt <br>
|
"timeDiffToNow" gesetzt <b>-></b> gelöscht werden DB-Einträge <b>ab</b> aktueller Zeit minus "timeDiffToNow" bis jetzt <br>
|
||||||
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
Aus Sicherheitsgründen muss das <a href="#DbRepattr">Attribut</a> "allowDeletion"
|
Aus Sicherheitsgründen muss das <a href="#DbRepattr">Attribut</a> "allowDeletion"
|
||||||
gesetzt sein um die Löschfunktion freizuschalten. <br><br>
|
gesetzt sein um die Löschfunktion freizuschalten. <br><br>
|
||||||
|
|
||||||
@ -12234,17 +12453,18 @@ sub bdump {
|
|||||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
<tr><td> <b>allowDeletion</b> </td><td>: Freischaltung der Löschfunktion </td></tr>
|
<tr><td> <b>allowDeletion</b> </td><td>: Freischaltung der Löschfunktion </td></tr>
|
||||||
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
||||||
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr> <tr><td> <b>time.*</b> </td><td>: eine Reihe von Attributen zur Zeitabgrenzung </td></tr>
|
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr>
|
||||||
|
<tr><td> <b>readingNameMap</b> </td><td>: die entstehenden Ergebnisreadings werden partiell umbenannt </td></tr>
|
||||||
|
<tr><td> <b>time.*</b> </td><td>: eine Reihe von Attributen zur Zeitabgrenzung </td></tr>
|
||||||
<tr><td> <b>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) vor Start delEntries </td></tr>
|
<tr><td> <b>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) vor Start delEntries </td></tr>
|
||||||
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) nach Ende delEntries </td></tr>
|
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) nach Ende delEntries </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: ein zusätzliches REGEXP um die Datenselektion zu steuern. Der REGEXP wird auf das Datenbankfeld 'VALUE' angewendet. </td></tr>
|
||||||
</table>
|
</table>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
</ul>
|
|
||||||
|
|
||||||
<li><b> delSeqDoublets [adviceRemain | adviceDelete | delete]</b> - zeigt bzw. löscht aufeinander folgende identische Datensätze.
|
<li><b> delSeqDoublets [adviceRemain | adviceDelete | delete]</b> - zeigt bzw. löscht aufeinander folgende identische Datensätze.
|
||||||
Dazu wird Device,Reading und Value ausgewertet. Nicht gelöscht werden der erste und der letzte Datensatz
|
Dazu wird Device,Reading und Value ausgewertet. Nicht gelöscht werden der erste und der letzte Datensatz
|
||||||
@ -12311,10 +12531,28 @@ sub bdump {
|
|||||||
<b>2017-11-25_23-58-09__eg.az.fridge_Pwr__power 51.73 </b> <br>
|
<b>2017-11-25_23-58-09__eg.az.fridge_Pwr__power 51.73 </b> <br>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Zusammengefasst sind die zur Steuerung dieser Funktion relevanten Attribute: <br><br>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<table>
|
||||||
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
|
<tr><td> <b>allowDeletion</b> </td><td>: needs to be set to execute the delete option </td></tr>
|
||||||
|
<tr><td> <b>aggregation</b> </td><td>: Auswahl einer Aggregationsperiode </td></tr>
|
||||||
|
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
||||||
|
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr>
|
||||||
|
<tr><td> <b>readingNameMap</b> </td><td>: die entstehenden Ergebnisreadings werden partiell umbenannt </td></tr>
|
||||||
|
<tr><td> <b>seqDoubletsVariance</b> </td><td>: bis zu diesem Wert werden aufeinander folgende numerische Datensätze als identisch angesehen und werden gelöscht </td></tr>
|
||||||
|
<tr><td> <b>time.*</b> </td><td>: eine Reihe von Attributen zur Zeitabgrenzung </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: ein zusätzliches REGEXP um die Datenselektion zu steuern. Der REGEXP wird auf das Datenbankfeld 'VALUE' angewendet. </td></tr>
|
||||||
|
</table>
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<li><b> deviceRename <old_name>,<new_name></b> -
|
<li><b> deviceRename <old_name>,<new_name></b> -
|
||||||
benennt den Namen eines Device innerhalb der angeschlossenen Datenbank (Internal DATABASE) um.
|
benennt den Namen eines Device innerhalb der angeschlossenen Datenbank (Internal DATABASE) um.
|
||||||
@ -12371,8 +12609,26 @@ sub bdump {
|
|||||||
<b>Beispiel neuer Readingname gebildet aus dem Originalreading "totalpac":</b> <br>
|
<b>Beispiel neuer Readingname gebildet aus dem Originalreading "totalpac":</b> <br>
|
||||||
diff_day_totalpac <br>
|
diff_day_totalpac <br>
|
||||||
# <Bildungsfunktion>_<Aggregation>_<Originalreading> <br>
|
# <Bildungsfunktion>_<Aggregation>_<Originalreading> <br>
|
||||||
</li> <br>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Zusammengefasst sind die zur Steuerung dieser Funktion relevanten Attribute: <br><br>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<table>
|
||||||
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
|
<tr><td> <b>aggregation</b> </td><td>: Auswahl einer Aggregationsperiode </td></tr>
|
||||||
|
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
||||||
|
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr>
|
||||||
|
<tr><td> <b>readingNameMap</b> </td><td>: die entstehenden Ergebnisreadings werden partiell umbenannt </td></tr>
|
||||||
|
<tr><td> <b>seqDoubletsVariance</b> </td><td>: bis zu diesem Wert werden aufeinander folgende numerische Datensätze als identisch angesehen und werden gelöscht </td></tr>
|
||||||
|
<tr><td> <b>time.*</b> </td><td>: eine Reihe von Attributen zur Zeitabgrenzung </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: ein zusätzliches REGEXP um die Datenselektion zu steuern. Der REGEXP wird auf das Datenbankfeld 'VALUE' angewendet. </td></tr>
|
||||||
|
</table>
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
</li> <br>
|
||||||
|
|
||||||
<li><b> dumpMySQL [clientSide | serverSide]</b>
|
<li><b> dumpMySQL [clientSide | serverSide]</b>
|
||||||
- erstellt einen Dump der angeschlossenen MySQL-Datenbank. <br>
|
- erstellt einen Dump der angeschlossenen MySQL-Datenbank. <br>
|
||||||
@ -12601,15 +12857,18 @@ sub bdump {
|
|||||||
exportiert werden sollen und vermeidet den "died prematurely" Abbruchfehler. <br><br>
|
exportiert werden sollen und vermeidet den "died prematurely" Abbruchfehler. <br><br>
|
||||||
|
|
||||||
Die für diese Funktion relevanten Attribute sind: <br><br>
|
Die für diese Funktion relevanten Attribute sind: <br><br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<table>
|
<table>
|
||||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
<tr><td> <b>aggregation</b> </td><td>: Festlegung der Selektionspaketierung </td></tr>
|
<tr><td> <b>aggregation</b> </td><td>: Festlegung der Selektionspaketierung </td></tr>
|
||||||
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
||||||
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr> <tr><td> <b>executeBeforeProc</b> </td><td>: FHEM Kommando (oder perl-Routine) vor dem Export ausführen </td></tr>
|
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr>
|
||||||
|
<tr><td> <b>executeBeforeProc</b> </td><td>: FHEM Kommando (oder perl-Routine) vor dem Export ausführen </td></tr>
|
||||||
<tr><td> <b>executeAfterProc</b> </td><td>: FHEM Kommando (oder perl-Routine) nach dem Export ausführen </td></tr>
|
<tr><td> <b>executeAfterProc</b> </td><td>: FHEM Kommando (oder perl-Routine) nach dem Export ausführen </td></tr>
|
||||||
<tr><td> <b>expimpfile</b> </td><td>: der Name des Exportfiles </td></tr>
|
<tr><td> <b>expimpfile</b> </td><td>: der Name des Exportfiles </td></tr>
|
||||||
<tr><td> <b>time.*</b> </td><td>: eine Reihe von Attributen zur Zeitabgrenzung </td></tr>
|
<tr><td> <b>time.*</b> </td><td>: eine Reihe von Attributen zur Zeitabgrenzung </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: ein zusätzliches REGEXP um die Datenselektion zu steuern. Der REGEXP wird auf das Datenbankfeld 'VALUE' angewendet. </td></tr>
|
||||||
</table>
|
</table>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -12663,8 +12922,9 @@ sub bdump {
|
|||||||
<tr><td> <b>limit</b> </td><td>: begrenzt die Anzahl zu selektierenden bzw. anzuzeigenden Datensätze </td></tr>
|
<tr><td> <b>limit</b> </td><td>: begrenzt die Anzahl zu selektierenden bzw. anzuzeigenden Datensätze </td></tr>
|
||||||
<tr><td> <b>fetchMarkDuplicates</b> </td><td>: Hervorhebung von gefundenen Dubletten </td></tr>
|
<tr><td> <b>fetchMarkDuplicates</b> </td><td>: Hervorhebung von gefundenen Dubletten </td></tr>
|
||||||
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
||||||
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr> <tr><td> <b>time.*</b> </td><td>: eine Reihe von Attributen zur Zeitabgrenzung </td></tr>
|
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr>
|
||||||
<tr><td> <b>valueFilter</b> </td><td>: filtert die anzuzeigenden Datensätze mit einem regulären Ausdruck. Der Regex wird auf den gesamten anzuzeigenden Datensatz angewendet. </td></tr>
|
<tr><td> <b>time.*</b> </td><td>: eine Reihe von Attributen zur Zeitabgrenzung </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: filtert die anzuzeigenden Datensätze mit einem regulären Ausdruck. Der Regex wird auf Werte des DAtenbankfelder 'VALUE' angewendet. </td></tr>
|
||||||
</table>
|
</table>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
@ -12756,8 +13016,27 @@ sub bdump {
|
|||||||
<b>Beispiel neuer Readingname gebildet aus dem Originalreading "totalpac":</b> <br>
|
<b>Beispiel neuer Readingname gebildet aus dem Originalreading "totalpac":</b> <br>
|
||||||
max_day_totalpac <br>
|
max_day_totalpac <br>
|
||||||
# <Bildungsfunktion>_<Aggregation>_<Originalreading> <br>
|
# <Bildungsfunktion>_<Aggregation>_<Originalreading> <br>
|
||||||
</li> <br>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Zusammengefasst sind die zur Steuerung dieser Funktion relevanten Attribute: <br><br>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<table>
|
||||||
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
|
<tr><td> <b>aggregation</b> </td><td>: Auswahl einer Aggregationsperiode </td></tr>
|
||||||
|
<tr><td> <b>limit</b> </td><td>: die Anzahl der ANZUZEIGENDEN Datensätz wird beschränkt </td></tr>
|
||||||
|
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
||||||
|
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr>
|
||||||
|
<tr><td> <b>readingNameMap</b> </td><td>: die entstehenden Ergebnisreadings werden partiell umbenannt </td></tr>
|
||||||
|
<tr><td> <b>time.*</b> </td><td>: eine Reihe von Attributen zur Zeitabgrenzung </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: ein zusätzliches REGEXP um die Datenselektion zu steuern. Der REGEXP wird auf das Datenbankfeld 'VALUE' angewendet. </td></tr>
|
||||||
|
</table>
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
</li> <br>
|
||||||
|
|
||||||
|
|
||||||
<li><b> minValue [display | writeToDB]</b>
|
<li><b> minValue [display | writeToDB]</b>
|
||||||
- berechnet den Minimalwert des Datenbankfelds "VALUE" in den Zeitgrenzen
|
- berechnet den Minimalwert des Datenbankfelds "VALUE" in den Zeitgrenzen
|
||||||
@ -12783,8 +13062,26 @@ sub bdump {
|
|||||||
<b>Beispiel neuer Readingname gebildet aus dem Originalreading "totalpac":</b> <br>
|
<b>Beispiel neuer Readingname gebildet aus dem Originalreading "totalpac":</b> <br>
|
||||||
min_day_totalpac <br>
|
min_day_totalpac <br>
|
||||||
# <Bildungsfunktion>_<Aggregation>_<Originalreading> <br>
|
# <Bildungsfunktion>_<Aggregation>_<Originalreading> <br>
|
||||||
</li> <br>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
Zusammengefasst sind die zur Steuerung dieser Funktion relevanten Attribute: <br><br>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<table>
|
||||||
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
|
<tr><td> <b>aggregation</b> </td><td>: Auswahl einer Aggregationsperiode </td></tr>
|
||||||
|
<tr><td> <b>limit</b> </td><td>: die Anzahl der ANZUZEIGENDEN Datensätz wird beschränkt </td></tr>
|
||||||
|
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
||||||
|
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr>
|
||||||
|
<tr><td> <b>readingNameMap</b> </td><td>: die entstehenden Ergebnisreadings werden partiell umbenannt </td></tr>
|
||||||
|
<tr><td> <b>time.*</b> </td><td>: eine Reihe von Attributen zur Zeitabgrenzung </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: ein zusätzliches REGEXP um die Datenselektion zu steuern. Der REGEXP wird auf das Datenbankfeld 'VALUE' angewendet. </td></tr>
|
||||||
|
</table>
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
</li> <br>
|
||||||
|
|
||||||
<li><b> optimizeTables </b> - optimiert die Tabellen in der angeschlossenen Datenbank (MySQL). <br>
|
<li><b> optimizeTables </b> - optimiert die Tabellen in der angeschlossenen Datenbank (MySQL). <br>
|
||||||
Vor und nach der Optimierung kann ein FHEM-Kommando ausgeführt werden.
|
Vor und nach der Optimierung kann ein FHEM-Kommando ausgeführt werden.
|
||||||
@ -12844,11 +13141,12 @@ sub bdump {
|
|||||||
<tr><td> <b>executeBeforeProc</b> </td><td>: FHEM Kommando (oder perl-Routine) vor dem Export ausführen </td></tr>
|
<tr><td> <b>executeBeforeProc</b> </td><td>: FHEM Kommando (oder perl-Routine) vor dem Export ausführen </td></tr>
|
||||||
<tr><td> <b>executeAfterProc</b> </td><td>: FHEM Kommando (oder perl-Routine) nach dem Export ausführen </td></tr>
|
<tr><td> <b>executeAfterProc</b> </td><td>: FHEM Kommando (oder perl-Routine) nach dem Export ausführen </td></tr>
|
||||||
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
||||||
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr> <tr><td> <b>time.*</b> </td><td>: Attribute zur Zeitabgrenzung der zu übertragenden Datensätze. </td></tr>
|
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr>
|
||||||
<tr><td> <b>timeOlderThan</b> </td><td>: es werden Datenbankeinträge <b>älter</b> als dieses Attribut reduziert </td></tr>
|
<tr><td> <b>timeOlderThan</b> </td><td>: es werden Datenbankeinträge <b>älter</b> als dieses Attribut reduziert </td></tr>
|
||||||
<tr><td> <b>timestamp_end</b> </td><td>: es werden Datenbankeinträge <b>älter</b> als dieses Attribut reduziert </td></tr>
|
<tr><td> <b>timestamp_end</b> </td><td>: es werden Datenbankeinträge <b>älter</b> als dieses Attribut reduziert </td></tr>
|
||||||
<tr><td> <b>timeDiffToNow</b> </td><td>: es werden Datenbankeinträge <b>neuer</b> als dieses Attribut reduziert </td></tr>
|
<tr><td> <b>timeDiffToNow</b> </td><td>: es werden Datenbankeinträge <b>neuer</b> als dieses Attribut reduziert </td></tr>
|
||||||
<tr><td> <b>timestamp_begin</b> </td><td>: es werden Datenbankeinträge <b>neuer</b> als dieses Attribut reduziert </td></tr>
|
<tr><td> <b>timestamp_begin</b> </td><td>: es werden Datenbankeinträge <b>neuer</b> als dieses Attribut reduziert </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: ein zusätzliches REGEXP um die Datenselektion zu steuern. Der REGEXP wird auf das Datenbankfeld 'VALUE' angewendet. </td></tr>
|
||||||
</table>
|
</table>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
@ -13082,10 +13380,27 @@ sub bdump {
|
|||||||
<b>Beispiel neuer Readingname gebildet aus dem Originalreading "totalpac":</b> <br>
|
<b>Beispiel neuer Readingname gebildet aus dem Originalreading "totalpac":</b> <br>
|
||||||
sum_day_totalpac <br>
|
sum_day_totalpac <br>
|
||||||
# <Bildungsfunktion>_<Aggregation>_<Originalreading> <br>
|
# <Bildungsfunktion>_<Aggregation>_<Originalreading> <br>
|
||||||
</li> <br>
|
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
Zusammengefasst sind die zur Steuerung dieser Funktion relevanten Attribute: <br><br>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<table>
|
||||||
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
|
<tr><td> <b>aggregation</b> </td><td>: Auswahl einer Aggregationsperiode </td></tr>
|
||||||
|
<tr><td> <b>limit</b> </td><td>: die Anzahl der ANZUZEIGENDEN Datensätz wird beschränkt </td></tr>
|
||||||
|
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
||||||
|
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr>
|
||||||
|
<tr><td> <b>readingNameMap</b> </td><td>: die entstehenden Ergebnisreadings werden partiell umbenannt </td></tr>
|
||||||
|
<tr><td> <b>time.*</b> </td><td>: eine Reihe von Attributen zur Zeitabgrenzung </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: ein zusätzliches REGEXP um die Datenselektion zu steuern. Der REGEXP wird auf das Datenbankfeld 'VALUE' angewendet. </td></tr>
|
||||||
|
</table>
|
||||||
|
</ul>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
</li> <br>
|
||||||
|
|
||||||
<li><b> syncStandby <DbLog-Device Standby> </b>
|
<li><b> syncStandby <DbLog-Device Standby> </b>
|
||||||
- Es werden die Datensätze aus der angeschlossenen Datenbank (Quelle) direkt in eine weitere
|
- Es werden die Datensätze aus der angeschlossenen Datenbank (Quelle) direkt in eine weitere
|
||||||
Datenbank (Standby-Datenbank) übertragen.
|
Datenbank (Standby-Datenbank) übertragen.
|
||||||
@ -13106,11 +13421,13 @@ sub bdump {
|
|||||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||||
<tr><td> <b>aggregation</b> </td><td>: Einstellung der Zeitscheiben zur Übertragung (hour,day,week) </td></tr>
|
<tr><td> <b>aggregation</b> </td><td>: Einstellung der Zeitscheiben zur Übertragung (hour,day,week) </td></tr>
|
||||||
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
<tr><td> <b>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
||||||
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr> <tr><td> <b>time.*</b> </td><td>: Attribute zur Zeitabgrenzung der zu übertragenden Datensätze. </td></tr>
|
<tr><td> <b>reading</b> </td><td>: einschließen oder ausschließen von Datensätzen die <reading> enthalten </td></tr>
|
||||||
|
<tr><td> <b>time.*</b> </td><td>: Attribute zur Zeitabgrenzung der zu übertragenden Datensätze. </td></tr>
|
||||||
|
<tr><td style="vertical-align:top"> <b>valueFilter</b> <td>: ein zusätzliches REGEXP um die Datenselektion zu steuern. Der REGEXP wird auf das Datenbankfeld 'VALUE' angewendet. </td></tr>
|
||||||
</table>
|
</table>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
|
||||||
</li> <br>
|
</li> <br>
|
||||||
|
|
||||||
<li><b> tableCurrentFillup </b> - Die current-Tabelle wird mit einem Extrakt der history-Tabelle aufgefüllt.
|
<li><b> tableCurrentFillup </b> - Die current-Tabelle wird mit einem Extrakt der history-Tabelle aufgefüllt.
|
||||||
@ -13531,6 +13848,15 @@ sub bdump {
|
|||||||
Zur POSIX Wildcardverwendung siehe auch die Erläuterungen zu <a href="#FileLog">Filelog</a>.
|
Zur POSIX Wildcardverwendung siehe auch die Erläuterungen zu <a href="#FileLog">Filelog</a>.
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
|
<a name="fastStart"></a>
|
||||||
|
<li><b>fastStart </b> - Normalerweise verbindet sich jedes DbRep-Device beim FHEM-Start kurz mit seiner Datenbank um
|
||||||
|
benötigte Informationen abzurufen und das Reading "state" springt bei Erfolg auf "connected".
|
||||||
|
Ist dieses Attribut gesetzt, erfolgt die initiale Datenbankverbindung erst dann wenn das
|
||||||
|
DbRep-Device sein erstes Kommando ausführt. <br>
|
||||||
|
Das Reading "state" verbleibt nach FHEM-Start solange im Status "initialized". Diese Einstellung
|
||||||
|
kann hilfreich sein wenn viele DbRep-Devices definiert sind.
|
||||||
|
</li> <br>
|
||||||
|
|
||||||
<a name="fetchMarkDuplicates"></a>
|
<a name="fetchMarkDuplicates"></a>
|
||||||
<li><b>fetchMarkDuplicates </b>
|
<li><b>fetchMarkDuplicates </b>
|
||||||
- Markierung von mehrfach vorkommenden Datensätzen im Ergebnis des "fetchrows" Kommandos </li> <br>
|
- Markierung von mehrfach vorkommenden Datensätzen im Ergebnis des "fetchrows" Kommandos </li> <br>
|
||||||
@ -13947,10 +14273,11 @@ sub bdump {
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<a name="valueFilter"></a>
|
<a name="valueFilter"></a>
|
||||||
<li><b>valueFilter </b> - Regulärer Ausdruck zur Filterung von Datensätzen innerhalb bestimmter Funktionen. Der
|
<li><b>valueFilter </b> - Regulärer Ausdruck (REGEXP) zur Filterung von Datensätzen innerhalb bestimmter Funktionen.
|
||||||
Regex wird auf ein bestimmtes Feld oder den gesamten selektierten Datensatz (inkl. Device,
|
Der REGEXP wird auf ein bestimmtes Feld oder den gesamten selektierten Datensatz (inkl. Device,
|
||||||
Reading usw.) angewendet.
|
Reading usw.) angewendet.
|
||||||
Bitte beachten sie die Erläuterungen zu den entsprechenden Set-Kommandos. </li> <br>
|
Bitte beachten sie die Erläuterungen zu den entsprechenden Set-Kommandos. Weitere Informationen
|
||||||
|
sind mit "get <name> versionNotes 4" verfügbar. </li> <br>
|
||||||
|
|
||||||
|
|
||||||
</ul></ul>
|
</ul></ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user