Skip to content

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

json
{
  "on": true
}

Parameters ​

FieldLocationTypeRequiredDescription
onbodybooleanNoOn/off state
brightnessbodyintegerNoBrightness
color_cwbodyintegerNoColor temperature, from 2000 to 6500.
color_xbodyintegerNoColor X coordinate
color_ybodyintegerNoColor Y coordinate
color_arrbodyobject[]NoSegmented color
color_arr[].xbodyintegerNoSegment X coordinate
color_arr[].ybodyintegerNoSegment Y coordinate
color_rgbbodyintegerNoPacked RGB value in 0xRRGGBB format; for example, 0x112233.
color_rgb_arrbodyobject[]NoRGB 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

json
{
  "code": 0,
  "data": {
    "arr": [],
    "obj": {}
  },
  "msg": "success"
}

Responses ​

Status codeMeaning
200OK

Response fields ​

HTTP 200 OK

FieldTypeRequiredDescription
codeintegerYesStatus code
msgstringYesMessage