联动配置查询接口

查询指定的对象类型下的触发器

  • 接口intent:query.ifttt.trigger
  • 接口描述:本接口用于查询指定对象模型值所支持的自动化条件配置,包含条件名称、参数等信息。对象模型值可在控制台-设备资源页面查询。触发器的条件配置可用于创建自动化和条件集。
  • 请求参数
名称 类型 是否必须 描述
models Array(String) 物模型(如:设备,自动化)
  • 请求参数
{
    "intent": "query.ifttt.trigger",
    "data": {
        "models": [
            "lumi.gateway.acn01",
            "lumi.gateway.aqhm01"
        ]
    }
}
  • 返回参数
名称 类型 描述
triggerDefinitionId String Trigger定义id
triggerName String Trigger名称
model String 物模型
params Array(Object) 自动化参数,详见params说明

params说明:

名称 类型 描述
paramId String 参数id
paramType int 参数类型:可用于参数值的校验:0:int 1:float 2:string 3:time
paramEnum String 参数枚举
paramName String 参数名称
maxValue double 参数最大值
minValue double 参数最小值
defaultValue String 参数默认值
paramUnit String 参数单位
step double 步长
  • 返回示例
{
    "code": 0,
    "message": "Success",
    "msgDetails": "",
    "requestId": "",
    "result": [
        {
        {
            "triggerDefinitionId": "TD.lumi.gateway.light_is_on",
            "triggerName": "Night light is on",
            "model": "lumi.gateway.acn01"
        },
        {
            "triggerDefinitionId": "TD.lumi.gateway.light_is_off",
            "triggerName": "Night light is off\t",
            "model": "lumi.gateway.acn01"
        },
        {
            "triggerDefinitionId": "TD.lumi.gateway.illumination_more_than",
            "triggerName": "Above assigned illuminance",
            "model": "lumi.gateway.acn01",
            "params": [
                {
                    "paramType": 0,
                    "minValue": 0.0,
                    "paramUnit": "Lux",
                    "defaultValue": "10",
                    "maxValue": 80.0,
                    "step": 1.0,
                    "paramId": "PD.illumination"
                }
            ]
        },
        {
            "triggerDefinitionId": "TD.lumi.gateway.illumination_less_than",
            "triggerName": "Below assigned illuminance",
            "model": "lumi.gateway.acn01",
            "params": [
                {
                    "paramType": 0,
                    "minValue": 1.0,
                    "paramUnit": "Lux",
                    "defaultValue": "10",
                    "maxValue": 80.0,
                    "step": 1.0,
                    "paramId": "PD.illumination"
                }
            ]
        }
    ]
}

查询指定的对象类型下的执行动作

  • 接口intent:query.ifttt.action
  • 接口描述:本接口用于查询指定对象模型值所支持的自动化动作配置,包含动作名称、参数等信息。对象模型值可在控制台-设备资源页面查询。执行动作配置可用于创建自动化和场景。
  • 请求参数
名称 类型 是否必须 描述
models Array(String) 对象类型(如:设备,场景,自动化)
  • 请求示例
{
    "intent": "query.ifttt.action",
    "data": {
        "models": [
            "lumi.gateway.acn01"
        ]
    }
}
  • 返回参数
名称 类型 描述
actionDefinitionId String Action定义id
actionName String Action名称
model String 物模型
params Array 自动化参数,详见params参数列表

params参数列表

名称 类型 描述
paramId String 参数id
paramType int 参数类型,可用于参数值的校验:0:int 1:float 2:string 3:time
paramEnum String 参数枚举
paramName String 参数名称
maxValue double 参数最大值
minValue double 参数最小值
defaultValue String 参数默认值
paramUnit String 参数单位
step double 步长
  • 返回示例
{
    "code": 0,
    "message": "Success",
    "msgDetails": "",
    "requestId": "",
    "result": [
        {
            "actionDefinitionId": "AD.lumi.gateway.open_corridor_light",
            "model": "lumi.gateway.acn01",
            "actionName": "Turn on night light"
        },
        {
            "actionDefinitionId": "AD.lumi.gateway.close_corridor_light",
            "model": "lumi.gateway.acn01",
            "actionName": "Turn off night light"
        },
        {
            "actionDefinitionId": "AD.lumi.gateway.music",
            "model": "lumi.gateway.acn01",
            "params": [
                {
                    "paramType": 0,
                    "minValue": 0.0,
                    "paramUnit": "local",
                    "defaultValue": "10000",
                    "maxValue": 0.0,
                    "step": 1.0,
                    "paramId": "PD.musicIndex",
                    "paramEnum": "{\"Police car sound 1\":0,\"Police car sound 2\":1,\"Safety accident sound\":2,\"Missile countdown\":3,\"Ghost calls\":4,\"Sniper rifle\":5,\"Battle sound\":6,\"Air Alert\":7,\"barking\":8,\"Doorbell sound\":10,\"Knock door sound\":11,\"Funny sound\":12,\"Clock sound\":13,\"Arming Sound\":14,\"Disarming Sound\":15,\"Mi Mix\":20,\"Enthusiastic\":21,\"Guitar Classic\":22,\"Ice World Piano\":23,\"Leisure Time\":24,\"Childhood\":25,\"Morning StreamIet\":26,\"Music Box\":27,\"Orange\":28,\"Thinker\":29}"
                },
                {
                    "paramType": 2,
                    "minValue": 0.0,
                    "paramUnit": "local",
                    "defaultValue": "40",
                    "maxValue": 100.0,
                    "step": 1.0,
                    "paramId": "PD.vol",
                    "paramEnum": ""
                }
            ],
            "actionName": "Play assigned ringtone"
        },
        {
            "actionDefinitionId": "AD.lumi.gateway.stop_ringtone_light",
            "model": "lumi.gateway.acn01",
            "actionName": "Stop ringtone and flickering light"
        }
    ]
}
Copyright © 2023 深圳绿米联创科技有限公司 all right reserved,powered by Gitbook文档修改时间: 2024-02-21 09:55:50

results matching ""

    No results matching ""