Closed aujinj closed 9 years ago
Hi there, In the SDK we have a cache, which is populated every heartbeat, or every time the bridge is updated. So every SDK 'get' call retrieves the data from the cache This is done to prevent flooding the bridge with many http requests.
So:-
To get all Groups from the bridge:-
PHBridge bridge = phHueSDK.getSelectedBridge();
List
To get a group, we have: getResourceCache().getGroups() This returns a map, with the Group Identifier being the Key, so if you know the Group identifier, you can use this to get a particular group.
To get the lights from the group you can call the getLightIdentifiers() method (on the group) to return the light ids which from part of the group.
Hope this helps Steve
Here are few calls are missing in SDK.
Get all groups from the bridge Get a group from the bridge List lights from the group
Thank you.