mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 13:24:56 +00:00
30_HUEBridge.pm: fritzbox handling
git-svn-id: https://svn.fhem.de/fhem/trunk@7226 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
fb55ed41b7
commit
26c19f0858
@ -14,6 +14,16 @@ use JSON;
|
||||
#use Try::Tiny;
|
||||
use Data::Dumper;
|
||||
|
||||
my $HUEBridge_isFritzBox = undef;
|
||||
sub
|
||||
HUEBridge_isFritzBox()
|
||||
{
|
||||
$HUEBridge_isFritzBox = int( qx( [ -f /usr/bin/ctlmgr_ctl ] && echo 1 || echo 0 ) ) if( !defined( $HUEBridge_isFritzBox) );
|
||||
|
||||
return $HUEBridge_isFritzBox;
|
||||
}
|
||||
|
||||
|
||||
sub HUEBridge_Initialize($)
|
||||
{
|
||||
my ($hash) = @_;
|
||||
@ -425,6 +435,8 @@ sub HUEBridge_HTTP_Call($$$)
|
||||
# return undef;
|
||||
# }
|
||||
|
||||
return HUEBridge_ProcessResponse($hash,decode_json($ret)) if( HUEBridge_isFritzBox() );
|
||||
|
||||
return HUEBridge_ProcessResponse($hash,from_json($ret));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user