From f9388fb682a8df56a189d84decd479d905e0613b Mon Sep 17 00:00:00 2001 From: dietmar63 <> Date: Mon, 6 Jul 2015 17:34:34 +0000 Subject: [PATCH] 98_RandomTimer: added a better return code to find PERL WARNING "IO::Socket::INET: connect: No route to host" http://forum.fhem.de/index.php/topic,14010.msg309471.html#msg309471 git-svn-id: https://svn.fhem.de/fhem/trunk@8906 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_RandomTimer.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fhem/FHEM/98_RandomTimer.pm b/fhem/FHEM/98_RandomTimer.pm index 6b18cb5c2..04d8ec58e 100644 --- a/fhem/FHEM/98_RandomTimer.pm +++ b/fhem/FHEM/98_RandomTimer.pm @@ -166,7 +166,7 @@ sub RandomTimer_Exec($) { Log3 $hash, 3, "[".$hash->{NAME}."]"." ending RandomTimer on $hash->{DEVICE}: " . strftime("%H:%M:%S(%d)",localtime($hash->{startTime})) . " - " . strftime("%H:%M:%S(%d)",localtime($hash->{stopTime})); - RandomTimer_down($hash); + #RandomTimer_down($hash); RandomTimer_setState($hash); $hash->{active} = 0; } @@ -395,19 +395,19 @@ sub RandomTimer_device_switch ($) Log3 $hash, 4, "[".$hash->{NAME}. "]"." command: $command"; my $ret = AnalyzeCommandChain(undef, $command); - Log3 ($hash, 3, $ret) if($ret) + Log3 ($hash, 3, "[$hash->{NAME}] ERROR: " . $ret . " SENDING " . $command) if($ret) } ######################################################################## sub RandomTimer_isDisabled($) { my ($hash) = @_; - + my $disable = AttrVal($hash->{NAME}, "disable", 0 ); my $disableCond = AttrVal($hash->{NAME}, "disableCond", ""); $disable = $disable || eval ($disableCond); if ($@) { $@ =~ s/\n/ /g; - Log3 ($hash, 3, "[$hash->{NAME}] " . $@); + Log3 ($hash, 3, "[$hash->{NAME}] ERROR: " . $@ . " EVALUATING " . $disableCond); } $disable = 0 if (!defined($disable));