Bridge class

a Bridge is used as a facade to the different api's

Constructors

Bridge(Client client, String address, [String username = ''])
create a bridge with a platform specific client. Setting the optional username enables the use of calls on the bridge that require a username

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
username String
set a username to enable the use of cclls on the bridge that require a username
no getter

Methods

completeConfiguration() Future<Configuration>
configuration() Future<Configuration>
createGroup(Group group) Future<Group>
createRule(Rule rule) Future<Rule>
createScene(Scene scene) Future<Scene>
createSchedule(Schedule schedule) Future<Schedule>
createSensor(Sensor sensor) Future<Sensor>
createUser(String deviceType) Future<WhiteListItem>
deleteGroup(Group group) Future<BridgeResponse>
deleteLight(Light light) Future<BridgeResponse>
deleteRule(Rule rule) Future<BridgeResponse>
deleteScene(Scene scene) Future<BridgeResponse>
deleteSchedule(Schedule schedule) Future<BridgeResponse>
deleteSensor(Sensor sensor) Future<BridgeResponse>
deleteUser(String deletingUsername) Future<BridgeResponse>
group(int id) Future<Group>
groups() Future<List<Group>>
light(int id) Future<Light>
lights() Future<List<Light>>
lightSearchResults() Future<List<Light>>
return the lights found in the last search for new lights
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
renameLight(Light light) Future<BridgeResponse>
rule(int id) Future<Rule>
rules() Future<List<Rule>>
scene(String id) Future<Scene>
scenes() Future<List<Scene>>
schedule(String id) Future<Schedule>
schedules() Future<List<Schedule>>
searchLights([List<String> deviceIds = const []]) Future<BridgeResponse>
initiate a search for new lights. Optional serial numbers can be sent as deviceIds.
searchSensors() Future<BridgeResponse>
sensor(String id) Future<Sensor>
sensors() Future<List<Sensor>>
sensorSearchResults() Future<List<Sensor>>
toString() String
A string representation of this object.
inherited
updateConfiguration(Configuration configuration) Future<BridgeResponse>
update the bridge's configuration. Check the docs to see what can be changed
updateGroupAttributes(Group group) Future<BridgeResponse>
change the name, class and/or lights of a group.
updateGroupState(Group group) Future<BridgeResponse>
update the color state of the lights in the group
updateLightState(Light light) Future<BridgeResponse>
updateRule(Rule rule) Future<BridgeResponse>
updateSceneAttributes(Scene scene) Future<BridgeResponse>
updateSceneLightState(Scene scene, Light light) Future<BridgeResponse>
updateScheduleAttributes(Schedule schedule) Future<BridgeResponse>
updateSensorAttributes(Sensor sensor) Future<BridgeResponse>
updateSensorConfig(Sensor sensor) Future<BridgeResponse>
updateSensorState(Sensor sensor) Future<BridgeResponse>

Operators

operator ==(Object other) bool
The equality operator.
inherited