Skip to content

List lights ​

GET /clip/v2/resource/light

List all lights and their current states. The response also describes each light's capabilities, such as brightness control, color temperature, and segmented color.

Example response

json
{
  "code": 0,
  "data": {
    "arr": [
      {
        "ability": 79,
        "brightness": 100,
        "color_arr": [],
        "color_cw": 2740,
        "color_len": 0,
        "color_mode": 2,
        "color_rgb": 0,
        "color_rgb_arr": [],
        "color_x": 0,
        "color_y": 0,
        "ext_attr": {
            "motion": 2
        },
        "id": "49F6A5DD-F8FA-4617-9AE1-5F91D0E6E7EF",
        "motion": {},
        "motion_type": [
            1
        ],
        "name": "",
        "on": 1,
        "pack": [],
        "position_x": 0,
        "position_y": 0,
        "positions": "",
        "power_on": {
            "brightness": 0,
            "brightness_mode": 0,
            "color_cw": 0,
            "color_mode": 0,
            "color_x": 0,
            "color_y": 0,
            "mode": 0,
            "on": 0,
            "on_mode": 0
        },
        "support_dynamic": 0,
        "support_segment": 0,
        "sync_status": 0,
        "type": "light"
      }
    ],
    "len": 3,
    "obj": {}
  },
  "msg": "success"
}

Responses ​

Status codeMeaning
200OK

Response fields ​

HTTP 200 OK

FieldTypeRequiredDescription
codeintegerYesStatus code
msgstringYesMessage
dataobjectYesResponse payload.
data.objobjectYesReturned resource.
data.arrobject[]NoReturned resources.
data.arr[].idstringYesLight UUID
data.arr[].typestringYesAlways light.
data.arr[].namestringYesName
data.arr[].onintegerYesOn/off state
data.arr[].brightnessintegerYesBrightness, from 1 to 100.
data.arr[].color_modeintegerYesColor mode. 0: HSV color; 1: XY color; 2: color temperature; 3: multi-segment XY color.
data.arr[].color_cwintegerYesColor temperature, from 2000 to 6500.
data.arr[].color_xintegerYesX coordinate in the XY color space.
data.arr[].color_yintegerYesY coordinate in the XY color space.
data.arr[].color_lenintegerYesNumber of individually controlled light segments.
data.arr[].color_arrobject[]YesSegment data
data.arr[].color_arr[].xintegerYesX coordinate
data.arr[].color_arr[].yintegerYesY coordinate
data.arr[].packstring[]NoFor BweeApp use only.
data.arr[].position_xintegerNoFor BweeApp use only.
data.arr[].position_yintegerNoFor BweeApp use only.
data.arr[].positionsstringYesFor BweeApp use only.
data.arr[].power_onPowerOnNoPower-on behavior
data.arr[].power_on.modeintegerYesMode. 0: default; 1: restore previous state; 2: custom; 3: on; 4: off.
data.arr[].power_on.on_modeintegerYesOn/off mode. 0: default; 1: restore previous state; 2: custom.
data.arr[].power_on.onintegerYesOn/off state
data.arr[].power_on.brightness_modeintegerYesBrightness mode. 0: default; 1: restore previous state; 2: custom.
data.arr[].power_on.brightnessintegerYesBrightness, from 0 to 100.
data.arr[].power_on.color_modeintegerYesColor mode. 0: default; 1: restore previous state; 2: custom XY; 3: custom color temperature.
data.arr[].power_on.color_xintegerYesColor X coordinate
data.arr[].power_on.color_yintegerYesColor Y coordinate
data.arr[].power_on.color_cwintegerYesColor temperature, from 2000 to 6500.
data.arr[].support_segmentintegerYes1 if the light supports segmented color; otherwise 0.
data.arr[].support_dynamicintegerYes1 if dynamic scenes are supported; otherwise 0.
data.arr[].abilityintegerYesSupported features, encoded as the bitmask described below.

Read ability as a bitmask: a set bit (1) means the light supports that feature; a cleared bit (0) means it does not.

Bit (n)Binary valueWeight (2ⁿ)Description
011On/off control.
112Brightness adjustment.
214Color temperature control.
318Color control.
4116Segmented lighting.
5132Light length configuration.
6164Dynamic effects.
71128Current adjustment.

For example, ability = 15 (0000 1111 in binary) enables bits 0-3: on/off control, brightness, color temperature, and color.