Query Devices Supporting Automation Scene

Last Updated on : 2023-12-07 03:33:47download

Based on the user's home ID and automation scene type, query the list of devices that support automation scenes.

API address

GET: /v1.0/homes/{home_id}/automation/devices

Request parameter

Parameter nameTypeINRequiredDescription
home_idStringuritrueThe ID of the user's home.
typeStringqueryfalseThe supported type. Valid values:
  • condition: condition type
  • action: action type

Return parameter

Parameter nameTypeDescription
resultListThe returned result.

Description of result

Parameter nameTypeDescription
device_idStringThe device ID.
uuidStringThe universally unique identifier (UUID) of the specified device.
nameStringThe name.
home_idStringThe home ID.
product_idStringThe product ID.

Request example

GET: /v1.0/homes/242****/automation/devices?type=condition

Return example

{
    "tid": "111e37e87d3c11eeaf40161d72836dc2",
    "result": [
        {
            "device_id": "vdevo1****14179625",
            "uuid": "vdevo16****414179625",
            "product_id": "mr***sde3",
            "name": "DMC162-vdevo",
            "home_id": "169****15"
        },
        {
            "device_id": "6856****f3eb62e90e",
            "uuid": "685605****f3eb62e90e",
            "product_id": "xr***ssds",
            "name": "Strip Lights in Bedroom",
            "home_id": "169****15"
        }
    ],
    "t": 1699340743500,
    "success": true
}

Error code

For more information, see error code.