mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 19:04:20 +00:00
72_FRITZBOX.pm: get <name> tr064Command gehärtet
git-svn-id: https://svn.fhem.de/fhem/trunk@27336 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
bcea6ae060
commit
0b4f783dad
@ -41,7 +41,7 @@ use warnings;
|
|||||||
use Blocking;
|
use Blocking;
|
||||||
use HttpUtils;
|
use HttpUtils;
|
||||||
|
|
||||||
my $ModulVersion = "07.50.9b";
|
my $ModulVersion = "07.50.9c";
|
||||||
my $missingModul = "";
|
my $missingModul = "";
|
||||||
my $missingModulWeb = "";
|
my $missingModulWeb = "";
|
||||||
my $missingModulTR064 = "";
|
my $missingModulTR064 = "";
|
||||||
@ -246,7 +246,7 @@ sub FRITZBOX_Define($$)
|
|||||||
$hash->{NAME} = $name;
|
$hash->{NAME} = $name;
|
||||||
$hash->{VERSION} = $ModulVersion;
|
$hash->{VERSION} = $ModulVersion;
|
||||||
|
|
||||||
$hash->{HOST} = "undefined";
|
$hash->{HOST} = "fritz.box";
|
||||||
$hash->{HOST} = $args[2] if defined $args[2] && $args[2] =~ m=$URL_MATCH=i;
|
$hash->{HOST} = $args[2] if defined $args[2] && $args[2] =~ m=$URL_MATCH=i;
|
||||||
$hash->{fhem}{definedHost} = $hash->{HOST}; # to cope with old attribute definitions
|
$hash->{fhem}{definedHost} = $hash->{HOST}; # to cope with old attribute definitions
|
||||||
|
|
||||||
@ -4501,7 +4501,16 @@ sub FRITZBOX_TR064_Cmd($$$)
|
|||||||
-> uri( "urn:dslforum-org:service:".$service )
|
-> uri( "urn:dslforum-org:service:".$service )
|
||||||
-> proxy('https://'.$host.":".$port."/upnp/control/".$control, ssl_opts => [ SSL_verify_mode => 0 ], timeout => 10 )
|
-> proxy('https://'.$host.":".$port."/upnp/control/".$control, ssl_opts => [ SSL_verify_mode => 0 ], timeout => 10 )
|
||||||
-> readable(1);
|
-> readable(1);
|
||||||
my $res = $soap -> call( $action => @soapParams );
|
|
||||||
|
my $res = eval { $soap -> call( $action => @soapParams )};
|
||||||
|
|
||||||
|
if ($@) {
|
||||||
|
FRITZBOX_Log $hash, 2, "INFO: TR064-PARAM-Error: " . $@;
|
||||||
|
my %errorMsg = ( "Error" => $@ );
|
||||||
|
push @retArray, \%errorMsg;
|
||||||
|
$FRITZBOX_TR064pwd = undef;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
unless( $res ) { # Transport-Error
|
unless( $res ) { # Transport-Error
|
||||||
FRITZBOX_Log $hash, 5, "DEBUG: TR064-Transport-Error: ".$soap->transport->status;
|
FRITZBOX_Log $hash, 5, "DEBUG: TR064-Transport-Error: ".$soap->transport->status;
|
||||||
@ -4530,6 +4539,7 @@ sub FRITZBOX_TR064_Cmd($$$)
|
|||||||
push @retArray, $res->body;
|
push @retArray, $res->body;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@{$cmdArray} = ();
|
@{$cmdArray} = ();
|
||||||
return @retArray;
|
return @retArray;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user