在向设备下发配置前,请先确定设备已连接网络,并在控制台显示在线。

5.1 下发配置接口

接口地址:
https://api.yoyoiot.cn/{AppID}/device/config/?sign={sign}&ts={ts}
{AppID} 为您的应用ID(由平台生成)请按准备工作的引导进入控制台,在开发设置页面查看。
{sign} 和 {ts} 的算法,请查看第三章节的描述
请求数据:
{
	"device":820720,
	"config":{"action1":"reverse"}
}
请求方式:POST;数据格式:JSON
这段命令是让ID为 820720 的 智能人体存在红外传感器[壁挂] 设置为 按钮动作 : 状态反转 的配置参数下发
更多配置参数请到下方5.2 产品支持配置参数查看

5.2 产品支持配置参数

5.2.1 产品配置
配置 名称 内容 说明
按钮动作
action1
状态反转 {"action1":"reverse"}
禁用 {"action1":"disable"}
LED灯
led
与线路同步 {"led":"rl_s"}
与线路相反 {"led":"rl_r"}
与存在同步 {"led":"ss_s"}
与存在相反 {"led":"ss_r"}
长亮 {"led":"1"}
长灭 {"led":"0"}
闪烁 {"led":"blink"}
红外开机状态
infrared
打开 {"infrared":"1"}
关闭 {"infrared":"0"}
红外有人触发持续时间
infrared_change_1
马上 {"infrared_change_1":"0"}
1s {"infrared_change_1":"1"}
2s {"infrared_change_1":"2"}
3s {"infrared_change_1":"3"}
5s {"infrared_change_1":"5"}
红外无人触发持续时间
infrared_change_0
马上 {"infrared_change_0":"0"}
30s {"infrared_change_0":"30"}
1m {"infrared_change_0":"60"}
2m {"infrared_change_0":"120"}
3m {"infrared_change_0":"180"}
5m {"infrared_change_0":"300"}
10m {"infrared_change_0":"600"}
线路开机状态
relay1
{"relay1":"1"}
{"relay1":"0"}
发现无人时线路动作
relay_change_0
打开 {"relay_change_0":"1"}
关闭 {"relay_change_0":"0"}
无动作 {"relay_change_0":"no"}
发现有人时线路动作
relay_change_1
打开 {"relay_change_1":"1"}
关闭 {"relay_change_1":"0"}
无动作 {"relay_change_1":"no"}