70_DENON_AVR: fixed multizone bug (thx timmib)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@23027 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
delmar 2020-10-26 08:52:21 +00:00
parent c472984a7a
commit cbd6a1b6b5
3 changed files with 12 additions and 12 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- bugfix: 70_DENON_AVR: fixed multizone bug (thx timmib)
- feature: 49_Arlo: Added 2-factor authentication
- bugfix: 73_AutoShuttersControl: fix IsDay Fn for weekend condition
- fix detected IsDay for Brightness

View File

@ -31,6 +31,7 @@ package main;
use strict;
use warnings;
use DevIo;
use Time::HiRes qw(gettimeofday);
use HttpUtils;
@ -1079,8 +1080,6 @@ DENON_AVR_Initialize($)
Log 5, "DENON_AVR_Initialize: Entering";
require "$attr{global}{modpath}/FHEM/DevIo.pm";
# Provider
$hash->{ReadFn} = "DENON_AVR_Read";
$hash->{WriteFn} = "DENON_AVR_Write";
@ -2367,8 +2366,8 @@ DENON_AVR_Get($@)
}
}
elsif ($a[1] eq "zone")
{
my $return = DENON_AVR_Make_Zone($name."_Zone_".$a[2], $a[2]);
{
my $return = DENON_AVR_Make_Zone($name, $name."_Zone_".$a[2], $a[2]);
DENON_AVR_Command_StatusRequest($hash);
return $return;
}
@ -3719,14 +3718,14 @@ DENON_AVR_SetUsedInputs($$) {
}
#####################################
sub
DENON_AVR_Make_Zone($$) {
my ( $name, $zone ) = @_;
sub
DENON_AVR_Make_Zone($$$) {
my ( $ioname, $name, $zone ) = @_;
if(!defined($defs{$name}))
{
fhem("define $name Denon_AVR_ZONE $zone");
fhem("define $name Denon_AVR_ZONE $zone $ioname");
}
Log3 $name, 3, "DENON_AVR $name: create Denon_AVR_ZONE $zone.";
return "Denon_AVR_ZONE $name created by DENON_AVR";
}

View File

@ -318,10 +318,10 @@ DENON_AVR_ZONE_Define($$$)
{
my ($hash, $a, $h) = @_;
my $name = $hash->{NAME};
return "Usage: define <name> DENON_AVR_ZONE <zone> ... wrong paramter count: ".int(@$a) if(int(@$a) != 3);
return "Usage: define <name> DENON_AVR_ZONE <zone> <iodev> ... wrong paramter count: ".int(@$a) if(int(@$a) != 4);
AssignIoPort($hash, @$a[3]);
AssignIoPort($hash);
my $IOhash = $hash->{IODev};
my $IOname = $IOhash->{NAME};
my $zone;