From c831ab4c225d9ec2b7ae62d6315b8b67db531797 Mon Sep 17 00:00:00 2001 From: justme1968 Date: Thu, 28 Jul 2016 18:57:08 +0000 Subject: [PATCH] 30_HUEBridge.pm: added checkforupdate command git-svn-id: https://svn.fhem.de/fhem/trunk@11858 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/30_HUEBridge.pm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/fhem/FHEM/30_HUEBridge.pm b/fhem/FHEM/30_HUEBridge.pm index d36633c61..cb6cb51f3 100644 --- a/fhem/FHEM/30_HUEBridge.pm +++ b/fhem/FHEM/30_HUEBridge.pm @@ -488,9 +488,21 @@ HUEBridge_Set($@) return undef; + } elsif($cmd eq 'checkforupdate') { + return "usage: checkforupdate" if( @args != 0 ); + + my $obj = { swupdate => {'checkforupdate' => JSON::true } }; + + my $result = HUEBridge_Call($hash, undef, 'config', $obj, 'PUT'); + return $result->{error}{description} if( $result->{error} ); + + return undef if( $result->{success} ); + + return undef; + } else { - my $list = "delete creategroup deletegroup savescene deletescene modifyscene scene deletewhitelist touchlink:noArg autodetect:noArg autocreate:noArg statusRequest:noArg"; + my $list = "delete creategroup deletegroup savescene deletescene modifyscene scene deletewhitelist touchlink:noArg checkforupdate:noArg autodetect:noArg autocreate:noArg statusRequest:noArg"; $list .= " swupdate:noArg" if( defined($hash->{updatestate}) && $hash->{updatestate} =~ '^2' ); return "Unknown argument $cmd, choose one of $list"; } @@ -1372,6 +1384,8 @@ HUEBridge_Attr($$$) Deletes the given key from the whitelist in the bridge.
  • touchlink
    perform touchlink action
  • +
  • checkforupdate
    + perform checkforupdate action
  • statusRequest
    Update bridge status.
  • swupdate