C# Class Q42.HueApi.HueClient

Partial HueClient, contains requests to the /Groups/ url
Datei anzeigen Open project: Q42/Q42.HueApi Class Usage Examples

Public Methods

Method Description
CreateGroupAsync ( IEnumerable lights, string name = null, RoomClass roomClass = null ) : Task

Create a group for a list of lights

CreateScheduleAsync ( Schedule schedule ) : Task

Create a schedule

DeleteGroupAsync ( string groupId ) : Task

Deletes a single group

DeleteScheduleAsync ( string id ) : Task

Delete a schedule

DeleteWhiteListEntryAsync ( string entry ) : Task

Deletes a whitelist entry

GetBridgeAsync ( ) : Task

Get bridge info

GetCapabilitiesAsync ( ) : Task

Get bridge capabilities

GetConfigAsync ( ) : Task

Get bridge config

GetGroupAsync ( string id ) : Task

Get the state of a single group

GetGroupsAsync ( ) : Task>

Get all groups

GetScheduleAsync ( string id ) : Task

Get a single schedule

GetSchedulesAsync ( ) : Task>

Get all schedules

GetWhiteListAsync ( ) : Task>

Asynchronously gets the whitelist with the bridge.

SendGroupCommandAsync ( ICommandBody command, string group = "0" ) : Task

Send command to a group

UpdateBridgeConfigAsync ( Q42.HueApi.BridgeConfigUpdate update ) : Task

Update bridge config

UpdateGroupAsync ( string id, IEnumerable lights, string name = null ) : Task

Update a group

UpdateScheduleAsync ( string id, Schedule schedule ) : Task

Update a schedule

Private Methods

Method Description
SendGroupCommandAsync ( string command, string group = "0" ) : Task

Send command to a group

Method Details

CreateGroupAsync() public method

Create a group for a list of lights
public CreateGroupAsync ( IEnumerable lights, string name = null, RoomClass roomClass = null ) : Task
lights IEnumerable List of lights in the group
name string Optional name
roomClass RoomClass for room creation the room class has to be passed, without class it will get the default: "Other" class.
return Task

CreateScheduleAsync() public method

Create a schedule
public CreateScheduleAsync ( Schedule schedule ) : Task
schedule Q42.HueApi.Models.Schedule
return Task

DeleteGroupAsync() public method

Deletes a single group
public DeleteGroupAsync ( string groupId ) : Task
groupId string
return Task

DeleteScheduleAsync() public method

Delete a schedule
public DeleteScheduleAsync ( string id ) : Task
id string
return Task

DeleteWhiteListEntryAsync() public method

Deletes a whitelist entry
public DeleteWhiteListEntryAsync ( string entry ) : Task
entry string
return Task

GetBridgeAsync() public method

Get bridge info
public GetBridgeAsync ( ) : Task
return Task

GetCapabilitiesAsync() public method

Get bridge capabilities
public GetCapabilitiesAsync ( ) : Task
return Task

GetConfigAsync() public method

Get bridge config
public GetConfigAsync ( ) : Task
return Task

GetGroupAsync() public method

Get the state of a single group
public GetGroupAsync ( string id ) : Task
id string
return Task

GetGroupsAsync() public method

Get all groups
public GetGroupsAsync ( ) : Task>
return Task>

GetScheduleAsync() public method

Get a single schedule
public GetScheduleAsync ( string id ) : Task
id string
return Task

GetSchedulesAsync() public method

Get all schedules
public GetSchedulesAsync ( ) : Task>
return Task>

GetWhiteListAsync() public method

Asynchronously gets the whitelist with the bridge.
public GetWhiteListAsync ( ) : Task>
return Task>

SendGroupCommandAsync() public method

Send command to a group
public SendGroupCommandAsync ( ICommandBody command, string group = "0" ) : Task
command ICommandBody
group string
return Task

UpdateBridgeConfigAsync() public method

Update bridge config
public UpdateBridgeConfigAsync ( Q42.HueApi.BridgeConfigUpdate update ) : Task
update Q42.HueApi.BridgeConfigUpdate
return Task

UpdateGroupAsync() public method

Update a group
public UpdateGroupAsync ( string id, IEnumerable lights, string name = null ) : Task
id string Group ID
lights IEnumerable List of light IDs
name string Group Name
return Task

UpdateScheduleAsync() public method

Update a schedule
public UpdateScheduleAsync ( string id, Schedule schedule ) : Task
id string
schedule Q42.HueApi.Models.Schedule
return Task