更新时间:2021-10-30 03:03:50
action | 说明 |
---|---|
infrared.categoryBrand | 获取指定设备类型支持的品牌列表 |
infrared.categoryBrandRemote | 获取指定设备类型支持的指定品牌所支持的默认遥控器索引列表 |
infrared.acTestCommand | 遥控器配对阶段控制设备 |
infrared.addNormalRemote | 添加普通遥控器 |
infrared.acCommand | 使用空调单个指令控制设备 |
infrared.acScenesCommand | 使用空调场景指令控制设备 |
infrared.acStatus | 查询空调当前状态 |
接口说明
根据红外设备支持的设备类型来获取此设备类型支持的品牌信息,支持电视和空调。
接口地址
action: infrared.categoryBrand
params请求参数
参数名 | 类型 | 说明 | 是否必填 |
---|---|---|---|
infrared_id | String | 红外设备ID | 是 |
category_id | String | 设备类型ID | 是 |
请求示例
{
"action": "infrared.categoryBrand",
"params": {
"infrared_id": "vdevo157924607038167",
"category_id": "2"
}
}
响应参数
参数名 | 类型 | 说明 |
---|---|---|
code | Integer | 响应码 |
success | Boolean | 是否成功:(true:成功,false:失败) |
msg | String | 请求失败的信息,成功为空 |
result | List | 返回结果 |
result参数说明
参数名 | 类型 | 说明 | |
---|---|---|---|
brand_id | String | 品牌ID | |
brand_name | String | 品牌名称 |
响应示例
{
"success": true,
"result": [
{
"brand_id": "907",
"brand_name": "天龙"
},
{
"brand_id": "3080",
"brand_name": "易美逊"
},
{
"brand_id": "472",
"brand_name": "飞鹿"
},
{
"brand_id": "352",
"brand_name": "奥图码"
},
{
"brand_id": "2427",
"brand_name": "彩讯"
},
{
"brand_id": "232",
"brand_name": "三洋"
},
{
"brand_id": "1216",
"brand_name": "Kaisui"
}
]
}
接口说明
获取指定设备类型支持的指定品牌所支持的默认遥控器索引列表。
接口地址
action: infrared.categoryBrandRemote
params请求参数
参数名 | 类型 | 说明 | 是否必填 |
---|---|---|---|
infrared_id | String | 红外设备ID | 是 |
category_id | String | 设备类型ID | 是 |
brand_id | String | 品牌ID | 是 |
请求示例
{
"action": "infrared.categoryBrandRemote",
"params": {
"infrared_id": "vdevo157924607038167",
"category_id": "2",
"brand_id": "907"
}
}
响应参数
参数名 | 类型 | 说明 |
---|---|---|
code | Integer | 响应码 |
success | Boolean | 是否成功:(true:成功,false:失败) |
msg | String | 请求失败的信息,成功为空 |
result | List | 返回结果 |
result参数说明
参数名 | 类型 | 说明 |
---|---|---|
remote_index | String | 遥控器索引 |
响应示例
{
"success": true,
"result": [
{
"remote_index": "1092"
},
{
"remote_index": "1102"
},
{
"remote_index": "1107"
},
{
"remote_index": "1112"
},
{
"remote_index": "1117"
}
]
}
功能描述
用于在测试空调遥控器是否匹配空调设备时,根据遥控器索引下发单个的空调遥控器按键指令。
接口地址
action: infrared.acTestCommand
接口说明
以下为空调类型的专有红外指令集。
参数名 | 类型 | 说明 | 是否必填 |
---|---|---|---|
power | Integer | 电源。1:打开;0:关闭 | 否 |
mode | Integer | 模式。0:制冷;1:制热;2:自动;3:送风;4:除湿 | 部分空调不支持所有模式 |
temp | Integer | 温度,需要设置的温度值,支持:16~30 | 否 |
wind | Integer | 风速。0:自动;1:低速;2:中速;3:高速 | 部分空调不支持所有风速档位 |
params请求参数
参数名 | 类型 | 参数位置 | 说明 | 是否必填 |
---|---|---|---|---|
infrared_id | String | URI | 红外设备ID | 是 |
remote_index | String | BODY | 遥控器索引 | 是 |
category_id | Integer | BODY | 设备类型ID | 是 |
code | String | BODY | 指令代码(详情见接口说明) | 是 |
value | Integer | BODY | 下发指令值(详情见接口说明) | 是 |
响应参数
参数名 | 类型 | 说明 |
---|---|---|
code | Integer | 响应码(详情见错误码章节) |
success | Boolean | 是否成功 true:成功 false:失败 |
msg | String | 请求失败的信息,成功为空 |
result | Boolean | 执行结果 |
请求示例
{
"action": "infrared.acTestCommand",
"params": {
"infrared_id": "vdevo157924607038167",
"remote_index":"7273",
"category_id": 5,
"code": "temp",
"value": 26
}
}
响应示例
{
"result": true,
"success": true,
"t": 1586501573398
}
接口说明
添加非机顶盒、非空调的普通遥控器
接口地址
action: infrared.addNormalRemote
params请求参数
参数名 | 类型 | 说明 | 是否必填 |
---|---|---|---|
infrared_id | String | 红外设备ID | 是 |
category_id | String | 设备类型ID | 是 |
brand_id | String | 品牌ID | 是 |
brand_name | String | 品牌名称 | 是 |
remote_index | String | 遥控器索引 | 是 |
remote_name | String | 遥控器的名字 | 是 |
请求示例
{
"action": "infrared.addNormalRemote",
"params": {
"infrared_id": "vdevo157924607038167",
"category_id": "2",
"category_name": "电视",
"brand_id": "27",
"brand_name": "TCL",
"remote_index": "10982",
"remote_name" : "遥控器名称"
}
}
响应参数
参数名 | 类型 | 说明 |
---|---|---|
code | Integer | 响应码 |
success | Boolean | 是否成功:(true:成功,false:失败) |
msg | String | 请求失败的信息,成功为空 |
result | List | 返回结果 |
result参数说明
参数名 | 类型 | 说明 | |
---|---|---|---|
remote_id | String | 遥控器的设备ID |
响应示例
{
"success": true,
"result": {
"remote_id": "6cb9e4eaf1e462b3d4ihh7"
}
}
接口说明
下发单个的空调遥控器按键指令。
接口地址
action: infrared.acCommand
接口说明
参数名 | 类型 | 说明 | 是否必填 |
---|---|---|---|
power | Integer | 电源。1:打开;0:关闭 | 否 |
mode | Integer | 模式。0:制冷;1:制热;2:自动;3:送风;4:除湿 | 部分空调不支持所有模式 |
temp | Integer | 温度,需要设置的温度值,支持:16~30 | 否 |
wind | Integer | 风速。0:自动;1:低速;2:中速;3:高速 | 部分空调不支持所有风速档位 |
params请求参数
参数名 | 类型 | 参数位置 | 说明 | 是否必填 |
---|---|---|---|---|
infrared_id | String | URI | 红外设备Id | 是 |
remote_id | String | URI | 遥控器id | 是 |
code | String | BODY | 指令代码(详情见接口说明) | 是 |
value | Integer | BODY | 下发指令值(详情见接口说明) | 是 |
响应参数
参数名 | 类型 | 说明 |
---|---|---|
code | Integer | 响应码(详情见错误码章节) |
success | Boolean | 是否成功:(true:成功,false:失败) |
msg | String | 请求失败的信息,成功为空 |
result | Boolean | 执行结果 |
请求示例
{
"action": "infrared.acCommand",
"params": {
"infrared_id": "vdevo157924607038167",
"remote_id":"6c014f07yyyyyy",
"code": "temp",
"value": 26
}
}
成功示例
{
"result": true,
"success": true,
"t": 1586501573398
}
失败示例
{
"code": 2050,
"msg": "按键码库不存在",
"success": false,
"t": 1586763590514
}
错误码
以下为该接口常见的业务异常,更多的异常错误,请参见全局错误码。
错误码 | 说明 |
---|---|
500 | 系统错误 |
1109 | 参数非法 |
2050 | 按键码库不存在 |
接口说明
多条件的空调指令下发,用于在部分联动场景下对空调的控制。
部分条件组合没有对应的码库将会提示码库不存在。
接口地址
action: infrared.acScenesCommand
接口说明
参数名 | 类型 | 说明 | 是否必填 |
---|---|---|---|
power | Integer | 电源。1:打开;0:关闭 | 否 |
mode | Integer | 模式。0:制冷;1:制热;2:自动;3:送风;4:除湿 | 部分空调不支持所有模式 |
temp | Integer | 温度,需要设置的温度值,支持:16~30 | 否 |
wind | Integer | 风速。0:自动;1:低速;2:中速;3:高速 | 部分空调不支持所有风速档位 |
params请求参数
参数名 | 类型 | 参数位置 | 说明 | 是否必填 |
---|---|---|---|---|
infrared_id | String | URI | 红外设备Id | 是 |
remote_id | String | URI | 遥控器id | 是 |
power | Integer | BODY | 开关(1:开 0:关) | 是 |
mode | Integer | BODY | 模式(0:制冷,1:制热,2:自动,3:送风,4:除湿) | 否 |
temp | Integer | BODY | 温度(16-30) | 否 |
wind | Integer | BODY | 风速(0:自动,1:低,2:中,3:高) | 否 |
响应参数
参数名 | 类型 | 说明 |
---|---|---|
code | Integer | 响应码(详情见错误码章节) |
success | Boolean | 是否成功:(true:成功,false:失败) |
msg | String | 请求失败的信息,成功为空 |
result | Boolean | 执行结果 |
请求示例
{
"action": "infrared.acScenesCommand",
"params": {
"infrared_id": "vdevo157924607038167",
"remote_id":"6c014f07yyyyyy",
"power": 1,
"mode": 2,
"temp": 20,
"wind": 1
}
}
成功示例
{
"success": true,
"result": true
}
失败示例
{
"code": 2050,
"msg": "按键码库不存在",
"success": false,
"t": 1586763590514
}
错误码
以下为该接口常见的业务异常,更多的异常错误,请参见全局错误码。
错误码 | 说明 |
---|---|
500 | 系统错误 |
1109 | 参数非法 |
2050 | 按键码库不存在 |
接口地址
action: infrared.acStatus
params请求参数
参数名 | 类型 | 说明 | 是否必填 |
---|---|---|---|
infrared_id | String | 红外设备ID | 是 |
remote_id | Stirng | 遥控器ID | 是 |
请求示例
{
"action": "infrared.acStatus",
"params": {
"infrared_id": "vdevo157924607038167",
"remote_id": "6cb2fb33541a44967fxqhy"
}
}
响应参数
参数名 | 类型 | 说明 |
---|---|---|
code | Integer | 响应码 |
success | Boolean | 是否成功:(true:成功,false:失败) |
msg | String | 请求失败的信息,成功时为空 |
result | Object | 返回结果 |
result
参数说明
参数名 | 类型 | 说明 |
---|---|---|
mode | String | 模式 |
temp | String | 温度 |
wind | String | 风速 |
power | String | 开关 |
remote_id | String | 空调遥控器ID |
响应示例
{
"success": true,
"t": 1543927305251,
"result": {
"mode": "0",
"temp": "20",
"remote_id": "6cb2fb33541a44967fxqhy",
"wind": "3"
}
}
该内容对您有帮助吗?
是意见反馈该内容对您有帮助吗?
是意见反馈