From b55109e5b694c751d5fbc10635ce7744d9e830d8 Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Tue, 4 Jul 2017 16:58:21 +0000 Subject: [PATCH] 93_DbLog: V2.18.3, cannot load V2.18.2, new internal 'model' git-svn-id: https://svn.fhem.de/fhem/trunk@14642 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/93_DbLog.pm | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index aa66a8e9c..b7bd5ff47 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 93_DbLog: V2.18.3, cannot load V2.18.2, new internal 'model' - bugfix: list: do not change the upper casing of hashes (Forum #73828) - bugfix: 71_YAMAHA_NP: Prevent directPlay from starting netradio stream several times in slow internet connections diff --git a/fhem/FHEM/93_DbLog.pm b/fhem/FHEM/93_DbLog.pm index 905b759f3..3b25e1cd7 100644 --- a/fhem/FHEM/93_DbLog.pm +++ b/fhem/FHEM/93_DbLog.pm @@ -16,6 +16,7 @@ ############################################################################################################################################ # Versions History done by DS_Starter & DeeSPe: # +# 2.18.3 04.07.2017 bugfix (links with $FW_ME deleted), MODEL as Internal (for statistic) # 2.18.2 29.06.2017 check of index for DbRep added # 2.18.1 25.06.2017 DbLog_configCheck/ DbLog_sqlget some changes, commandref revised # 2.18.0 24.06.2017 configCheck added (MySQL, PostgreSQL) @@ -135,7 +136,7 @@ use Blocking; use Time::HiRes qw(gettimeofday tv_interval); use Encode qw(encode_utf8); -my $DbLogVersion = "2.18.2"; +my $DbLogVersion = "2.18.3"; my %columns = ("DEVICE" => 64, "TYPE" => 64, @@ -2094,6 +2095,8 @@ sub DbLog_readCfg($){ Log3 $hash->{NAME}, 3, "Only Mysql, Postgresql, Oracle, SQLite are fully supported."; Log3 $hash->{NAME}, 3, "It may cause SQL-Erros during generating plots."; } + + $hash->{MODEL} = $hash->{DBMODEL}; # used in FHEM statistics if($hash->{DBMODEL} eq "MYSQL") { $hash->{UTF8} = defined($dbconfig{utf8})?$dbconfig{utf8}:0; @@ -2797,7 +2800,7 @@ sub DbLog_configcheck($) { } else { $rec = "Switch $name to the asynchronous logmode by setting the 'asyncMode' attribute. The advantage of this mode is to log events non-blocking.
"; $rec .= "There are attributes 'syncInterval' and 'cacheLimit' relevant for this working mode.
"; - $rec .= "Please refer to Commandref attributes for further informations. "; + $rec .= "Please refer to Commandref attributes for further informations."; } $check .= "Recommendation: $rec

"; @@ -2853,15 +2856,15 @@ sub DbLog_configcheck($) { $rec .= "TYPE: $columns{TYPE}
"; $rec .= "EVENT: $columns{EVENT}
"; $rec .= "READING: $columns{READING}
"; - $rec .= "UNIT: $columns{UNIT}
"; - $rec .= "DEVICE: $columns{DEVICE}

"; + $rec .= "VALUE: $columns{VALUE}
"; + $rec .= "UNIT: $columns{UNIT}

"; $rec .= "You can change the column width in database by a statement like 'alter table history modify VALUE varchar(128);' (example for changing field 'VALUE'). "; $rec .= "You can do it for example by executing 'sqlCMD' in DbRep or in a SQL-Editor of your choice. (switch $name to asynchron mode for non-blocking).
"; - $rec .= "The field width used by the module can be done by setting attributes 'colEvent', 'colReading', 'colValue',"; + $rec .= "The field width used by the module can be done by setting attributes 'colEvent', 'colReading', 'colValue',"; } $check .= "Result of table 'history' check

"; - $check .= "Column width set in $dbname: 'DEVICE' = $cdat_dev, 'TYPE' = $cdat_typ, 'EVENT' = $cdat_evt, 'READING' = $cdat_rdg, 'VALUE' = $cdat_val, 'UNIT' = $cdat_unt
"; + $check .= "Column width set in DB $dbname: 'DEVICE' = $cdat_dev, 'TYPE' = $cdat_typ, 'EVENT' = $cdat_evt, 'READING' = $cdat_rdg, 'VALUE' = $cdat_val, 'UNIT' = $cdat_unt
"; $check .= "Column width used by $name: 'DEVICE' = $cmod_dev, 'TYPE' = $cmod_typ, 'EVENT' = $cmod_evt, 'READING' = $cmod_rdg, 'VALUE' = $cmod_val, 'UNIT' = $cmod_unt
"; $check .= "Recommendation: $rec

"; @@ -2914,15 +2917,15 @@ sub DbLog_configcheck($) { $rec .= "TYPE: $columns{TYPE}
"; $rec .= "EVENT: $columns{EVENT}
"; $rec .= "READING: $columns{READING}
"; - $rec .= "UNIT: $columns{UNIT}
"; - $rec .= "DEVICE: $columns{DEVICE}

"; + $rec .= "VALUE: $columns{VALUE}
"; + $rec .= "UNIT: $columns{UNIT}

"; $rec .= "You can change the column width in database by a statement like 'alter table current modify VALUE varchar(128);' (example for changing field 'VALUE'). "; $rec .= "You can do it for example by executing 'sqlCMD' in DbRep or in a SQL-Editor of your choice. (switch $name to asynchron mode for non-blocking).
"; - $rec .= "The field width used by the module can be done by setting attributes 'colEvent', 'colReading', 'colValue',"; + $rec .= "The field width used by the module can be done by setting attributes 'colEvent', 'colReading', 'colValue',"; } $check .= "Result of table 'current' check

"; - $check .= "Column width set in $dbname: 'DEVICE' = $cdat_dev, 'TYPE' = $cdat_typ, 'EVENT' = $cdat_evt, 'READING' = $cdat_rdg, 'VALUE' = $cdat_val, 'UNIT' = $cdat_unt
"; + $check .= "Column width set in DB $dbname: 'DEVICE' = $cdat_dev, 'TYPE' = $cdat_typ, 'EVENT' = $cdat_evt, 'READING' = $cdat_rdg, 'VALUE' = $cdat_val, 'UNIT' = $cdat_unt
"; $check .= "Column width used by $name: 'DEVICE' = $cmod_dev, 'TYPE' = $cmod_typ, 'EVENT' = $cmod_evt, 'READING' = $cmod_rdg, 'VALUE' = $cmod_val, 'UNIT' = $cmod_unt
"; $check .= "Recommendation: $rec

";