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.