Bridge API

class huegely.Bridge(ip, username=None, transition_time=None)[source]
get_token(app_identifier)[source]

Gets a new authorisation token. Use this token to initialize a bridge object.

Arguments: ip: ip of bridge app_identifier: name of the app (should be unique per bridge)

groups()[source]

Gets all group objects for this bridge, sorted by their device_id.

lights()[source]

Gets all light objects for this bridge, sorted by their device_id.

make_request(path=None, method='GET', full_url=None, **data)[source]

Utility function for HTTP GET/PUT requests for the API.

Instead of calling this with the “path” argument which uses the bridge’s base url with authentication included, you can pass in “full_url” to bypass this behaviour.

For POST/PUT requests: Returns a processed dictionary of updated attributes/values like {'brightness': 100, 'on': True, 'name': 'new name'}.

For GET requests: Returns the unmodified api response.

If any updates fail, a HueError is raised.

name(name=None)[source]

Gets current name of bridge if called without name, sets and returns new name otherwise.

sensors()[source]