Get Instruction Sets in Bulk

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

Get the instruction sets of up to 20 devices.

API address

GET: /v1.0/devices/functions

Request parameter

Parameter nameTypeINRequiredDescription
device_idsStringqueryfalseThe list of up to 20 device IDs, separated with commas (,).

Return parameter

Parameter nameTypeDescription
resultListThe collection of devices, instructions, and categories.

Description of result

Parameter nameTypeDescription
categoryStringThe product category.
functionsListThe instruction set.
devicesListThe list of device IDs.

Description of functions

Parameter nameTypeDescription
nameStringThe name of the specified instruction.
descStringThe description of the specified instruction.
codeStringThe code of the specified instruction.
typeStringThe type of the specified instruction.
valuesStringThe input parameter range of the specified instruction.

Description of devices

Parameter nameTypeDescription
devicesStringThe device ID.

Request example

GET: /v1.0/devices/functions?device_ids=vdevo168****14179625,vdevo16****2860414179

Return example

{
    "functions": [
        {
            "code": "switch_1",
            "values": "{}",
            "type": "Boolean",
            "name": "Switch 1",
            "desc": "Switch 1"
        },
        {
            "code": "countdown_1",
            "values": "{\"unit\":\"s\",\"min\":0,\"max\":86400,\"scale\":0,\"step\":1}",
            "type": "Integer",
            "name": "Switch 1 Countdown",
            "desc": "The countdown of Switch 1"
        },
        {
            "code": "switch_led",
            "values": "{}",
            "type": "Boolean",
            "name": "Switch",
            "desc": "Switch"
        },
        {
            "code": "remote_id",
            "values": "{}",
            "type": "string",
            "name": "Remote Control ID",
            "desc": "The ID of the specified remote control"
        },
        {
            "code": "mode",
            "values": "{\"range\":[\"cold\",\"warm\",\"auto\",\"air\",\"dehumid\"]}",
            "type": "Enum",
            "name": "Mode",
            "desc": "The mode"
        },
        {
            "code": "target_temp",
            "values": "{\"min\":0,\"max\":100,\"scale\":1,\"step\":1}",
            "type": "Integer",
            "name": "Target Temperature",
            "desc": "The target temperature"
        },
        {
            "code": "fan_level",
            "values": "{\"range\":[\"auto\",\"low\",\"middle\",\"high\"]}",
            "type": "Enum",
            "name": "Wind speed",
            "desc": "The wind speed"
        },
        {
            "code": "control",
            "values": "{\"range\":[\"send_ir\",\"study\",\"study_exit\",\"study_key\"]}",
            "type": "Enum",
            "name": "Device Control",
            "desc": "The device control"
        }
    ],
    "devices": [
        "vdevo16****414179",
        "vdevo168****4179625"
    ],
    "category": "zigbeekt"
}

Error code

For more information, see error code.