mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
YAMAHA_AVR: fix return of next scheduled timestamp for statusRequest
git-svn-id: https://svn.fhem.de/fhem/trunk@6517 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
48d922626c
commit
1017a5cce6
@ -115,7 +115,6 @@ YAMAHA_AVR_Get($@)
|
||||
|
||||
if(exists($hash->{READINGS}{$what}))
|
||||
{
|
||||
|
||||
if(defined($hash->{READINGS}{$what}))
|
||||
{
|
||||
return $hash->{READINGS}{$what}{VAL};
|
||||
@ -631,10 +630,8 @@ YAMAHA_AVR_Define($$)
|
||||
{
|
||||
if(defined(YAMAHA_AVR_getParamName($hash, lc $hash->{helper}{SELECTED_ZONE}, $hash->{helper}{ZONES})))
|
||||
{
|
||||
|
||||
$hash->{ACTIVE_ZONE} = lc $hash->{helper}{SELECTED_ZONE};
|
||||
YAMAHA_AVR_getInputs($hash);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -736,7 +733,6 @@ YAMAHA_AVR_SendCommand($@)
|
||||
|
||||
if($blocking == 1)
|
||||
{
|
||||
|
||||
Log3 $name, 5, "YAMAHA_AVR ($name) - execute blocking \"$cmd".(defined($arg) ? " ".(split("\\|", $arg))[0] : "")."\" on $name: $data";
|
||||
my $param = {
|
||||
url => "http://".$address."/YamahaRemoteControl/ctrl",
|
||||
@ -750,8 +746,7 @@ YAMAHA_AVR_SendCommand($@)
|
||||
};
|
||||
|
||||
my ($err, $data) = HttpUtils_BlockingGet($param);
|
||||
return YAMAHA_AVR_ParseResponse($param, $err, $data);
|
||||
|
||||
YAMAHA_AVR_ParseResponse($param, $err, $data);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -777,7 +772,6 @@ YAMAHA_AVR_SendCommand($@)
|
||||
sub
|
||||
YAMAHA_AVR_ParseResponse ($$$)
|
||||
{
|
||||
|
||||
my ( $param, $err, $data ) = @_;
|
||||
|
||||
my $hash = $param->{hash};
|
||||
@ -1247,16 +1241,16 @@ YAMAHA_AVR_ParseXML($$$)
|
||||
}
|
||||
Log3 $name, 4, "YAMAHA_AVR ($name) - adding zone: $2";
|
||||
$hash->{helper}{ZONES} .= $2;
|
||||
|
||||
}
|
||||
|
||||
delete( $hash->{helper}{DSP_MODES}) if(exists($hash->{helper}{DSP_MODES}));
|
||||
|
||||
if($data =~ /<Menu Func_Ex="Surround" Title_1="Surround">.*?<Get>(.+?)<\/Get>/)
|
||||
{
|
||||
|
||||
my $modes = $1;
|
||||
|
||||
Log3 $name, 4, "YAMAHA_AVR ($name) - found DSP modes in XML";
|
||||
|
||||
while($modes =~ /<Direct.*?>(.+?)<\/Direct>/gc)
|
||||
{
|
||||
if(defined($hash->{helper}{DSP_MODES}) and length($hash->{helper}{DSP_MODES}) > 0)
|
||||
@ -1265,7 +1259,6 @@ YAMAHA_AVR_ParseXML($$$)
|
||||
}
|
||||
Log3 $name, 4, "YAMAHA_AVR ($name) - adding DSP mode $1";
|
||||
$hash->{helper}{DSP_MODES} .= $1;
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1290,7 +1283,6 @@ YAMAHA_AVR_ParseXML($$$)
|
||||
Log3 $name, 2, "YAMAHA_AVR ($name) - selected zone >>".$hash->{helper}{SELECTED_ZONE}."<< is not available. Using Main Zone instead";
|
||||
$hash->{ACTIVE_ZONE} = "mainzone";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#############################
|
||||
@ -1317,7 +1309,6 @@ sub YAMAHA_AVR_volume_abs2rel($)
|
||||
# queries all available inputs and scenes
|
||||
sub YAMAHA_AVR_getInputs($)
|
||||
{
|
||||
|
||||
my ($hash) = @_;
|
||||
my $name = $hash->{NAME};
|
||||
my $address = $hash->{helper}{ADDRESS};
|
||||
@ -1356,6 +1347,8 @@ sub YAMAHA_AVR_ResetTimer($;$)
|
||||
InternalTimer(gettimeofday()+$hash->{helper}{OFF_INTERVAL}, "YAMAHA_AVR_GetStatus", $hash, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return undef;
|
||||
}
|
||||
|
||||
#############################
|
||||
|
Loading…
x
Reference in New Issue
Block a user