mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
stability improvements
git-svn-id: https://svn.fhem.de/fhem/trunk@2104 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
fa167397ea
commit
4d3d49970b
@ -442,6 +442,7 @@ sub getModel($$)
|
|||||||
{
|
{
|
||||||
my ($hash, $address) = @_;
|
my ($hash, $address) = @_;
|
||||||
my $response = GetFileFromURL("http://".$address."/YamahaRemoteControl/desc.xml");
|
my $response = GetFileFromURL("http://".$address."/YamahaRemoteControl/desc.xml");
|
||||||
|
return undef unless(defined($response));
|
||||||
if($response =~ /<Unit_Description.* Unit_Name="(.+?)">/)
|
if($response =~ /<Unit_Description.* Unit_Name="(.+?)">/)
|
||||||
{
|
{
|
||||||
$hash->{MODEL} = $1;
|
$hash->{MODEL} = $1;
|
||||||
@ -453,6 +454,7 @@ sub getInputs($$)
|
|||||||
|
|
||||||
my ($hash, $address) = @_;
|
my ($hash, $address) = @_;
|
||||||
my $response = SendCommand($address, "<YAMAHA_AV cmd=\"GET\"><Main_Zone><Input><Input_Sel_Item>GetParam</Input_Sel_Item></Input></Main_Zone></YAMAHA_AV>");
|
my $response = SendCommand($address, "<YAMAHA_AV cmd=\"GET\"><Main_Zone><Input><Input_Sel_Item>GetParam</Input_Sel_Item></Input></Main_Zone></YAMAHA_AV>");
|
||||||
|
return undef unless (defined($response));
|
||||||
$response =~ s/></>\n</g;
|
$response =~ s/></>\n</g;
|
||||||
my @inputs = split("\n", $response);
|
my @inputs = split("\n", $response);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user