mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-01 07:19:24 +00:00
70_PIONEERAVR.pm: bugfix reading input names
git-svn-id: https://svn.fhem.de/fhem/trunk@7194 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
27920f0dd7
commit
0fa28ca954
@ -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++ ) {
|
||||
|
Loading…
Reference in New Issue
Block a user