发送红外码
统一指令:controller-infrared-emit
发送学习过的红外码指令。
向设备发送指令 服务端向设备订阅topic发送消息
{
"action" : "emit",
"data" :
{
"no" : 110
},
"messageId" : "20260520",
"type" : "infrared"
}
设备返回信息 设备向服务端订阅topic上报消息
{
"success": true,
"imei": "866597072523945",
"source": "command",
"commandName": "controller-infrared-emit",
"messageId": "20260520"
}
擦除红外指令
统一指令:controller-infrared-erase
将全部学习过的擦除。
向设备发送指令 服务端向设备订阅topic发送消息
{
"action" : "erase",
"messageId" : "20260520",
"type" : "infrared"
}
设备返回信息 设备向服务端订阅topic上报消息
{
"success": true,
"imei": "866597072523945",
"source": "command",
"commandName": "controller-infrared-erase",
"messageId": "20260520"
}
学习红外码
统一指令:controller-infrared-learn
通过该指令可以学习遥控器发射出来的红外信号
向设备发送指令 服务端向设备订阅topic发送消息
{
"action" : "learn",
"data" :
{
"no" : 110
},
"messageId" : "20260520",
"type" : "infrared"
}
设备返回信息 设备向服务端订阅topic上报消息
{
"type": "infrared",
"action": "learn",
"commandName": "controller-infrared-learn",
"source": "command",
"imei": "864269069911747",
"success": true,
"messageId": "202201241610366046",
"no": 100
}
读取红外码
统一指令:controller-infrared-read
1.0.5 固件版本支持该接口
向设备发送指令 服务端向设备订阅topic发送消息
{
"action" : "ir_read",
"data" :
{
"no" : 100
},
"messageId" : "API-xxx",
"type" : "infrared"
}
设备返回信息 设备向服务端订阅topic上报消息
{
"commandName":"controller-infrared-read",
"ir_data":"00495D2D0606060506060606060506060606060605110611051106110511061006110610060606060606060506060606061006060610061106100611061006110606061006FFFFFFFF",
"imei":"866597072523945",
"message":"ok",
"messageId":"API-xxx",
"no":100,
"source":"command",
"success":true
}
写入红外码
统一指令:controller-infrared-write
1.0.5 固件版本支持该接口
向设备发送指令 服务端向设备订阅topic发送消息
{
"action" : "ir_write",
"messageId" : "API-xxx",
"no" : 110,
"type" : "infrared"
}
设备返回信息 设备向服务端订阅topic上报消息
{
"commandName" : "controller-infrared-write",
"imei" : "866597072523945",
"message" : "ok",
"messageId" : "API-xxx",
"no" : 110,
"source" : "command",
"success" : true
}