mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
37_harmony.pm: ignore user/password for now. protocoll has changed
git-svn-id: https://svn.fhem.de/fhem/trunk@12635 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
77c2f15c9e
commit
db36265ada
@ -607,9 +607,30 @@ harmony_getLoginToken($)
|
||||
{
|
||||
my ($hash) = @_;
|
||||
|
||||
#return if( defined($hash->{helper}{UserAuthToken}) );
|
||||
|
||||
if( 0 ) {
|
||||
my $https = "https";
|
||||
$https = "http" if( AttrVal($hash->{NAME}, "nossl", 0) );
|
||||
|
||||
my $json = encode_json( { clientId => '',
|
||||
clientTypeId => 'ControlApp' } );
|
||||
|
||||
my($err,$data) = HttpUtils_BlockingGet({
|
||||
url => "$https://svcs.myharmony.com/discovery/Discovery.svc/json/GetJson2Uris",
|
||||
timeout => 10,
|
||||
#noshutdown => 1,
|
||||
#httpversion => "1.1",
|
||||
header => "Content-Type: application/json;charset=utf-8",
|
||||
data => $json,
|
||||
});
|
||||
|
||||
harmony_dispatch( {hash=>$hash,type=>'GetJson2Uris'},$err,$data );
|
||||
}
|
||||
|
||||
return if( defined($hash->{helper}{UserAuthToken}) );
|
||||
|
||||
if( !$hash->{helper}{username} ) {
|
||||
if( 1 || !$hash->{helper}{username} ) {
|
||||
$hash->{helper}{UserAuthToken} = "";
|
||||
return;
|
||||
|
||||
@ -1357,7 +1378,10 @@ harmony_dispatch($$$)
|
||||
}
|
||||
|
||||
if( $param->{type} eq 'token' ) {
|
||||
harmony_parseToken($hash,$json);
|
||||
harmony_parseToken($hash, $json);
|
||||
|
||||
} elsif( $param->{type} eq 'GetJson2Uris' ) {
|
||||
Log 1, Dumper $json;
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user