mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-02 06:55:26 +00:00
93_DbLog: adapt configCheck, new get...configCheck, commref edited
git-svn-id: https://svn.fhem.de/fhem/trunk@27250 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c128791195
commit
e99a426e84
@ -1,5 +1,6 @@
|
|||||||
# 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.
|
||||||
|
- change: 93_DbLog: adapt configCheck, new get...configCheck, commref edited
|
||||||
- change: 93_DbLog: adapt configCheck
|
- change: 93_DbLog: adapt configCheck
|
||||||
- feature: 93_DbRep: Support of utf8mb4 collation, minor fixes,
|
- feature: 93_DbRep: Support of utf8mb4 collation, minor fixes,
|
||||||
new setter migrateCollation
|
new setter migrateCollation
|
||||||
|
@ -38,6 +38,7 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch';
|
|||||||
|
|
||||||
# Version History intern by DS_Starter:
|
# Version History intern by DS_Starter:
|
||||||
my %DbLog_vNotesIntern = (
|
my %DbLog_vNotesIntern = (
|
||||||
|
"5.8.3" => "19.02.2023 adapt DbLog_configcheck, new get ... configCheck, commandref edited ",
|
||||||
"5.8.2" => "18.02.2023 adapt DbLog_configcheck, Forum: https://forum.fhem.de/index.php/topic,132163.msg1264320.html#msg1264320 ",
|
"5.8.2" => "18.02.2023 adapt DbLog_configcheck, Forum: https://forum.fhem.de/index.php/topic,132163.msg1264320.html#msg1264320 ",
|
||||||
"5.8.1" => "13.02.2023 change field type of DbLogInclude, DbLogExclude to textField-long, configCheck evaluate collation ".
|
"5.8.1" => "13.02.2023 change field type of DbLogInclude, DbLogExclude to textField-long, configCheck evaluate collation ".
|
||||||
"_DbLog_SBP_connectDB: UTF8 -> evaluate DB character/collation set and use it for ".
|
"_DbLog_SBP_connectDB: UTF8 -> evaluate DB character/collation set and use it for ".
|
||||||
@ -109,7 +110,7 @@ my %DbLog_hset = (
|
|||||||
stopSubProcess => { fn => \&_DbLog_setstopSubProcess },
|
stopSubProcess => { fn => \&_DbLog_setstopSubProcess },
|
||||||
purgeCache => { fn => \&_DbLog_setpurgeCache },
|
purgeCache => { fn => \&_DbLog_setpurgeCache },
|
||||||
commitCache => { fn => \&_DbLog_setcommitCache },
|
commitCache => { fn => \&_DbLog_setcommitCache },
|
||||||
configCheck => { fn => \&_DbLog_setconfigCheck },
|
configCheck => { fn => \&DbLog_configcheck },
|
||||||
reopen => { fn => \&_DbLog_setreopen },
|
reopen => { fn => \&_DbLog_setreopen },
|
||||||
rereadcfg => { fn => \&_DbLog_setrereadcfg },
|
rereadcfg => { fn => \&_DbLog_setrereadcfg },
|
||||||
addLog => { fn => \&_DbLog_setaddLog },
|
addLog => { fn => \&_DbLog_setaddLog },
|
||||||
@ -137,6 +138,7 @@ my %DbLog_hget = (
|
|||||||
webchart => { fn => \&_DbLog_chartQuery },
|
webchart => { fn => \&_DbLog_chartQuery },
|
||||||
plotdata => { fn => \&_DbLog_plotData },
|
plotdata => { fn => \&_DbLog_plotData },
|
||||||
retrieve => { fn => \&_DbLog_chartQuery },
|
retrieve => { fn => \&_DbLog_chartQuery },
|
||||||
|
configCheck => { fn => \&DbLog_configcheck },
|
||||||
);
|
);
|
||||||
|
|
||||||
my %DbLog_columns = ("DEVICE" => 64,
|
my %DbLog_columns = ("DEVICE" => 64,
|
||||||
@ -741,18 +743,6 @@ sub _DbLog_setcommitCache { ## no critic "not used"
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################
|
|
||||||
# Setter configCheck
|
|
||||||
################################################################
|
|
||||||
sub _DbLog_setconfigCheck { ## no critic "not used"
|
|
||||||
my $paref = shift;
|
|
||||||
my $hash = $paref->{hash};
|
|
||||||
|
|
||||||
my $check = DbLog_configcheck($hash);
|
|
||||||
|
|
||||||
return $check;
|
|
||||||
}
|
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
# Setter reopen
|
# Setter reopen
|
||||||
################################################################
|
################################################################
|
||||||
@ -5858,7 +5848,8 @@ sub DbLog_Get {
|
|||||||
return &{$DbLog_hget{$opt}{fn}} ($params);
|
return &{$DbLog_hget{$opt}{fn}} ($params);
|
||||||
}
|
}
|
||||||
|
|
||||||
my $getlist = "Unknown argument $opt, choose one of ".
|
my $getlist = "Unknown argument $opt, choose one of ".
|
||||||
|
"configCheck:noArg ".
|
||||||
"ReadingsVal: ".
|
"ReadingsVal: ".
|
||||||
"ReadingsTimestamp ".
|
"ReadingsTimestamp ".
|
||||||
"ReadingsValTimestamp ".
|
"ReadingsValTimestamp ".
|
||||||
@ -6981,7 +6972,9 @@ return $ret;
|
|||||||
#
|
#
|
||||||
##########################################################################
|
##########################################################################
|
||||||
sub DbLog_configcheck {
|
sub DbLog_configcheck {
|
||||||
my $hash = shift;
|
my $paref = shift;
|
||||||
|
my $hash = $paref->{hash};
|
||||||
|
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
my $dbmodel = $hash->{MODEL};
|
my $dbmodel = $hash->{MODEL};
|
||||||
my $dbconn = $hash->{dbconn};
|
my $dbconn = $hash->{dbconn};
|
||||||
@ -7231,27 +7224,48 @@ sub DbLog_configcheck {
|
|||||||
my $wall = "";
|
my $wall = "";
|
||||||
|
|
||||||
for my $web (@webdvs) {
|
for my $web (@webdvs) {
|
||||||
my $pf = AttrVal($web,"plotfork",0);
|
my $pf = AttrVal ($web, 'plotfork', 0);
|
||||||
my $pe = AttrVal($web,"plotEmbed",0);
|
my $lps = AttrVal ($web, 'longpollSVG', 0);
|
||||||
$forks = 0 if(!$pf);
|
my $pe = AttrVal ($web, 'plotEmbed', 0);
|
||||||
$emb = 0 if($pe =~ /[01]/);
|
|
||||||
|
|
||||||
if(!$pf || $pe =~ /[01]/) {
|
$forks = 0 if(!$pf);
|
||||||
$wall .= "<b>".$web.": plotfork=".$pf." / plotEmbed=".$pe."</b><br>";
|
$emb = 0 if($lps && $pe != 1);
|
||||||
|
|
||||||
|
if(!$pf || ($lps && $pe != 1)) {
|
||||||
|
$wall .= "<b>".$web.": plotfork=".$pf." / plotEmbed=".$pe." / longpollSVG=".$lps."</b><br>";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$wall .= $web.": plotfork=".$pf." / plotEmbed=".$pe."<br>";
|
$wall .= $web.": plotfork=".$pf." / plotEmbed=".$pe." / longpollSVG=".$lps."<br>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$forks || !$emb) {
|
if (!$forks || !$emb) {
|
||||||
$check .= "WARNING - at least one of your FHEMWEB devices has attribute \"plotfork = 1\" and/or attribute \"plotEmbed = 2\" not set. <br><br>";
|
$rec = q{};
|
||||||
|
|
||||||
|
if (!$forks) {
|
||||||
|
$check .= "WARNING - at least one of your FHEMWEB devices has attribute 'plotfork = 1' not set. <br>";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$emb) {
|
||||||
|
$check .= "WARNING - at least one of your FHEMWEB devices has attribute 'longpollSVG = 1' but not 'plotEmbed = 1' set. <br>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$check .= "<br>";
|
||||||
$check .= $wall;
|
$check .= $wall;
|
||||||
$check .= "<br>";
|
$check .= "<br>";
|
||||||
$check .= "Rating: ".$warn."<br>";
|
$check .= "Rating: ".$warn."<br>";
|
||||||
$rec = "You should set attribute \"plotfork = 1\" and \"plotEmbed = 2\" in relevant devices. ".
|
|
||||||
"If these attributes are not set, blocking situations may occure when creating plots. ".
|
if (!$forks) {
|
||||||
"<b>Note:</b> Your system must have sufficient memory to handle parallel running Perl processes. See also global attribute \"blockingCallMax\". <br>"
|
$rec .= "You should set attribute 'plotfork = 1' in relevant devices. ".
|
||||||
|
"If this attribute is not set, blocking situations may occure when creating plots. <br>".
|
||||||
|
"(Note: Your system must have sufficient memory to handle parallel running Perl processes.) ".
|
||||||
|
"See also global attribute <a href=\"http://fhem.de/commandref.html#blockingCallMax\">blockingCallMax</a>. <br>"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$emb) {
|
||||||
|
$rec .= "You have to set the attribute 'plotEmbed = 1' in FHEMWEB devices where 'longpollSVG' should be used. ".
|
||||||
|
"Refer to <a href=\"http://fhem.de/commandref.html#FHEMWEB-attr-longpollSVG\">longpollSVG</a> for further information.<br>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$check .= $wall;
|
$check .= $wall;
|
||||||
@ -7779,7 +7793,7 @@ sub _DbLog_checkModVer {
|
|||||||
Log3 ($name, 4, "DbLog $name - configCheck: New SVN version of $fName found - creation time: $r[1] ($r[2] Bytes)");
|
Log3 ($name, 4, "DbLog $name - configCheck: New SVN version of $fName found - creation time: $r[1] ($r[2] Bytes)");
|
||||||
|
|
||||||
$msg = "A new DbLog version is available (creation time: $r[1], size: $r[2] bytes)";
|
$msg = "A new DbLog version is available (creation time: $r[1], size: $r[2] bytes)";
|
||||||
$rec = "You should update FHEM to get the recent DbLog version from repository!";
|
$rec = "You should update FHEM to get the recent DbLog version from repository.";
|
||||||
return (0, 1, $msg, $rec);
|
return (0, 1, $msg, $rec);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7789,7 +7803,7 @@ sub _DbLog_checkModVer {
|
|||||||
Log3 ($name, 4, "DbLog $name - configCheck: SVN version of $fName creation time: $r[1] ($r[2] Bytes) differs from local one ($sz Bytes)");
|
Log3 ($name, 4, "DbLog $name - configCheck: SVN version of $fName creation time: $r[1] ($r[2] Bytes) differs from local one ($sz Bytes)");
|
||||||
|
|
||||||
$msg = "Your local DbLog module is modified. The SVN version of $fName has creation time: $r[1] ($r[2] Bytes)";
|
$msg = "Your local DbLog module is modified. The SVN version of $fName has creation time: $r[1] ($r[2] Bytes)";
|
||||||
$rec = "You should update FHEM to get the recent DbLog version from repository!";
|
$rec = "You should update FHEM to get the recent DbLog version from repository.";
|
||||||
return (0, 1, $msg, $rec);
|
return (0, 1, $msg, $rec);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8775,7 +8789,7 @@ return;
|
|||||||
|
|
||||||
After you have defined your DbLog-device it is recommended to run the <b>configuration check</b> <br><br>
|
After you have defined your DbLog-device it is recommended to run the <b>configuration check</b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
<code>set <name> configCheck</code> <br>
|
<code>get <name> configCheck</code> <br>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@ -8816,7 +8830,7 @@ return;
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li> Have the preparatory steps as described in commandref been done ? (install software components, create tables and index) </li>
|
<li> Have the preparatory steps as described in commandref been done ? (install software components, create tables and index) </li>
|
||||||
<li> Was "set <name> configCheck" executed after definition and potential errors fixed or rather the hints implemented ? </li>
|
<li> Was "get <name> configCheck" executed after definition and potential errors fixed or rather the hints implemented ? </li>
|
||||||
<li> If configDB is used ... has the database configuration file been imported into configDB (e.g. by "configDB fileimport ./db.conf") ? </li>
|
<li> If configDB is used ... has the database configuration file been imported into configDB (e.g. by "configDB fileimport ./db.conf") ? </li>
|
||||||
<li> When creating a SVG-plot and no drop-down list with proposed values appear -> set attribute "DbLogType" to "Current/History". </li>
|
<li> When creating a SVG-plot and no drop-down list with proposed values appear -> set attribute "DbLogType" to "Current/History". </li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -8825,7 +8839,7 @@ return;
|
|||||||
If the notes don't lead to success, please increase verbose level of the DbLog-device to 4 or 5 and observe entries in
|
If the notes don't lead to success, please increase verbose level of the DbLog-device to 4 or 5 and observe entries in
|
||||||
logfile relating to the DbLog-device.
|
logfile relating to the DbLog-device.
|
||||||
|
|
||||||
For problem analysis please post the output of "list <name>", the result of "set <name> configCheck" and the
|
For problem analysis please post the output of "list <name>", the result of "get <name> configCheck" and the
|
||||||
logfile entries of DbLog-device to the forum thread.
|
logfile entries of DbLog-device to the forum thread.
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
@ -8838,7 +8852,9 @@ return;
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>set <name> addCacheLine YYYY-MM-DD HH:MM:SS|<device>|<type>|<event>|<reading>|<value>|[<unit>] </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-addCacheLine"></a>
|
||||||
|
<b>set <name> addCacheLine YYYY-MM-DD HH:MM:SS|<device>|<type>|<event>|<reading>|<value>|[<unit>] </b> <br><br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
In asynchronous mode a new dataset is inserted to the Cache and will be processed at the next database sync cycle.
|
In asynchronous mode a new dataset is inserted to the Cache and will be processed at the next database sync cycle.
|
||||||
@ -8851,19 +8867,9 @@ return;
|
|||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> addCacheLine YYYY-MM-DD HH:MM:SS|<device>|<type>|<event>|<reading>|<value>|[<unit>] </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-addLog"></a>
|
||||||
<ul>
|
<b>set <name> addLog <devspec>:<Reading> [Value] [CN=<caller name>] [!useExcludes] </b> <br><br>
|
||||||
Im asynchronen Modus wird ein neuer Datensatz in den Cache eingefügt und beim nächsten Synclauf mit abgearbeitet.
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
<b>Beispiel:</b> <br>
|
|
||||||
set <name> addCacheLine 2017-12-05 17:03:59|MaxBathRoom|MAX|valveposition: 95|valveposition|95|% <br>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<li><b>set <name> addLog <devspec>:<Reading> [Value] [CN=<caller name>] [!useExcludes] </b> <br><br>
|
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
Inserts an additional log entry of a device/reading combination into the database. <br>
|
Inserts an additional log entry of a device/reading combination into the database. <br>
|
||||||
@ -8913,32 +8919,39 @@ return;
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> clearReadings </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-clearReadings"></a>
|
||||||
|
<b>set <name> clearReadings </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
This function clears readings which were created by different DbLog-functions.
|
This function clears readings which were created by different DbLog-functions.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> commitCache </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-commitCache"></a>
|
||||||
|
<b>set <name> commitCache </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
In asynchronous mode (<a href="#DbLog-attr-asyncMode">asyncMode=1</a>), the cached data in memory will be written
|
In asynchronous mode (<a href="#DbLog-attr-asyncMode">asyncMode=1</a>), the cached data in memory will be written
|
||||||
into the database and subsequently the cache will be cleared. Thereby the internal timer for the asynchronous mode
|
into the database and subsequently the cache will be cleared. <br>
|
||||||
Modus will be set new.
|
Thereby the internal timer for the asynchronous mode Modus will be set new.
|
||||||
The command can be usefull in case of you want to write the cached data manually, or e.g. by an AT-device, on a
|
|
||||||
defined point of time into the database.
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> configCheck </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-configCheck"></a>
|
||||||
|
<b>set <name> configCheck </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
This command checks some important settings and give recommendations back to you if proposals are identified.
|
Checks some important settings and give recommendations back to you if proposals are identified. <br>
|
||||||
|
(<b>Note:</b> This command is deprecated and will be removed in next releases. Use "get <name> configCheck" instead.)
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> count </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-count"></a>
|
||||||
|
<b>set <name> count </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Determines the number of records in the tables current and history and writes the results to the readings
|
Determines the number of records in the tables current and history and writes the results to the readings
|
||||||
countCurrent and countHistory.
|
countCurrent and countHistory.
|
||||||
@ -8951,14 +8964,18 @@ return;
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> countNbl </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-countNbl"></a>
|
||||||
|
<b>set <name> countNbl </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
The function is identical to "set <name> count" and will be removed soon.
|
The function is identical to "set <name> count" and will be removed soon.
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> deleteOldDays <n> </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-deleteOldDays"></a>
|
||||||
|
<b>set <name> deleteOldDays <n> </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Deletes records older than <n> days in table history.
|
Deletes records older than <n> days in table history.
|
||||||
The number of deleted records is logged in Reading lastRowsDeleted.
|
The number of deleted records is logged in Reading lastRowsDeleted.
|
||||||
@ -8971,7 +8988,9 @@ return;
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> deleteOldDaysNbl <n> </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-deleteOldDaysNbl"></a>
|
||||||
|
<b>set <name> deleteOldDaysNbl <n> </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
The function is identical to "set <name> deleteOldDays" and will be removed soon.
|
The function is identical to "set <name> deleteOldDays" and will be removed soon.
|
||||||
<br>
|
<br>
|
||||||
@ -8979,15 +8998,18 @@ return;
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> eraseReadings </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-eraseReadings"></a>
|
||||||
|
<b>set <name> eraseReadings </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
This function deletes all readings except reading "state".
|
This function deletes all readings except reading "state".
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<li>
|
||||||
<a id="DbLog-set-exportCache"></a>
|
<a id="DbLog-set-exportCache"></a>
|
||||||
<li><b>set <name> exportCache [nopurge | purgecache] </b> <br><br>
|
<b>set <name> exportCache [nopurge | purgecache] </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
If DbLog is operated in asynchronous mode, the cache can be written to a text file with this command. <br>
|
If DbLog is operated in asynchronous mode, the cache can be written to a text file with this command. <br>
|
||||||
The file is created by default in the directory (global->modpath)/log/. The destination directory can be changed with
|
The file is created by default in the directory (global->modpath)/log/. The destination directory can be changed with
|
||||||
@ -9007,7 +9029,9 @@ return;
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> importCachefile <file> </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-importCachefile"></a>
|
||||||
|
<b>set <name> importCachefile <file> </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Imports a file written with "exportCache" into the database. <br>
|
Imports a file written with "exportCache" into the database. <br>
|
||||||
The available files are searched by default in the directory (global->modpath)/log/ and a drop-down list is generated
|
The available files are searched by default in the directory (global->modpath)/log/ and a drop-down list is generated
|
||||||
@ -9031,14 +9055,18 @@ return;
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> listCache </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-listCache"></a>
|
||||||
|
<b>set <name> listCache </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Lists the data cached in the memory cache.
|
Lists the data cached in the memory cache.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> purgeCache </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-purgeCache"></a>
|
||||||
|
<b>set <name> purgeCache </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
In asynchronous mode (<a href="#DbLog-attr-asyncMode">asyncMode=1</a>), the in memory cached data will be deleted.
|
In asynchronous mode (<a href="#DbLog-attr-asyncMode">asyncMode=1</a>), the in memory cached data will be deleted.
|
||||||
With this command data won't be written from cache into the database.
|
With this command data won't be written from cache into the database.
|
||||||
@ -9046,7 +9074,9 @@ return;
|
|||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> reduceLog <no>[:<nn>] [average[=day]] [exclude=device1:reading1,device2:reading2,...] </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-reduceLog"></a>
|
||||||
|
<b>set <name> reduceLog <no>[:<nn>] [average[=day]] [exclude=device1:reading1,device2:reading2,...] </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Reduces historical records older than <no> days and (optionally) newer than <nn> days
|
Reduces historical records older than <no> days and (optionally) newer than <nn> days
|
||||||
to one record (the first) per hour per device & reading.<br>
|
to one record (the first) per hour per device & reading.<br>
|
||||||
@ -9075,24 +9105,31 @@ return;
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> reduceLogNbl <no>[:<nn>] [average[=day]] [exclude=device1:reading1,device2:reading2,...] </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-reduceLogNbl"></a>
|
||||||
|
<b>set <name> reduceLogNbl <no>[:<nn>] [average[=day]] [exclude=device1:reading1,device2:reading2,...] </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
The function is identical to "set <name> reduceLog" and will be removed soon.
|
The function is identical to "set <name> reduceLog" and will be removed soon.
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> reopen [n] </b> <br><br>
|
<li>
|
||||||
<ul>
|
<a id="DbLog-set-reopen"></a>
|
||||||
Perform a database disconnect and immediate reconnect to clear cache and flush journal file if no time [n] was set. <br>
|
<b>set <name> reopen [n] </b> <br><br>
|
||||||
If optionally a delay time of [n] seconds was set, the database connection will be disconnect immediately but it was only reopened
|
<ul>
|
||||||
after [n] seconds. In synchronous mode the events won't saved during that time. In asynchronous mode the events will be
|
Closes the database and then immediately opens it again if no time [n] in seconds has been specified. <br>
|
||||||
stored in the memory cache and saved into database after the reconnect was done.
|
If an optional delay time [n] in seconds has been specified, the connection to the database will be closed and
|
||||||
</li>
|
reconnected only after [n] seconds have elapsed. <br>
|
||||||
|
During the time of the database closure, events to be logged are stored in the memory cache and written to the
|
||||||
|
database after the reconnect.
|
||||||
</ul>
|
</ul>
|
||||||
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> rereadcfg </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-rereadcfg"></a>
|
||||||
|
<b>set <name> rereadcfg </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
The configuration file is read in again. <br>
|
The configuration file is read in again. <br>
|
||||||
After reading, an existing database connection is terminated and re-established with the configured connection data.
|
After reading, an existing database connection is terminated and re-established with the configured connection data.
|
||||||
@ -9100,8 +9137,9 @@ return;
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<li>
|
||||||
<a id="DbLog-set-stopSubProcess"></a>
|
<a id="DbLog-set-stopSubProcess"></a>
|
||||||
<li><b>set <name> stopSubProcess </b> <br><br>
|
<b>set <name> stopSubProcess </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
A running SubProcess is terminated. <br>
|
A running SubProcess is terminated. <br>
|
||||||
As soon as a new subprocess is required by a Log operation, an automatic reinitialization of a process takes place.
|
As soon as a new subprocess is required by a Log operation, an automatic reinitialization of a process takes place.
|
||||||
@ -9114,7 +9152,9 @@ return;
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> userCommand <validSelectStatement> </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-userCommand"></a>
|
||||||
|
<b>set <name> userCommand <validSelectStatement> </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Executes simple SQL Select commands on the database. <br>
|
Executes simple SQL Select commands on the database. <br>
|
||||||
The result of the statement is written to the reading "userCommandResult".
|
The result of the statement is written to the reading "userCommandResult".
|
||||||
@ -9137,10 +9177,20 @@ return;
|
|||||||
<b>Get</b>
|
<b>Get</b>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a id="DbLog-get-configCheck"></a>
|
||||||
|
<b>get <name> configCheck </b> <br>
|
||||||
|
<ul>
|
||||||
|
A number of key settings are reviewed and recommendations are made if potential improvements are identified.
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<li>
|
||||||
<a id="DbLog-get-ReadingsMaxVal" data-pattern="ReadingsMaxVal.*"></a>
|
<a id="DbLog-get-ReadingsMaxVal" data-pattern="ReadingsMaxVal.*"></a>
|
||||||
<li><b>get <name> ReadingsMaxVal[Timestamp] <Device> <Reading> <default> </b>
|
<b>get <name> ReadingsMaxVal[Timestamp] <Device> <Reading> <default> </b>
|
||||||
<br>
|
<br>
|
||||||
<ul>
|
<ul>
|
||||||
Determines the record with the largest value of the specified Device / Reading combination from the history table. <br>
|
Determines the record with the largest value of the specified Device / Reading combination from the history table. <br>
|
||||||
@ -9160,8 +9210,9 @@ return;
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>
|
||||||
<a id="DbLog-get-ReadingsMinVal" data-pattern="ReadingsMinVal.*"></a>
|
<a id="DbLog-get-ReadingsMinVal" data-pattern="ReadingsMinVal.*"></a>
|
||||||
<li><b>get <name> ReadingsMinVal[Timestamp] <Device> <Reading> <default> </b>
|
<b>get <name> ReadingsMinVal[Timestamp] <Device> <Reading> <default> </b>
|
||||||
<br>
|
<br>
|
||||||
<ul>
|
<ul>
|
||||||
Determines the record with the smallest value of the specified device / reading combination from the history table. <br>
|
Determines the record with the smallest value of the specified device / reading combination from the history table. <br>
|
||||||
@ -9180,8 +9231,9 @@ return;
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>
|
||||||
<a id="DbLog-get-ReadingsAvgVal"></a>
|
<a id="DbLog-get-ReadingsAvgVal"></a>
|
||||||
<li><b>get <name> ReadingsAvgVal <Device> <Reading> <default> </b>
|
<b>get <name> ReadingsAvgVal <Device> <Reading> <default> </b>
|
||||||
<br>
|
<br>
|
||||||
<ul>
|
<ul>
|
||||||
Determines the average value of the specified Device / Reading combination from the history table. <br>
|
Determines the average value of the specified Device / Reading combination from the history table. <br>
|
||||||
@ -9199,8 +9251,9 @@ return;
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>
|
||||||
<a id="DbLog-get-ReadingsVal" data-pattern="ReadingsVal.*"></a>
|
<a id="DbLog-get-ReadingsVal" data-pattern="ReadingsVal.*"></a>
|
||||||
<li><b>get <name> ReadingsVal[Timestamp] <Device> <Reading> <default> </b>
|
<b>get <name> ReadingsVal[Timestamp] <Device> <Reading> <default> </b>
|
||||||
<br>
|
<br>
|
||||||
<ul>
|
<ul>
|
||||||
Reads the last (newest) record stored in the history table of the specified Device / Reading
|
Reads the last (newest) record stored in the history table of the specified Device / Reading
|
||||||
@ -9220,8 +9273,9 @@ return;
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>
|
||||||
<a id="DbLog-get-ReadingsTimestamp"></a>
|
<a id="DbLog-get-ReadingsTimestamp"></a>
|
||||||
<li><b>get <name> ReadingsTimestamp <Device> <Reading> <default> </b>
|
<b>get <name> ReadingsTimestamp <Device> <Reading> <default> </b>
|
||||||
<br>
|
<br>
|
||||||
<ul>
|
<ul>
|
||||||
Reads the timestamp of the last (newest) record stored in the history table of the specified
|
Reads the timestamp of the last (newest) record stored in the history table of the specified
|
||||||
@ -9239,8 +9293,9 @@ return;
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>
|
||||||
<a id="DbLog-get-retrieve"></a>
|
<a id="DbLog-get-retrieve"></a>
|
||||||
<li><b>get <name> retrieve <querytype> <device|table> <reading> <from> <to> <offset> <limit> </b>
|
<b>get <name> retrieve <querytype> <device|table> <reading> <from> <to> <offset> <limit> </b>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@ -10670,7 +10725,7 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
|
|
||||||
Nachdem das DbLog-Device definiert wurde, ist empfohlen einen <b>Konfigurationscheck</b> auszuführen: <br><br>
|
Nachdem das DbLog-Device definiert wurde, ist empfohlen einen <b>Konfigurationscheck</b> auszuführen: <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
<code>set <name> configCheck</code> <br>
|
<code>get <name> configCheck</code> <br>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
Dieser Check prüft einige wichtige Einstellungen des DbLog-Devices und gibt Empfehlungen für potentielle Verbesserungen.
|
Dieser Check prüft einige wichtige Einstellungen des DbLog-Devices und gibt Empfehlungen für potentielle Verbesserungen.
|
||||||
@ -10712,7 +10767,7 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li> Wurden die vorbereitenden Schritte gemacht, die in der commandref beschrieben sind ? (Softwarekomponenten installieren, Tabellen, Index anlegen) </li>
|
<li> Wurden die vorbereitenden Schritte gemacht, die in der commandref beschrieben sind ? (Softwarekomponenten installieren, Tabellen, Index anlegen) </li>
|
||||||
<li> Wurde ein "set <name> configCheck" nach dem Define durchgeführt und eventuelle Fehler beseitigt bzw. Empfehlungen umgesetzt ? </li>
|
<li> Wurde ein "get <name> configCheck" nach dem Define durchgeführt und eventuelle Fehler beseitigt bzw. Empfehlungen umgesetzt ? </li>
|
||||||
<li> Falls configDB in Benutzung ... wurde das DB-Konfigurationsfile in configDB importiert (z.B. mit "configDB fileimport ./db.conf") ? </li>
|
<li> Falls configDB in Benutzung ... wurde das DB-Konfigurationsfile in configDB importiert (z.B. mit "configDB fileimport ./db.conf") ? </li>
|
||||||
<li> Beim Anlegen eines SVG-Plots erscheint keine Drop-Down Liste mit Vorschlagswerten -> Attribut "DbLogType" auf "Current/History" setzen. </li>
|
<li> Beim Anlegen eines SVG-Plots erscheint keine Drop-Down Liste mit Vorschlagswerten -> Attribut "DbLogType" auf "Current/History" setzen. </li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -10721,7 +10776,7 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
Sollten diese Hinweise nicht zum Erfolg führen, bitte den verbose-Level im DbLog Device auf 4 oder 5 hochsetzen und
|
Sollten diese Hinweise nicht zum Erfolg führen, bitte den verbose-Level im DbLog Device auf 4 oder 5 hochsetzen und
|
||||||
die Einträge bezüglich des DbLog-Device im Logfile beachten.
|
die Einträge bezüglich des DbLog-Device im Logfile beachten.
|
||||||
|
|
||||||
Zur Problemanalyse bitte die Ausgabe von "list <name>", das Ergebnis von "set <name> configCheck" und die
|
Zur Problemanalyse bitte die Ausgabe von "list <name>", das Ergebnis von "get <name> configCheck" und die
|
||||||
Ausgaben des DbLog-Device im Logfile im Forumthread posten.
|
Ausgaben des DbLog-Device im Logfile im Forumthread posten.
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
@ -10735,7 +10790,9 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>set <name> addCacheLine YYYY-MM-DD HH:MM:SS|<device>|<type>|<event>|<reading>|<value>|[<unit>] </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-addCacheLine"></a>
|
||||||
|
<b>set <name> addCacheLine YYYY-MM-DD HH:MM:SS|<device>|<type>|<event>|<reading>|<value>|[<unit>] </b> <br><br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
Im asynchronen Modus wird ein neuer Datensatz in den Cache eingefügt und beim nächsten Synclauf mit abgearbeitet.
|
Im asynchronen Modus wird ein neuer Datensatz in den Cache eingefügt und beim nächsten Synclauf mit abgearbeitet.
|
||||||
@ -10747,7 +10804,9 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> addLog <devspec>:<Reading> [Value] [CN=<caller name>] [!useExcludes] </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-addLog"></a>
|
||||||
|
<b>set <name> addLog <devspec>:<Reading> [Value] [CN=<caller name>] [!useExcludes] </b> <br><br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
Fügt einen zusätzlichen Logeintrag einer Device/Reading-Kombination in die Datenbank ein. <br>
|
Fügt einen zusätzlichen Logeintrag einer Device/Reading-Kombination in die Datenbank ein. <br>
|
||||||
@ -10798,7 +10857,9 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> clearReadings </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-clearReadings"></a>
|
||||||
|
<b>set <name> clearReadings </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Leert Readings die von verschiedenen DbLog-Funktionen angelegt wurden.
|
Leert Readings die von verschiedenen DbLog-Funktionen angelegt wurden.
|
||||||
|
|
||||||
@ -10806,32 +10867,40 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> eraseReadings </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-eraseReadings"></a>
|
||||||
|
<b>set <name> eraseReadings </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Löscht alle Readings außer dem Reading "state".
|
Löscht alle Readings außer dem Reading "state".
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> commitCache </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-commitCache"></a>
|
||||||
|
<b>set <name> commitCache </b> <br><br>
|
||||||
|
<ul>
|
||||||
|
Im asynchronen Modus (<a href="#DbLog-attr-asyncMode">asyncMode=1</a>), werden die im Cache gespeicherten
|
||||||
|
Daten in die Datenbank geschrieben und danach der Cache geleert. <br>
|
||||||
|
Der interne Timer des asynchronen Modus wird dabei neu gesetzt.
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a id="DbLog-set-configCheck"></a>
|
||||||
|
<b>set <name> configCheck </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Im asynchronen Modus (<a href="#DbLog-attr-asyncMode">asyncMode=1</a>), werden die im Speicher zwischengespeicherten
|
Es werden einige wichtige Einstellungen geprüft und Empfehlungen gegeben falls potentielle Verbesserungen
|
||||||
Daten in die Datenbank geschrieben und danach der Cache geleert. Der interne Timer des asynchronen Modus wird dabei
|
identifiziert wurden. <br>
|
||||||
neu gesetzt.
|
(<b>Hinweis:</b> Dieser Befehl ist abgekündigt und wird in den nächsten Versionen entfernt werden. Verwenden Sie stattdessen "get <name> configCheck".)
|
||||||
Der Befehl kann nützlich sein um manuell, oder z.B. über ein AT, den Cacheinhalt zu einem definierten Zeitpunkt in die
|
|
||||||
Datenbank zu schreiben.
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> configCheck </b> <br><br>
|
<li>
|
||||||
<ul>Es werden einige wichtige Einstellungen geprüft und Empfehlungen gegeben falls potentielle Verbesserungen
|
<a id="DbLog-set-count"></a>
|
||||||
identifiziert wurden.
|
<b>set <name> count </b> <br><br>
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<li><b>set <name> count </b> <br><br>
|
|
||||||
<ul>
|
<ul>
|
||||||
Ermittelt die Anzahl der Datensätze in den Tabellen current und history und schreibt die Ergebnisse in die Readings
|
Ermittelt die Anzahl der Datensätze in den Tabellen current und history und schreibt die Ergebnisse in die Readings
|
||||||
countCurrent und countHistory.
|
countCurrent und countHistory.
|
||||||
@ -10844,14 +10913,18 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> countNbl </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-countNbl"></a>
|
||||||
|
<b>set <name> countNbl </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Die Funktion ist identisch zu "set <name> count" und wird demnächst entfernt.
|
Die Funktion ist identisch zu "set <name> count" und wird demnächst entfernt.
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> deleteOldDays <n> </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-deleteOldDays"></a>
|
||||||
|
<b>set <name> deleteOldDays <n> </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Löscht Datensätze älter als <n> Tage in Tabelle history.
|
Löscht Datensätze älter als <n> Tage in Tabelle history.
|
||||||
Die Anzahl der gelöschten Datensätze wird im Reading lastRowsDeleted protokolliert.
|
Die Anzahl der gelöschten Datensätze wird im Reading lastRowsDeleted protokolliert.
|
||||||
@ -10864,7 +10937,9 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> deleteOldDaysNbl <n> </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-deleteOldDaysNbl"></a>
|
||||||
|
<b>set <name> deleteOldDaysNbl <n> </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Die Funktion ist identisch zu "set <name> deleteOldDays" und wird demnächst entfernt.
|
Die Funktion ist identisch zu "set <name> deleteOldDays" und wird demnächst entfernt.
|
||||||
<br>
|
<br>
|
||||||
@ -10872,8 +10947,9 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<li>
|
||||||
<a id="DbLog-set-exportCache"></a>
|
<a id="DbLog-set-exportCache"></a>
|
||||||
<li><b>set <name> exportCache [nopurge | purgecache] </b> <br><br>
|
<b>set <name> exportCache [nopurge | purgecache] </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Wenn DbLog im asynchronen Modus betrieben wird, kann der Cache mit diesem Befehl in ein Textfile geschrieben
|
Wenn DbLog im asynchronen Modus betrieben wird, kann der Cache mit diesem Befehl in ein Textfile geschrieben
|
||||||
werden. <br>
|
werden. <br>
|
||||||
@ -10894,7 +10970,9 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> importCachefile <file> </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-importCachefile"></a>
|
||||||
|
<b>set <name> importCachefile <file> </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Importiert ein mit "exportCache" geschriebenes File in die Datenbank. <br>
|
Importiert ein mit "exportCache" geschriebenes File in die Datenbank. <br>
|
||||||
Die verfügbaren Dateien werden per Default im Verzeichnis (global->modpath)/log/ gesucht und eine Drop-Down Liste
|
Die verfügbaren Dateien werden per Default im Verzeichnis (global->modpath)/log/ gesucht und eine Drop-Down Liste
|
||||||
@ -10918,14 +10996,18 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> listCache </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-listCache"></a>
|
||||||
|
<b>set <name> listCache </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Listet die im Memory Cache zwischengespeicherten Daten auf.
|
Listet die im Memory Cache zwischengespeicherten Daten auf.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> purgeCache </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-purgeCache"></a>
|
||||||
|
<b>set <name> purgeCache </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Im asynchronen Modus (<a href="#DbLog-attr-asyncMode">asyncMode=1</a>), werden die im Speicher zwischengespeicherten
|
Im asynchronen Modus (<a href="#DbLog-attr-asyncMode">asyncMode=1</a>), werden die im Speicher zwischengespeicherten
|
||||||
Daten gelöscht.
|
Daten gelöscht.
|
||||||
@ -10934,7 +11016,9 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> reduceLog <no>[:<nn>] [average[=day]] [exclude=device1:reading1,device2:reading2,...] </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-reduceLog"></a>
|
||||||
|
<b>set <name> reduceLog <no>[:<nn>] [average[=day]] [exclude=device1:reading1,device2:reading2,...] </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Reduziert historische Datensätze, die älter sind als <no> Tage und (optional) neuer sind als <nn> Tage
|
Reduziert historische Datensätze, die älter sind als <no> Tage und (optional) neuer sind als <nn> Tage
|
||||||
auf einen Eintrag (den ersten) pro Stunde je Device & Reading.<br>
|
auf einen Eintrag (den ersten) pro Stunde je Device & Reading.<br>
|
||||||
@ -10963,27 +11047,31 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> reduceLogNbl <no>[:<nn>] [average[=day]] [exclude=device1:reading1,device2:reading2,...] </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-reduceLogNbl"></a>
|
||||||
|
<b>set <name> reduceLogNbl <no>[:<nn>] [average[=day]] [exclude=device1:reading1,device2:reading2,...] </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Die Funktion ist identisch zu "set <name> reduceLog" und wird demnächst entfernt.
|
Die Funktion ist identisch zu "set <name> reduceLog" und wird demnächst entfernt.
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> reopen [n] </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-reopen"></a>
|
||||||
|
<b>set <name> reopen [n] </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Schließt die Datenbank und öffnet sie danach sofort wieder wenn keine Zeit [n] in Sekunden angegeben wurde.
|
Schließt die Datenbank und öffnet sie danach sofort wieder wenn keine Zeit [n] in Sekunden angegeben wurde. <br>
|
||||||
Dabei wird die Journaldatei geleert und neu angelegt. <br>
|
Wurde eine optionale Verzögerungszeit [n] in Sekunden angegeben, wird die Verbindung zur Datenbank geschlossen und
|
||||||
Verbessert den Datendurchsatz und vermeidet Speicherplatzprobleme. <br>
|
erst nach Ablauf von [n] Sekunden wieder neu verbunden. <br>
|
||||||
Wurde eine optionale Verzögerungszeit [n] in Sekunden angegeben, wird die Verbindung zur Datenbank geschlossen und erst
|
Während der Zeit der Datenbankschließung werden zu loggende Events im Memory Cache gespeichert und nach dem
|
||||||
nach Ablauf von [n] Sekunden wieder neu verbunden.
|
Reconnect in die Datenbank geschrieben.
|
||||||
Im synchronen Modus werden die Events in dieser Zeit nicht gespeichert.
|
|
||||||
Im asynchronen Modus werden die Events im Cache gespeichert und nach dem Reconnect in die Datenbank geschrieben.
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> rereadcfg </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-rereadcfg"></a>
|
||||||
|
<b>set <name> rereadcfg </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Die Konfigurationsdatei wird neu eingelesen. <br>
|
Die Konfigurationsdatei wird neu eingelesen. <br>
|
||||||
Nach dem Einlesen wird eine bestehende Datenbankverbindung beendet und mit den konfigurierten Verbindungsdaten
|
Nach dem Einlesen wird eine bestehende Datenbankverbindung beendet und mit den konfigurierten Verbindungsdaten
|
||||||
@ -10992,8 +11080,9 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<li>
|
||||||
<a id="DbLog-set-stopSubProcess"></a>
|
<a id="DbLog-set-stopSubProcess"></a>
|
||||||
<li><b>set <name> stopSubProcess </b> <br><br>
|
<b>set <name> stopSubProcess </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Ein laufender SubProzess wird beendet. <br>
|
Ein laufender SubProzess wird beendet. <br>
|
||||||
Sobald durch eine Operation ein neuer SubProzess benötigt wird, erfolgt die automatische Neuinitialisierung
|
Sobald durch eine Operation ein neuer SubProzess benötigt wird, erfolgt die automatische Neuinitialisierung
|
||||||
@ -11007,7 +11096,9 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<li><b>set <name> userCommand <validSelectStatement> </b> <br><br>
|
<li>
|
||||||
|
<a id="DbLog-set-userCommand"></a>
|
||||||
|
<b>set <name> userCommand <validSelectStatement> </b> <br><br>
|
||||||
<ul>
|
<ul>
|
||||||
Führt einfache SQL Select Befehle auf der Datenbank aus. <br>
|
Führt einfache SQL Select Befehle auf der Datenbank aus. <br>
|
||||||
Das Ergebnis des Statements wird in das Reading "userCommandResult" geschrieben.
|
Das Ergebnis des Statements wird in das Reading "userCommandResult" geschrieben.
|
||||||
@ -11029,10 +11120,21 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
<b>Get</b>
|
<b>Get</b>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a id="DbLog-get-configCheck"></a>
|
||||||
|
<b>get <name> configCheck </b> <br>
|
||||||
|
<ul>
|
||||||
|
Es werden einige wichtige Einstellungen geprüft und Empfehlungen gegeben falls potentielle Verbesserungen
|
||||||
|
identifiziert wurden.
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<li>
|
||||||
<a id="DbLog-get-ReadingsMaxVal" data-pattern="ReadingsMaxVal.*"></a>
|
<a id="DbLog-get-ReadingsMaxVal" data-pattern="ReadingsMaxVal.*"></a>
|
||||||
<li><b>get <name> ReadingsMaxVal[Timestamp] <Device> <Reading> <default> </b>
|
<b>get <name> ReadingsMaxVal[Timestamp] <Device> <Reading> <default> </b>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@ -11053,8 +11155,9 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>
|
||||||
<a id="DbLog-get-ReadingsMinVal" data-pattern="ReadingsMinVal.*"></a>
|
<a id="DbLog-get-ReadingsMinVal" data-pattern="ReadingsMinVal.*"></a>
|
||||||
<li><b>get <name> ReadingsMinVal[Timestamp] <Device> <Reading> <default> </b>
|
<b>get <name> ReadingsMinVal[Timestamp] <Device> <Reading> <default> </b>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@ -11075,8 +11178,9 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>
|
||||||
<a id="DbLog-get-ReadingsAvgVal"></a>
|
<a id="DbLog-get-ReadingsAvgVal"></a>
|
||||||
<li><b>get <name> ReadingsAvgVal <Device> <Reading> <default> </b>
|
<b>get <name> ReadingsAvgVal <Device> <Reading> <default> </b>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@ -11096,8 +11200,9 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>
|
||||||
<a id="DbLog-get-ReadingsVal" data-pattern="ReadingsVal.*"></a>
|
<a id="DbLog-get-ReadingsVal" data-pattern="ReadingsVal.*"></a>
|
||||||
<li><b>get <name> ReadingsVal[Timestamp] <Device> <Reading> <default> </b>
|
<b>get <name> ReadingsVal[Timestamp] <Device> <Reading> <default> </b>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@ -11119,8 +11224,9 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>
|
||||||
<a id="DbLog-get-ReadingsTimestamp"></a>
|
<a id="DbLog-get-ReadingsTimestamp"></a>
|
||||||
<li><b>get <name> ReadingsTimestamp <Device> <Reading> <default> </b>
|
<b>get <name> ReadingsTimestamp <Device> <Reading> <default> </b>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@ -11140,8 +11246,9 @@ attr SMA_Energymeter DbLogValueFn
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>
|
||||||
<a id="DbLog-get-retrieve"></a>
|
<a id="DbLog-get-retrieve"></a>
|
||||||
<li><b>get <name> retrieve <querytype> <device|table> <reading> <from> <to> <offset> <limit> </b>
|
<b>get <name> retrieve <querytype> <device|table> <reading> <from> <to> <offset> <limit> </b>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user