From eb288f5602f4a8573d89183fc536dd23044ce0d6 Mon Sep 17 00:00:00 2001 From: markusbloch <> Date: Sat, 10 Nov 2012 23:37:23 +0000 Subject: [PATCH] don't stop the internal timer loop in case of network errors git-svn-id: https://svn.fhem.de/fhem/trunk@2107 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/71_YAMAHA_AVR.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fhem/FHEM/71_YAMAHA_AVR.pm b/fhem/FHEM/71_YAMAHA_AVR.pm index b42f60ca6..4a840373d 100755 --- a/fhem/FHEM/71_YAMAHA_AVR.pm +++ b/fhem/FHEM/71_YAMAHA_AVR.pm @@ -73,18 +73,18 @@ YAMAHA_AVR_GetStatus($;$) my $name = $hash->{NAME}; my $power; $local = 0 unless(defined($local)); - + return "" if(!defined($hash->{ADDRESS}) or !defined($hash->{INTERVAL})); - + my $device = $hash->{ADDRESS}; - - - + + + if(not defined($hash->{MODEL})) { - getModel($hash, $device); + getModel($hash, $device); } - + if(not defined($hash->{INPUTS}) or length($hash->{INPUTS}) == 0) { getInputs($hash, $device); @@ -99,7 +99,7 @@ YAMAHA_AVR_GetStatus($;$) if($return eq "") { - $hash->{STATE} = "unknown"; + InternalTimer(gettimeofday()+$hash->{INTERVAL}, "YAMAHA_AVR_GetStatus", $hash, 1) unless($local == 1); return; }