diff --git a/fhem/CHANGED b/fhem/CHANGED
index a59c53cdf..5fd8dab6e 100644
--- a/fhem/CHANGED
+++ b/fhem/CHANGED
@@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
+ - change: 93_DbLog: V3.8.9, commandref revised
- feature: fhem.pl: OldReading* added (Forum #85406)
- feature: 93_DbRep: V7.14.3, minTimestamp - get lowest timestamp in database
- bugfix: 72_FB_CALLLIST: fix broken german umlaut in timestamps on
diff --git a/fhem/FHEM/93_DbLog.pm b/fhem/FHEM/93_DbLog.pm
index 2a21fcbac..39a38c2f1 100644
--- a/fhem/FHEM/93_DbLog.pm
+++ b/fhem/FHEM/93_DbLog.pm
@@ -16,6 +16,7 @@
############################################################################################################################################
# Versions History done by DS_Starter & DeeSPe:
#
+# 3.8.9 10.03.2018 commandref revised
# 3.8.8 05.03.2018 fix device doesn't exit if configuration couldn't be read
# 3.8.7 28.02.2018 changed DbLog_sampleDataFn - no change limits got fron SVG, commandref revised
# 3.8.6 25.02.2018 commandref revised (forum:#84953)
@@ -190,7 +191,7 @@ use Blocking;
use Time::HiRes qw(gettimeofday tv_interval);
use Encode qw(encode_utf8);
-my $DbLogVersion = "3.8.8";
+my $DbLogVersion = "3.8.9";
my %columns = ("DEVICE" => 64,
"TYPE" => 64,
@@ -5092,7 +5093,11 @@ sub dbReadings($@) {
Preparations
At first you need to setup the database.
- Sample code and Scripts to prepare a MySQL/PostgreSQL/SQLite database you can find in contrib/dblog/<DBType>_create.sql
.
+ Sample code and Scripts to prepare a MySQL/PostgreSQL/SQLite database you can find in
+ SVN -> contrib/dblog/db_create_<DBType>.sql.
+ (Caution: The local FHEM-Installation subdirectory ./contrib/dblog doesn't contain the freshest scripts !!)
+
+
The database contains two tables: current
and history
.
The latter contains all events whereas the former only contains the last event for any given reading and device.
Please consider the attribute DbLogType implicitly to determine the usage of tables
@@ -5118,8 +5123,10 @@ sub dbReadings($@) {
create index
Due to reading performance, e.g. on creation of SVG-plots, it is very important that the index "Search_Idx"
- or a comparable index (e.g. a primary key) is applied. A sample code for creation of that index is also available at the mentioned scripts in
- contrib/dblog/<DBType>_create.sql
.
+ or a comparable index (e.g. a primary key) is applied.
+ A sample code for creation of that index is also available in mentioned scripts of
+ SVN -> contrib/dblog/db_create_<DBType>.sql.
+
The index "Search_Idx" can be created, e.g. in database 'fhem', by these statements (also subsequently):
@@ -5235,6 +5242,25 @@ sub dbReadings($@) {
By using SVG database content can be visualized.
Beyond that the module DbRep can be used to prepare tabular
database reports or you can manage the database content with available functions of that module.
+
+
+ Troubleshooting
+ If after successful definition the DbLog-device doesn't work as expected, the following notes may help:
+
+
+
contrib/dblog/<DBType>_create.sql
- enthalten.
+ Beispielcode bzw. Scripts zum Erstellen einer MySQL/PostgreSQL/SQLite Datenbank ist im
+ SVN -> contrib/dblog/db_create_<DBType>.sql
+ enthalten. current
und history
. current
enthält den letzten Stand pro Device und Reading. history
sind alle Events historisch gespeichert. contrib/dblog/<DBType>_create.sql
enthalten.