From 0fa28ca9540299e8fb5c3b5ccb7d95495d5b8a9c Mon Sep 17 00:00:00 2001 From: hofrichter <> Date: Sat, 13 Dec 2014 17:00:46 +0000 Subject: [PATCH] 70_PIONEERAVR.pm: bugfix reading input names git-svn-id: https://svn.fhem.de/fhem/trunk@7194 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/70_PIONEERAVR.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/70_PIONEERAVR.pm b/fhem/FHEM/70_PIONEERAVR.pm index a676601b4..90e514d04 100644 --- a/fhem/FHEM/70_PIONEERAVR.pm +++ b/fhem/FHEM/70_PIONEERAVR.pm @@ -1476,7 +1476,7 @@ sub PIONEERAVR_Reopen($) { } ##################################### # writing to the Pioneer AV receiver -# connection check 3s after writing +# connection check 13s after writing sub PIONEERAVR_Write($$) { my ($hash, $msg) = @_; my $name= $hash->{NAME}; @@ -1486,7 +1486,7 @@ sub PIONEERAVR_Write($$) { DevIo_SimpleWrite($hash, $msg, 0); if (AttrVal($name, "checkConnection", "enable") eq "enable" ) { - my $now3 = gettimeofday()+3; + my $now3 = gettimeofday()+13; if ($hash->{helper}{nextConnectionCheck} > $now3) { $hash->{helper}{nextConnectionCheck} = $now3; RemoveInternalTimer($hash); @@ -1531,6 +1531,7 @@ sub PIONEERAVR_checkConnection ($) { # we got a reply -> connection is good -> restore state Log3 $name, 5, "PIONEERAVR $name: PIONEERAVR_checkConnection() --- state: ".$hash->{STATE}." restored to: ".$state; $hash->{STATE} = $state; + $hash->{PARTIAL} .= $connState; } if (AttrVal($name, "checkConnection", "enable") eq "enable" ) { $hash->{helper}{nextConnectionCheck} = gettimeofday()+120; @@ -1559,6 +1560,10 @@ sub PIONEERAVR_askForInputNames($$) { my $name = $hash->{NAME}; my $comstr = ''; + my $now120 = gettimeofday()+120; + RemoveInternalTimer($hash); + InternalTimer($now120, "PIONEERAVR_checkConnection", $hash, 0); + # we ask for the inputs 1 to 59 if an input name exists (command: ?RGB00 ... ?RGB59) # and if the input is disabled (command: ?SSC0003 ... ?SSC5903) for ( my $i=0; $i<60; $i++ ) {