From 4b3dc4ad84b811efc6732eff2d746c809cc3c032 Mon Sep 17 00:00:00 2001 From: markusbloch <> Date: Wed, 4 Oct 2017 16:26:36 +0000 Subject: [PATCH] PRESENCE: show error message in case of aborted BlockingCall (Forum: #76002) git-svn-id: https://svn.fhem.de/fhem/trunk@15194 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/73_PRESENCE.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fhem/FHEM/73_PRESENCE.pm b/fhem/FHEM/73_PRESENCE.pm index 7d7be08db..75233ef47 100755 --- a/fhem/FHEM/73_PRESENCE.pm +++ b/fhem/FHEM/73_PRESENCE.pm @@ -1140,7 +1140,7 @@ sub PRESENCE_ProcessLocalScan($) sub PRESENCE_ProcessAbortedScan($) { - my ($hash) = @_; + my ($hash, $msg) = @_; my $name = $hash->{NAME}; delete($hash->{helper}{RUNNING_PID}); RemoveInternalTimer($hash); @@ -1149,13 +1149,13 @@ sub PRESENCE_ProcessAbortedScan($) { if($hash->{helper}{RETRY_COUNT} >= 3) { - Log3 $hash->{NAME}, 2, "PRESENCE ($name) - device could not be checked after ".$hash->{helper}{RETRY_COUNT}." ".($hash->{helper}{RETRY_COUNT} > 1 ? "retries" : "retry"). " (resuming normal operation)" if($hash->{helper}{RETRY_COUNT} == 3); + Log3 $hash->{NAME}, 2, "PRESENCE ($name) - device could not be checked after ".$hash->{helper}{RETRY_COUNT}." ".($hash->{helper}{RETRY_COUNT} > 1 ? "retries" : "retry"). " (resuming normal operation): $msg" if($hash->{helper}{RETRY_COUNT} == 3); InternalTimer(gettimeofday()+10, "PRESENCE_StartLocalScan", $hash, 0) unless($hash->{helper}{DISABLED}); $hash->{helper}{RETRY_COUNT}++; } else { - Log3 $hash->{NAME}, 2, "PRESENCE ($name) - device could not be checked after ".$hash->{helper}{RETRY_COUNT}." ".($hash->{helper}{RETRY_COUNT} > 1 ? "retries" : "retry")." (retrying in 10 seconds)"; + Log3 $hash->{NAME}, 2, "PRESENCE ($name) - device could not be checked after ".$hash->{helper}{RETRY_COUNT}." ".($hash->{helper}{RETRY_COUNT} > 1 ? "retries" : "retry")." (retrying in 10 seconds): $msg"; InternalTimer(gettimeofday()+10, "PRESENCE_StartLocalScan", $hash, 0) unless($hash->{helper}{DISABLED}); $hash->{helper}{RETRY_COUNT}++; } @@ -1164,7 +1164,7 @@ sub PRESENCE_ProcessAbortedScan($) { $hash->{helper}{RETRY_COUNT} = 1; InternalTimer(gettimeofday()+10, "PRESENCE_StartLocalScan", $hash, 0) unless($hash->{helper}{DISABLED}); - Log3 $hash->{NAME}, 2, "PRESENCE ($name) - device could not be checked (retrying in 10 seconds)" + Log3 $hash->{NAME}, 2, "PRESENCE ($name) - device could not be checked (retrying in 10 seconds): $msg" } readingsSingleUpdate($hash, "state", "timeout",1);