Skip to content

Get a light ​

GET /clip/v2/resource/light/light_uuid

Get a light by UUID, including its current state and supported features.

Example response

json
{
  "code": 0,
  "data": {
    "arr": [],
    "obj": {
            "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"
    }
  },
  "msg": "success"
}

Responses ​

Status codeMeaning
200OK

Response fields ​

HTTP 200 OK

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