Skip to content

List rooms ​

GET /clip/v2/resource/room

List rooms on the gateway.

Use include_all_room to include the Whole Home room, or include_no_room to include Unassigned. Use ext_device and ext_light to include related device and light data.

Parameters ​

FieldLocationTypeRequiredDescription
include_all_roomquerystringNoAlso include the "Whole Home" room.
include_no_roomquerystringNoAlso include the "Unassigned" room.
ext_devicequerystringNoInclude additional device information.
ext_lightquerystringNoInclude additional light information.

Example response

json
{
  "code": 0,
  "data": {
    "arr": [
      {
        "id": "F80253CD-1118-44E8-A700-3A5953538B63",
        "type": "room",
        "name": "卧室",
        "room_kind": 0,
        "room_type": "",
        "icon": "assets/room/room3.png",
        "background": 1,
        "sequence": 0,
        "children": [
          {
            "rid": "241D3783-0052-4B35-A892-EF3211F311F5",
            "rtype": "device"
          }
        ],
        "services": [
          {
            "rid": "2F84620F-C289-4AA3-8A1E-D6DE9C33D1F5",
            "rtype": "group_light"
          }
        ]
      }
    ],
    "len": 1,
    "obj": {}
  },
  "msg": "success"
}

Responses ​

Status codeMeaning
200OK

Response fields ​

HTTP 200 OK

FieldTypeRequiredDescription
codeintegerYesStatus code
msgstringYesMessage
dataobjectYesResponse payload.
data.arrobject[]YesReturned resources.
data.arr[].idstringYesRoom UUID
data.arr[].typestringYesAlways room.
data.arr[].namestringYesRoom name.
data.arr[].room_kindintegerYes0 for a standard room; 1 for Whole Home; 2 for Unassigned.
data.arr[].room_typestringYesA free-form room category, such as "Bedroom" or "Kitchen".
data.arr[].iconstringYesFor BweeApp use only.
data.arr[].backgroundintegerYesFor BweeApp use only.
data.arr[].sequenceintegerYesFor BweeApp use only.
data.arr[].childrenResInfo[]YesDevices in the room. Each entry currently refers to a device resource.
data.arr[].children[].ridstringYesResource UUID
data.arr[].children[].rtypestringYesResource type
data.arr[].servicesResInfo[]YesTypically includes a group_light service for controlling the room's lights.
data.arr[].services[].ridstringYesResource UUID
data.arr[].services[].rtypestringYesResource type