Control a device’s user interface (light/sound)

Role

Use this command to have the device perform a short light/sound sequence. This allows to identify a very device from the others in the nearby.

You should restore the device’s user interface to its default behavior using DELETE /device/{$id}/ui afterwards.

Prototype

URL : /device/{$id}/ui

Method : POST

URL Params : {$id} : the DeviceId of the device. Use GET /devices to enumerate the connected devices.

Request data :

Field name Type Status Description
Color string option If specified, sets the color of the device’s main light. Allowed values are red, green, blue, yellow, cyan, magenta and white for the devices that don’t have a full RGB light.
For devices that do have a full RGB light, the RGB color could be specified directly: #rrggbb.
If Color is not specified and a Pattern is specified, Color defaults to blue.
Pattern string option If specified, defines the pattern of the device’s main light. Basic values supported by all devices are solid, blink-fast, blink-slow, flash and breath.
Recent devices support more patterns.
If Pattern is not specified and a Color is specified, Pattern defaults to solid.
Buzzer integer option If specified, the device beeps. This field gives the duraction of the beep, in milliseconds. Most devices will refuse to beep for more than a few seconds.

Example

{
	"Color": "magenta",
	"Pattern": "blink",
	"Buzzer": 250
}

Success Response

Code : 200 OK

Content : a SUCCESS object.

Error Response

See Error Responses.