mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-19 00:26:03 +00:00
93_DbRep: contrib 8.22.0
git-svn-id: https://svn.fhem.de/fhem/trunk@20047 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
82fc733c6b
commit
a09ca54e88
@ -1,5 +1,5 @@
|
||||
##########################################################################################################
|
||||
# $Id: 93_DbRep.pm 19155 2019-04-10 22:19:42Z DS_Starter $
|
||||
# $Id: 93_DbRep.pm 19507 2019-05-31 09:03:18Z DS_Starter $
|
||||
##########################################################################################################
|
||||
# 93_DbRep.pm
|
||||
#
|
||||
@ -58,6 +58,9 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch';
|
||||
|
||||
# Version History intern
|
||||
our %DbRep_vNotesIntern = (
|
||||
"8.22.0" => "23.08.2019 new attr fetchValueFn. When fetching the database content, manipulate the VALUE-field before create reading ",
|
||||
"8.21.2" => "14.08.2019 commandRef revised ",
|
||||
"8.21.1" => "31.05.2019 syncStandby considers executeBeforeProc, commandRef revised ",
|
||||
"8.21.0" => "28.04.2019 implement FHEM command \"dbReadingsVal\" ",
|
||||
"8.20.1" => "28.04.2019 set index verbose changed, check index \"Report_Idx\" in getInitData ",
|
||||
"8.20.0" => "27.04.2019 don't save hash refs in central hash to prevent potential memory leak, new set \"index\" ".
|
||||
@ -152,6 +155,9 @@ our %DbRep_vNotesIntern = (
|
||||
|
||||
# Version History extern:
|
||||
our %DbRep_vNotesExtern = (
|
||||
"8.22.0" => "23.08.2019 A new attribute \"fetchValueFn\" is provided. When fetching the database content, you are able to manipulate ".
|
||||
"the value displayed from the VALUE database field before create the appropriate reading. ",
|
||||
"8.21.0" => "28.04.2019 FHEM command \"dbReadingsVal\" implemented.",
|
||||
"8.20.0" => "27.04.2019 With the new set \"index\" command it is now possible to list and (re)create the indexes which are ".
|
||||
"needed for DbLog and/or DbRep operation.",
|
||||
"8.19.0" => "04.04.2019 The \"explain\" SQL-command is possible in sqlCmd ",
|
||||
@ -338,6 +344,7 @@ sub DbRep_Initialize($) {
|
||||
"fastStart:1,0 ".
|
||||
"fetchRoute:ascent,descent ".
|
||||
"fetchMarkDuplicates:red,blue,brown,green,orange ".
|
||||
"fetchValueFn:textField-long ".
|
||||
"ftpDebug:1,0 ".
|
||||
"ftpDir ".
|
||||
"ftpDumpFilesKeep:1,2,3,4,5,6,7,8,9,10 ".
|
||||
@ -884,7 +891,8 @@ sub DbRep_Set($@) {
|
||||
if(!exists($defs{$prop}) || $defs{$prop}->{TYPE} ne "DbLog") {
|
||||
return "The device \"$prop\" doesn't exist or is not a DbLog-device. ";
|
||||
}
|
||||
$hash->{LASTCMD} = $prop?"$opt $prop":"$opt";
|
||||
$hash->{LASTCMD} = $prop?"$opt $prop":"$opt";
|
||||
DbRep_beforeproc($hash, "syncStandby");
|
||||
DbRep_Main($hash,$opt,$prop);
|
||||
|
||||
} else {
|
||||
@ -1140,6 +1148,21 @@ sub DbRep_Attr($$$$) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($aName eq "fetchValueFn") {
|
||||
if($cmd eq "set") {
|
||||
my $VALUE = "Hello";
|
||||
# Funktion aus Attr validieren
|
||||
if( $aVal =~ m/^\s*(\{.*\})\s*$/s ) {
|
||||
$aVal = $1;
|
||||
} else {
|
||||
$aVal = "";
|
||||
}
|
||||
return "Your function does not match the form \"{<function>}\"" if(!$aVal);
|
||||
eval $aVal;
|
||||
return "Bad function: $@" if($@);
|
||||
}
|
||||
}
|
||||
|
||||
if ($aName eq "sqlCmdHistoryLength") {
|
||||
if($cmd eq "set") {
|
||||
$do = ($aVal) ? 1 : 0;
|
||||
@ -4871,6 +4894,7 @@ sub fetchrows_ParseDone($) {
|
||||
my $name = $hash->{NAME};
|
||||
my $reading = AttrVal($name, "reading", undef);
|
||||
my $limit = AttrVal($name, "limit", 1000);
|
||||
my $fvfn = AttrVal($name, "fetchValueFn", undef);
|
||||
my $color = "<html><span style=\"color: #".AttrVal($name, "fetchMarkDuplicates", "000000").";\">"; # Highlighting doppelter DB-Einträge
|
||||
$color =~ s/#// if($color =~ /red|blue|brown|green|orange/);
|
||||
my $ecolor = "</span></html>"; # Ende Highlighting
|
||||
@ -4942,6 +4966,19 @@ sub fetchrows_ParseDone($) {
|
||||
$reading_runtime_string = $ts."__".$dz."__".$dev."__".$rea.$zs;
|
||||
}
|
||||
}
|
||||
|
||||
if($fvfn) {
|
||||
my $VALUE = $val;
|
||||
if( $fvfn =~ m/^\s*(\{.*\})\s*$/s ) {
|
||||
$fvfn = $1;
|
||||
} else {
|
||||
$fvfn = "";
|
||||
}
|
||||
if ($fvfn) {
|
||||
eval $fvfn;
|
||||
$val = $VALUE if(!$@);
|
||||
}
|
||||
}
|
||||
|
||||
ReadingsBulkUpdateValue($hash, $reading_runtime_string, $val);
|
||||
}
|
||||
@ -8215,6 +8252,10 @@ sub DbRep_syncStandbyDone($) {
|
||||
my $bt = $a[2];
|
||||
my ($rt,$brt) = split(",", $bt);
|
||||
my $err = $a[3]?decode_base64($a[3]):undef;
|
||||
my $erread;
|
||||
|
||||
# Befehl nach Procedure ausführen
|
||||
$erread = DbRep_afterproc($hash, "syncStandby");
|
||||
|
||||
if ($err) {
|
||||
ReadingsSingleUpdateValue ($hash, "errortext", $err, 1);
|
||||
@ -8224,16 +8265,14 @@ sub DbRep_syncStandbyDone($) {
|
||||
return;
|
||||
}
|
||||
|
||||
# only for this block because of warnings if details of readings are not set
|
||||
no warnings 'uninitialized';
|
||||
|
||||
my $state = $erread?$erread:"done";
|
||||
|
||||
readingsBeginUpdate($hash);
|
||||
ReadingsBulkUpdateValue ($hash, "number_lines_inserted_Standby", $irows);
|
||||
ReadingsBulkUpdateTimeState($hash,$brt,$rt,"done");
|
||||
ReadingsBulkUpdateTimeState($hash,$brt,$rt,$state);
|
||||
readingsEndUpdate($hash, 1);
|
||||
|
||||
# Befehl nach Procedure ausführen
|
||||
my $erread = DbRep_afterproc($hash, "syncStandby");
|
||||
|
||||
delete($hash->{HELPER}{RUNNING_PID});
|
||||
|
||||
@ -9538,13 +9577,11 @@ sub DbRep_delread($;$$) {
|
||||
# Highlighted Readings löschen und save statefile wegen Inkompatibilitär beim Restart
|
||||
if($key =~ /<html><span/) {
|
||||
$do = 1;
|
||||
# delete($defs{$name}{READINGS}{$key});
|
||||
readingsDelete($hash,$key);
|
||||
}
|
||||
# Reading löschen wenn Featuelevel > 5.9 und zu lang nach der neuen Festlegung
|
||||
if($do == 0 && $featurelevel > 5.9 && !goodReadingName($key)) {
|
||||
$do = 1;
|
||||
# delete($defs{$name}{READINGS}{$key});
|
||||
readingsDelete($hash,$key);
|
||||
}
|
||||
}
|
||||
@ -10518,12 +10555,12 @@ sub DbRep_setVersionInfo($) {
|
||||
if($modules{$type}{META}{x_prereqs_src} && !$hash->{HELPER}{MODMETAABSENT}) {
|
||||
# META-Daten sind vorhanden
|
||||
$modules{$type}{META}{version} = "v".$v; # Version aus META.json überschreiben, Anzeige mit {Dumper $modules{SMAPortal}{META}}
|
||||
if($modules{$type}{META}{x_version}) { # {x_version} ( nur gesetzt wenn $Id: 93_DbRep.pm 19155 2019-04-10 22:19:42Z DS_Starter $ im Kopf komplett! vorhanden )
|
||||
if($modules{$type}{META}{x_version}) { # {x_version} ( nur gesetzt wenn $Id: 93_DbRep.pm 19507 2019-05-31 09:03:18Z DS_Starter $ im Kopf komplett! vorhanden )
|
||||
$modules{$type}{META}{x_version} =~ s/1.1.1/$v/g;
|
||||
} else {
|
||||
$modules{$type}{META}{x_version} = $v;
|
||||
}
|
||||
return $@ unless (FHEM::Meta::SetInternals($hash)); # FVERSION wird gesetzt ( nur gesetzt wenn $Id: 93_DbRep.pm 19155 2019-04-10 22:19:42Z DS_Starter $ im Kopf komplett! vorhanden )
|
||||
return $@ unless (FHEM::Meta::SetInternals($hash)); # FVERSION wird gesetzt ( nur gesetzt wenn $Id: 93_DbRep.pm 19507 2019-05-31 09:03:18Z DS_Starter $ im Kopf komplett! vorhanden )
|
||||
if(__PACKAGE__ eq "FHEM::$type" || __PACKAGE__ eq $type) {
|
||||
# es wird mit Packages gearbeitet -> Perl übliche Modulversion setzen
|
||||
# mit {<Modul>->VERSION()} im FHEMWEB kann Modulversion abgefragt werden
|
||||
@ -10987,8 +11024,8 @@ return;
|
||||
<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>executeBeforeProc</b> </td><td>: execution of FHEM command (or perl-routine) before operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or perl-routine) after operation </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execution of FHEM command (or Perl-routine) before operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or Perl-routine) after operation </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>
|
||||
@ -11051,8 +11088,8 @@ return;
|
||||
<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>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>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 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>
|
||||
@ -11141,8 +11178,8 @@ return;
|
||||
<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 the function </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execute a FHEM command (or perl-routine) after the function is finished </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execute a FHEM command (or Perl-routine) before start of the function </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execute a FHEM command (or Perl-routine) after the function is finished </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>
|
||||
@ -11175,8 +11212,8 @@ return;
|
||||
<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>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>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>
|
||||
</table>
|
||||
</ul>
|
||||
<br>
|
||||
@ -11262,8 +11299,8 @@ return;
|
||||
<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 the function </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execute a FHEM command (or perl-routine) after the function is finished </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execute a FHEM command (or Perl-routine) before start of the function </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execute a FHEM command (or Perl-routine) after the function 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>
|
||||
@ -11342,8 +11379,8 @@ return;
|
||||
<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>executeBeforeProc</b> </td><td>: execution of FHEM command (or perl-routine) before operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or perl-routine) after operation </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execution of FHEM command (or Perl-routine) before operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or Perl-routine) after operation </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>
|
||||
@ -11393,8 +11430,8 @@ return;
|
||||
<tr><td> dumpMemlimit </td><td>: limits memory usage </td></tr>
|
||||
<tr><td> dumpSpeed </td><td>: limits CPU utilization </td></tr>
|
||||
<tr><td> dumpFilesKeep </td><td>: number of dump files to keep </td></tr>
|
||||
<tr><td> executeBeforeProc </td><td>: execution of FHEM command (or perl-routine) before dump </td></tr>
|
||||
<tr><td> executeAfterProc </td><td>: execution of FHEM command (or perl-routine) after dump </td></tr>
|
||||
<tr><td> executeBeforeProc </td><td>: execution of FHEM command (or Perl-routine) before dump </td></tr>
|
||||
<tr><td> executeAfterProc </td><td>: execution of FHEM command (or Perl-routine) after dump </td></tr>
|
||||
<tr><td> optimizeTablesBeforeDump </td><td>: table optimization before dump </td></tr>
|
||||
</table>
|
||||
</ul>
|
||||
@ -11448,8 +11485,8 @@ return;
|
||||
<tr><td> dumpCompress </td><td>: compress of dump files after creation </td></tr>
|
||||
<tr><td> dumpDirLocal </td><td>: the local mounted directory dumpDirRemote </td></tr>
|
||||
<tr><td> dumpFilesKeep </td><td>: number of dump files to keep </td></tr>
|
||||
<tr><td> executeBeforeProc </td><td>: execution of FHEM command (or perl-routine) before dump </td></tr>
|
||||
<tr><td> executeAfterProc </td><td>: execution of FHEM command (or perl-routine) after dump </td></tr>
|
||||
<tr><td> executeBeforeProc </td><td>: execution of FHEM command (or Perl-routine) before dump </td></tr>
|
||||
<tr><td> executeAfterProc </td><td>: execution of FHEM command (or Perl-routine) after dump </td></tr>
|
||||
<tr><td> optimizeTablesBeforeDump </td><td>: table optimization before dump </td></tr>
|
||||
</table>
|
||||
</ul>
|
||||
@ -11547,8 +11584,8 @@ return;
|
||||
<tr><td> dumpCompress </td><td>: compress of dump files after creation </td></tr>
|
||||
<tr><td> dumpDirLocal </td><td>: the local mounted directory dumpDirRemote </td></tr>
|
||||
<tr><td> dumpFilesKeep </td><td>: number of dump files to keep </td></tr>
|
||||
<tr><td> executeBeforeProc </td><td>: execution of FHEM command (or perl-routine) before dump </td></tr>
|
||||
<tr><td> executeAfterProc </td><td>: execution of FHEM command (or perl-routine) after dump </td></tr>
|
||||
<tr><td> executeBeforeProc </td><td>: execution of FHEM command (or Perl-routine) before dump </td></tr>
|
||||
<tr><td> executeAfterProc </td><td>: execution of FHEM command (or Perl-routine) after dump </td></tr>
|
||||
<tr><td> optimizeTablesBeforeDump </td><td>: table optimization before dump </td></tr>
|
||||
</table>
|
||||
</ul>
|
||||
@ -11597,8 +11634,8 @@ return;
|
||||
<tr><td> <b>aggregation</b> </td><td>: determination of selection time slices </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>executeBeforeProc</b> </td><td>: execution of FHEM command (or perl-routine) before export </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or perl-routine) after export </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execution of FHEM command (or Perl-routine) before 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>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>
|
||||
@ -11619,7 +11656,8 @@ return;
|
||||
Every reading of result is composed of the dataset timestring , an index, the device name
|
||||
and the reading name.
|
||||
The function has the capability to reconize multiple occuring datasets (doublets).
|
||||
Such doublets are marked by an index > 1. <br>
|
||||
Such doublets are marked by an index > 1. Optional a Unique-Index is appended if
|
||||
datasets with identical timestamp, device and reading but different value are existing. <br>
|
||||
Doublets can be highlighted in terms of color by setting attribut e"fetchMarkDuplicates". <br><br>
|
||||
|
||||
<b>Note:</b> <br>
|
||||
@ -11639,8 +11677,8 @@ return;
|
||||
|
||||
<ul>
|
||||
<b>Example:</b> <br>
|
||||
2017-10-22_03-04-43__1__SMA_Energymeter__Bezug_WirkP_Kosten_Diff <br>
|
||||
# <date>_<time>__<index>__<device>__<reading>
|
||||
2017-10-22_03-04-43__1__SMA_Energymeter__Bezug_WirkP_Kosten_Diff__[1] <br>
|
||||
# <date>_<time>__<index>__<device>__<reading>__[Unique-Index]
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
@ -11649,10 +11687,11 @@ return;
|
||||
<ul>
|
||||
<table>
|
||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||
<tr><td> <b>fetchRoute</b> </td><td>: direction of selection read in database </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>device</b> </td><td>: include or exclude <device> from selection </td></tr>
|
||||
<tr><td> <b>fetchRoute</b> </td><td>: direction of selection read in database </td></tr>
|
||||
<tr><td> <b>fetchMarkDuplicates</b> </td><td>: Highlighting of found doublets </td></tr>
|
||||
<tr><td> <b>fetchValueFn</b> </td><td>: the displayed value of the VALUE database field can be changed by a function before the reading is created </td></tr>
|
||||
<tr><td> <b>limit</b> </td><td>: limits the number of datasets to select and display </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>
|
||||
@ -11669,7 +11708,7 @@ return;
|
||||
</li> <br>
|
||||
|
||||
<li><b> index <Option> </b>
|
||||
- Reports the existing indexes in the database or creates the needed indexes.
|
||||
- Reports the existing indexes in the database or creates the index which is needed.
|
||||
If the index is already created, it will be renewed (dropped and new created) <br><br>
|
||||
|
||||
The possible options are: <br><br>
|
||||
@ -11685,6 +11724,9 @@ return;
|
||||
</table>
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
<b>Note:</b> <br>
|
||||
The used database user needs the ALTER and INDEX privilege. <br>
|
||||
|
||||
</li> <br>
|
||||
|
||||
@ -11730,8 +11772,8 @@ return;
|
||||
<ul>
|
||||
<table>
|
||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execution of FHEM command (or perl-routine) before import </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or perl-routine) after import </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execution of FHEM command (or Perl-routine) before import </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or Perl-routine) after import </td></tr>
|
||||
<tr><td> <b>expimpfile</b> </td><td>: the name of exportfile </td></tr>
|
||||
</table>
|
||||
</ul>
|
||||
@ -11771,8 +11813,8 @@ return;
|
||||
<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>executeBeforeProc</b> </td><td>: execution of FHEM command (or perl-routine) before operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or perl-routine) after operation </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execution of FHEM command (or Perl-routine) before operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or Perl-routine) after operation </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>
|
||||
@ -11813,8 +11855,8 @@ return;
|
||||
<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>executeBeforeProc</b> </td><td>: execution of FHEM command (or perl-routine) before operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or perl-routine) after operation </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execution of FHEM command (or Perl-routine) before operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or Perl-routine) after operation </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>
|
||||
@ -11882,8 +11924,8 @@ return;
|
||||
<ul>
|
||||
<table>
|
||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||
<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>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>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>timeOlderThan</b> </td><td>: records <b>older</b> than this attribute will be reduced </td></tr>
|
||||
@ -12071,8 +12113,8 @@ return;
|
||||
<table>
|
||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||
<tr><td> <b>allowDeletion</b> </td><td>: activates capabilty to delete datasets </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execution of FHEM command (or perl-routine) before operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or perl-routine) after operation </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execution of FHEM command (or Perl-routine) before operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or Perl-routine) after operation </td></tr>
|
||||
<tr><td> <b>sqlResultFormat</b> </td><td>: determines presentation style of command result </td></tr>
|
||||
<tr><td> <b>sqlResultFieldSep</b> </td><td>: choice of a useful field separator for result </td></tr>
|
||||
<tr><td> <b>sqlCmdHistoryLength</b> </td><td>: activates command history and length </td></tr>
|
||||
@ -12103,8 +12145,8 @@ return;
|
||||
<table>
|
||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||
<tr><td> <b>allowDeletion</b> </td><td>: activates capabilty to delete datasets </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execution of FHEM command (or perl-routine) before operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or perl-routine) after operation </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execution of FHEM command (or Perl-routine) before operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or Perl-routine) after operation </td></tr>
|
||||
<tr><td> <b>sqlResultFormat</b> </td><td>: determines presentation style of command result </td></tr>
|
||||
<tr><td> <b>sqlResultFieldSep</b> </td><td>: choice of a useful field separator for result </td></tr>
|
||||
</table>
|
||||
@ -12123,8 +12165,8 @@ return;
|
||||
<ul>
|
||||
<table>
|
||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execution of FHEM command (or perl-routine) before operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or perl-routine) after operation </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execution of FHEM command (or Perl-routine) before operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or Perl-routine) after operation </td></tr>
|
||||
<tr><td> <b>sqlResultFormat</b> </td><td>: determines the formatting of the result </td></tr>
|
||||
<tr><td> <b>sqlResultFieldSep</b> </td><td>: determines the used field separator in statement result </td></tr>
|
||||
</table>
|
||||
@ -12174,8 +12216,8 @@ return;
|
||||
<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>executeBeforeProc</b> </td><td>: execution of FHEM command (or perl-routine) before operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or perl-routine) after operation </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: execution of FHEM command (or Perl-routine) before operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or Perl-routine) after operation </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>
|
||||
@ -12190,7 +12232,7 @@ return;
|
||||
(Standby-database). <br>
|
||||
Here the "<DbLog-Device Standby>" is the DbLog-Device what is connected to the
|
||||
Standby-database. <br><br>
|
||||
All the datasets which are determined by timestamp-<a href="#limit">attributes</a>
|
||||
All the datasets which are determined by timestamp-<a href="#timestamp_begin">attributes</a>
|
||||
or respectively the attributes "device", "reading" are transmitted. <br>
|
||||
The datasets are transmitted in time slices accordingly to the adjusted aggregation.
|
||||
If the attribute "aggregation" has value "no" or "month", the datasets are transmitted
|
||||
@ -12203,8 +12245,10 @@ return;
|
||||
<ul>
|
||||
<table>
|
||||
<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>executeBeforeProc</b> </td><td>: execution of FHEM command (or Perl-routine) before operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: execution of FHEM command (or Perl-routine) after operation </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 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>
|
||||
@ -12672,6 +12716,21 @@ sub bdump {
|
||||
</ul>
|
||||
|
||||
</li> <br><br>
|
||||
|
||||
<a name="fetchValueFn"></a>
|
||||
<li><b>fetchValueFn </b> - When fetching the database content, you are able to manipulate the value fetched from the
|
||||
VALUE database field before create the appropriate reading. You have to insert a Perl
|
||||
function which is enclosed in {} .<br>
|
||||
The value of the database field VALUE is provided in variable $VALUE. <br><br>
|
||||
|
||||
<ul>
|
||||
<b>Example:</b> <br>
|
||||
attr <name> fetchValueFn { $VALUE =~ s/^.*Used:\s(.*)\sMB,.*/$1." MB"/e } <br>
|
||||
|
||||
# From a long line a specific pattern is extracted and will be displayed als VALUE instead
|
||||
the whole line
|
||||
</ul>
|
||||
</li> <br><br>
|
||||
|
||||
<a name="ftpUse"></a>
|
||||
<li><b>ftpUse </b> - FTP Transfer after dump will be switched on (without SSL encoding). The created
|
||||
@ -13402,8 +13461,8 @@ sub bdump {
|
||||
<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>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) vor Start Operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) nach Ende Operation </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder Perl-Routine) vor Start Operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder Perl-Routine) nach Ende Operation </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>
|
||||
@ -13466,8 +13525,8 @@ sub bdump {
|
||||
<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>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>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) nach Ende 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 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>
|
||||
@ -13560,8 +13619,8 @@ sub bdump {
|
||||
<tr><td> <b>limit</b> </td><td>: begrenzt NUR die Anzahl der anzuzeigenden 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>: eine Reihe von Attributen zur Zeitabgrenzung </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) vor Start des Befehls </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) nach Ende des Befehls </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>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder Perl-Routine) vor Start des Befehls </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder Perl-Routine) nach Ende des Befehls </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>
|
||||
@ -13595,8 +13654,8 @@ sub bdump {
|
||||
<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>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) nach Ende 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 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>
|
||||
@ -13685,8 +13744,8 @@ sub bdump {
|
||||
<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> <b>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) vor Start des Befehls </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) nach Ende des Befehls </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder Perl-Routine) vor Start des Befehls </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder Perl-Routine) nach Ende des Befehls </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>
|
||||
@ -13761,8 +13820,8 @@ sub bdump {
|
||||
<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>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) vor Start Operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) nach Ende Operation </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder Perl-Routine) vor Start Operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder Perl-Routine) nach Ende Operation </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>
|
||||
@ -13810,8 +13869,8 @@ sub bdump {
|
||||
<tr><td> dumpMemlimit </td><td>: Begrenzung der Speicherverwendung </td></tr>
|
||||
<tr><td> dumpSpeed </td><td>: Begrenzung die CPU-Belastung </td></tr>
|
||||
<tr><td> dumpFilesKeep </td><td>: Anzahl der aufzubwahrenden Dumpfiles </td></tr>
|
||||
<tr><td> executeBeforeProc </td><td>: ausführen FHEM Kommando (oder perl-Routine) vor dem Dump </td></tr>
|
||||
<tr><td> executeAfterProc </td><td>: ausführen FHEM Kommando (oder perl-Routine) nach dem Dump </td></tr>
|
||||
<tr><td> executeBeforeProc </td><td>: ausführen FHEM Kommando (oder Perl-Routine) vor dem Dump </td></tr>
|
||||
<tr><td> executeAfterProc </td><td>: ausführen FHEM Kommando (oder Perl-Routine) nach dem Dump </td></tr>
|
||||
<tr><td> optimizeTablesBeforeDump </td><td>: Tabelloptimierung vor dem Dump ausführen </td></tr>
|
||||
</table>
|
||||
</ul>
|
||||
@ -13865,8 +13924,8 @@ sub bdump {
|
||||
<tr><td> dumpCompress </td><td>: Komprimierung des Dumpfiles nach der Erstellung </td></tr>
|
||||
<tr><td> dumpDirLocal </td><td>: Directory des lokal gemounteten dumpDirRemote-Verzeichnisses </td></tr>
|
||||
<tr><td> dumpFilesKeep </td><td>: Anzahl der aufzubwahrenden Dumpfiles </td></tr>
|
||||
<tr><td> executeBeforeProc </td><td>: ausführen FHEM Kommando (oder perl-Routine) vor dem Dump </td></tr>
|
||||
<tr><td> executeAfterProc </td><td>: ausführen FHEM Kommando (oder perl-Routine) nach dem Dump </td></tr>
|
||||
<tr><td> executeBeforeProc </td><td>: ausführen FHEM Kommando (oder Perl-Routine) vor dem Dump </td></tr>
|
||||
<tr><td> executeAfterProc </td><td>: ausführen FHEM Kommando (oder Perl-Routine) nach dem Dump </td></tr>
|
||||
<tr><td> optimizeTablesBeforeDump </td><td>: Tabelloptimierung vor dem Dump ausführen </td></tr>
|
||||
</table>
|
||||
</ul>
|
||||
@ -13963,8 +14022,8 @@ sub bdump {
|
||||
<tr><td> dumpCompress </td><td>: Komprimierung des Dumpfiles nach der Erstellung </td></tr>
|
||||
<tr><td> dumpDirLocal </td><td>: Directory des lokal gemounteten dumpDirRemote-Verzeichnisses </td></tr>
|
||||
<tr><td> dumpFilesKeep </td><td>: Anzahl der aufzubwahrenden Dumpfiles </td></tr>
|
||||
<tr><td> executeBeforeProc </td><td>: ausführen FHEM Kommando (oder perl-Routine) vor dem Dump </td></tr>
|
||||
<tr><td> executeAfterProc </td><td>: ausführen FHEM Kommando (oder perl-Routine) nach dem Dump </td></tr>
|
||||
<tr><td> executeBeforeProc </td><td>: ausführen FHEM Kommando (oder Perl-Routine) vor dem Dump </td></tr>
|
||||
<tr><td> executeAfterProc </td><td>: ausführen FHEM Kommando (oder Perl-Routine) nach dem Dump </td></tr>
|
||||
<tr><td> optimizeTablesBeforeDump </td><td>: Tabelloptimierung vor dem Dump ausführen </td></tr>
|
||||
</table>
|
||||
</ul>
|
||||
@ -14012,8 +14071,8 @@ sub bdump {
|
||||
<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>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>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>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 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>
|
||||
@ -14030,10 +14089,12 @@ sub bdump {
|
||||
Die Leserichtung in der Datenbank kann durch das <a href="#DbRepattr">Attribut</a>
|
||||
"fetchRoute" bestimmt werden. <br><br>
|
||||
|
||||
Jedes Ergebnisreading setzt sich aus dem Timestring des Datensatzes, einem Index, dem Device
|
||||
und dem Reading zusammen.
|
||||
Jedes Ergebnisreading setzt sich aus dem Timestring des Datensatzes, einem Dubletten-Index,
|
||||
dem Device und dem Reading zusammen.
|
||||
Die Funktion fetchrows ist in der Lage, mehrfach vorkommende Datensätze (Dubletten) zu erkennen.
|
||||
Solche Dubletten sind mit einem Index > 1 gekennzeichnet. <br>
|
||||
Solche Dubletten sind mit einem Dubletten-Index > 1 gekennzeichnet. Optional wird noch ein
|
||||
Unique-Index angehängt, wenn Datensätze mit identischem Timestamp, Device und Reading aber
|
||||
unterschiedlichem Value vorhanden sind. <br>
|
||||
Dubletten können mit dem Attribut "fetchMarkDuplicates" farblich hervorgehoben werden. <br><br>
|
||||
|
||||
<b>Hinweis:</b> <br>
|
||||
@ -14055,8 +14116,8 @@ sub bdump {
|
||||
|
||||
<ul>
|
||||
<b>Beispiel:</b> <br>
|
||||
2017-10-22_03-04-43__1__SMA_Energymeter__Bezug_WirkP_Kosten_Diff <br>
|
||||
# <Datum>_<Zeit>__<Index>__<Device>__<Reading>
|
||||
2017-10-22_03-04-43__1__SMA_Energymeter__Bezug_WirkP_Kosten_Diff__[1] <br>
|
||||
# <Datum>_<Zeit>__<Dubletten-Index>__<Device>__<Reading>__[Unique-Index]
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
@ -14066,10 +14127,11 @@ sub bdump {
|
||||
<ul>
|
||||
<table>
|
||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||
<tr><td> <b>fetchRoute</b> </td><td>: Leserichtung der Selektion innerhalb der Datenbank </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>device</b> </td><td>: einschließen oder ausschließen von Datensätzen die <device> enthalten </td></tr>
|
||||
<tr><td> <b>fetchRoute</b> </td><td>: Leserichtung der Selektion innerhalb der Datenbank </td></tr>
|
||||
<tr><td> <b>fetchMarkDuplicates</b> </td><td>: Hervorhebung von gefundenen Dubletten </td></tr>
|
||||
<tr><td> <b>fetchValueFn</b> </td><td>: der angezeigte Wert des VALUE Datenbankfeldes kann mit einer Funktion vor der Readingerstellung geändert werden </td></tr>
|
||||
<tr><td> <b>limit</b> </td><td>: begrenzt die Anzahl zu selektierenden bzw. anzuzeigenden 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>: 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 (Datenbank spezifischer REGEXP). Der REGEXP wird auf Werte des Datenbankfeldes 'VALUE' angewendet. </td></tr>
|
||||
@ -14091,7 +14153,7 @@ sub bdump {
|
||||
- Listet die in der Datenbank vorhandenen Indexe auf bzw. legt die benötigten Indexe
|
||||
an. Ist ein Index bereits angelegt, wird er erneuert (gelöscht und erneut angelegt) <br><br>
|
||||
|
||||
Die möglichen Optionen sind: <br><br>
|
||||
Die möglichen Optionen sind: <br><br>
|
||||
|
||||
<ul>
|
||||
<table>
|
||||
@ -14104,6 +14166,9 @@ sub bdump {
|
||||
</table>
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
<b>Hinweis:</b> <br>
|
||||
Der verwendete Datenbank-Nutzer benötigt das ALTER und INDEX Privileg. <br>
|
||||
|
||||
</li> <br>
|
||||
|
||||
@ -14151,8 +14216,8 @@ sub bdump {
|
||||
<ul>
|
||||
<table>
|
||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: FHEM Kommando (oder perl-Routine) vor dem Import ausführen </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: FHEM Kommando (oder perl-Routine) nach dem Import ausführen </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: FHEM Kommando (oder Perl-Routine) vor dem Import ausführen </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: FHEM Kommando (oder Perl-Routine) nach dem Import ausführen </td></tr>
|
||||
<tr><td> <b>expimpfile</b> </td><td>: der Name des Importfiles </td></tr>
|
||||
</table>
|
||||
</ul>
|
||||
@ -14194,8 +14259,8 @@ sub bdump {
|
||||
<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>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) vor Start Operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) nach Ende Operation </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder Perl-Routine) vor Start Operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder Perl-Routine) nach Ende Operation </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>
|
||||
@ -14241,8 +14306,8 @@ sub bdump {
|
||||
<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>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) vor Start Operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) nach Ende Operation </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder Perl-Routine) vor Start Operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder Perl-Routine) nach Ende Operation </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>
|
||||
@ -14314,8 +14379,8 @@ sub bdump {
|
||||
<ul>
|
||||
<table>
|
||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||
<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>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>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>timeOlderThan</b> </td><td>: es werden Datenbankeinträge <b>älter</b> als dieses Attribut reduziert </td></tr>
|
||||
@ -14508,8 +14573,8 @@ sub bdump {
|
||||
<ul>
|
||||
<table>
|
||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: FHEM Kommando (oder perl-Routine) vor der Operation ausführen </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: FHEM Kommando (oder perl-Routine) nach der Operation ausführen </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: FHEM Kommando (oder Perl-Routine) vor der Operation ausführen </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: FHEM Kommando (oder Perl-Routine) nach der Operation ausführen </td></tr>
|
||||
<tr><td> <b>allowDeletion</b> </td><td>: aktiviert Löschmöglichkeit </td></tr>
|
||||
<tr><td> <b>sqlResultFormat</b> </td><td>: legt die Darstellung des Kommandoergebnis fest </td></tr>
|
||||
<tr><td> <b>sqlResultFieldSep</b> </td><td>: Auswahl Feldtrenner im Ergebnis </td></tr>
|
||||
@ -14541,8 +14606,8 @@ sub bdump {
|
||||
<ul>
|
||||
<table>
|
||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: FHEM Kommando (oder perl-Routine) vor der Operation ausführen </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: FHEM Kommando (oder perl-Routine) nach der Operation ausführen </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: FHEM Kommando (oder Perl-Routine) vor der Operation ausführen </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: FHEM Kommando (oder Perl-Routine) nach der Operation ausführen </td></tr>
|
||||
<tr><td> <b>allowDeletion</b> </td><td>: aktiviert Löschmöglichkeit </td></tr>
|
||||
<tr><td> <b>sqlResultFormat</b> </td><td>: legt die Darstellung des Kommandoergebnis fest </td></tr>
|
||||
<tr><td> <b>sqlResultFieldSep</b> </td><td>: Auswahl Feldtrenner im Ergebnis </td></tr>
|
||||
@ -14564,8 +14629,8 @@ sub bdump {
|
||||
<ul>
|
||||
<table>
|
||||
<colgroup> <col width=5%> <col width=95%> </colgroup>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: FHEM Kommando (oder perl-Routine) vor der Operation ausführen </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: FHEM Kommando (oder perl-Routine) nach der Operation ausführen </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: FHEM Kommando (oder Perl-Routine) vor der Operation ausführen </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: FHEM Kommando (oder Perl-Routine) nach der Operation ausführen </td></tr>
|
||||
<tr><td> <b>sqlResultFormat</b> </td><td>: Optionen der Ergebnisformatierung </td></tr>
|
||||
<tr><td> <b>sqlResultFieldSep</b> </td><td>: Auswahl des Trennzeichens zwischen Ergebnisfeldern </td></tr>
|
||||
</table>
|
||||
@ -14615,8 +14680,8 @@ sub bdump {
|
||||
<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>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) vor Start Operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder perl-Routine) nach Ende Operation </td></tr>
|
||||
<tr><td> <b>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder Perl-Routine) vor Start Operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder Perl-Routine) nach Ende Operation </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>
|
||||
@ -14632,7 +14697,7 @@ sub bdump {
|
||||
Datenbank (Standby-Datenbank) übertragen.
|
||||
Dabei ist "<DbLog-Device Standby>" das DbLog-Device, welches mit der Standby-Datenbank
|
||||
verbunden ist. <br><br>
|
||||
Es werden alle Datensätze übertragen, die durch Timestamp-<a href="#limit">Attribute</a>
|
||||
Es werden alle Datensätze übertragen, die durch Timestamp-<a href="#timestamp_begin">Attribute</a>
|
||||
bzw. die Attribute "device", "reading" bestimmt sind. <br>
|
||||
Die Datensätze werden dabei in Zeitscheiben entsprechend der eingestellten Aggregation übertragen.
|
||||
Hat das Attribut "aggregation" den Wert "no" oder "month", werden die Datensätze automatisch
|
||||
@ -14646,6 +14711,8 @@ sub bdump {
|
||||
<table>
|
||||
<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>executeBeforeProc</b> </td><td>: ausführen FHEM Kommando (oder Perl-Routine) vor Start Operation </td></tr>
|
||||
<tr><td> <b>executeAfterProc</b> </td><td>: ausführen FHEM Kommando (oder Perl-Routine) nach Ende Operation </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>
|
||||
@ -15108,6 +15175,21 @@ sub bdump {
|
||||
</ul>
|
||||
|
||||
</li> <br><br>
|
||||
|
||||
<a name="fetchValueFn"></a>
|
||||
<li><b>fetchValueFn </b> - Der angezeigte Wert des Datenbankfeldes VALUE kann vor der Erstellung des entsprechenden
|
||||
Readings geändert werden. Das Attribut muss eine Perl Funktion eingeschlossen in {}
|
||||
enthalten. <br>
|
||||
Der Wert des Datenbankfeldes VALUE wird in der Variable $VALUE zur Verfügung gestellt. <br><br>
|
||||
|
||||
<ul>
|
||||
<b>Beispiel:</b> <br>
|
||||
attr <name> fetchValueFn { $VALUE =~ s/^.*Used:\s(.*)\sMB,.*/$1." MB"/e } <br>
|
||||
|
||||
# Von einer langen Ausgabe wird ein spezifisches Zeichenmuster extrahiert und als VALUE
|
||||
anstatt der gesamten Zeile im Reading angezeigt.
|
||||
</ul>
|
||||
</li> <br><br>
|
||||
|
||||
<a name="ftpUse"></a>
|
||||
<li><b>ftpUse </b> - FTP Transfer nach einem Dump wird eingeschaltet (ohne SSL Verschlüsselung). Das erzeugte
|
||||
|
Loading…
x
Reference in New Issue
Block a user