Control a light
PUT /clip/v2/resource/light/light_uuid
Change a light's state by sending only the properties you want to update. Omit any property that should keep its current value.
Choose one color control method per request: segmented color, a single color, or color temperature. If you send more than one, the gateway applies them in that order of priority.
When updates take effect
A successful response means the gateway has accepted the request and updated its cached state. The gateway then sends the command to the device.
The gateway periodically reconciles its cached state with the device. If a command is lost, a query may briefly show the requested state before reverting to the actual state. For example, a light at 100% brightness may appear to be at 50% immediately after a request, then return to 100% about 10 seconds later if the command was not delivered.
Example request
{
"on": true
}Parameters
| Field | Location | Type | Required | Description |
|---|---|---|---|---|
on | body | boolean | No | On/off state |
brightness | body | integer | No | Brightness |
color_cw | body | integer | No | Color temperature, from 2000 to 6500. |
color_x | body | integer | No | Color X coordinate |
color_y | body | integer | No | Color Y coordinate |
color_arr | body | object[] | No | Segmented color |
color_arr[].x | body | integer | No | Segment X coordinate |
color_arr[].y | body | integer | No | Segment Y coordinate |
color_rgb | body | integer | No | Packed RGB value in 0xRRGGBB format; for example, 0x112233. |
color_rgb_arr | body | object[] | No | RGB colors for individual segments, expressed as packed integers. |
You do not need to send
color_mode. The gateway determines the color mode from the color parameters in your request.
Example response
{
"code": 0,
"data": {
"arr": [],
"obj": {}
},
"msg": "success"
}Responses
| Status code | Meaning |
|---|---|
| 200 | OK |
Response fields
HTTP 200 OK
| Field | Type | Required | Description |
|---|---|---|---|
code | integer | Yes | Status code |
msg | string | Yes | Message |