From a0356d1f436ea079c7ff7511bffde6b8c861b89d Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Mon, 9 Oct 2017 19:53:47 +0000 Subject: [PATCH] 93_DbLog: V2.22.10, adapted to use extended abortArg git-svn-id: https://svn.fhem.de/fhem/trunk@15220 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/93_DbLog.pm | 33 ++++++++++++++++++++++++--------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index f42f39427..8cd90b269 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: V2.22.10, adapted to use extended abortArg - change: 76_SMAInverter: V2.9.2, adapted to use extended abortArg - feature: 77_UWZ: add new sortby creation and add Italia Maps - feature: 49_SSCam: V3.2.3, new optimizeParams command to set cam properties diff --git a/fhem/FHEM/93_DbLog.pm b/fhem/FHEM/93_DbLog.pm index 55734791a..2ab213525 100644 --- a/fhem/FHEM/93_DbLog.pm +++ b/fhem/FHEM/93_DbLog.pm @@ -16,6 +16,8 @@ ############################################################################################################################################ # Versions History done by DS_Starter & DeeSPe: # +# 2.22.10 04.10.2017 Encode::encode_utf8 of $error, DbLog_PushAsyncAborted adapted to use abortArg (Forum:77472) +# 2.22.9 04.10.2017 added hint to SVG/DbRep in commandref # 2.22.8 29.09.2017 avoid multiple entries in Dopdown-list when creating SVG by group Device:Reading in DbLog_sampleDataFn # 2.22.7 24.09.2017 minor fixes in configcheck # 2.22.6 22.09.2017 commandref revised @@ -152,7 +154,7 @@ use Blocking; use Time::HiRes qw(gettimeofday tv_interval); use Encode qw(encode_utf8); -my $DbLogVersion = "2.22.8"; +my $DbLogVersion = "2.22.10"; my %columns = ("DEVICE" => 64, "TYPE" => 64, @@ -1554,7 +1556,7 @@ sub DbLog_Push(@) { $dbh->{PrintError} = 1; $dbh->disconnect if ($nh); -return $error; +return Encode::encode_utf8($error); } ################################################################################################# @@ -2019,7 +2021,7 @@ sub DbLog_PushAsyncDone ($) { } if($error) { - readingsSingleUpdate($hash, "state", $error, 1); + readingsSingleUpdate($hash, "state", Encode::encode_utf8($error), 1); } else { readingsSingleUpdate($hash, "state", $state, 0); } @@ -2041,12 +2043,13 @@ return; ############################################################################################# # Abbruchroutine Timeout non-blocking asynchron DbLog_PushAsync ############################################################################################# -sub DbLog_PushAsyncAborted($) { - my ($hash) = @_; +sub DbLog_PushAsyncAborted(@) { + my ($hash,$cause) = @_; my $name = $hash->{NAME}; + $cause = $cause?$cause:"Timeout: process terminated"; - Log3 ($name, 2, "DbLog $name -> $hash->{HELPER}{RUNNING_PID}{fn} timed out"); - readingsSingleUpdate($hash, "state", "Database access timeout", 1); + Log3 ($name, 2, "DbLog $name -> $hash->{HELPER}{RUNNING_PID}{fn} $cause"); + readingsSingleUpdate($hash,"state",$cause, 1); delete $hash->{HELPER}{RUNNING_PID}; } @@ -4622,7 +4625,13 @@ sub checkUsePK ($$){ The module can be downloaded here or from directory ./contrib instead. Further informations and help you can find in the corresponding - Forumthread .

+ Forumthread .


+ + Reporting and Management of DbLog database content

+ 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. +


@@ -5493,7 +5502,13 @@ sub checkUsePK ($$){ Dieses Modul kann hier bzw. aus dem Verzeichnis ./contrib geladen werden. Weitere Informationen und Hilfestellung gibt es im entsprechenden - Forumthread .

+ Forumthread .


+ + Reporting und Management von DbLog-Datenbankinhalten

+ Mit Hilfe SVG können Datenbankinhalte visualisiert werden.
+ Darüber hinaus kann das Modul DbRep genutzt werden um tabellarische + Datenbankauswertungen anzufertigen oder den Datenbankinhalt mit den zur Verfügung stehenden Funktionen zu verwalten. +