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

5.1 下发配置接口

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

5.2 产品支持配置参数

5.2.1 产品配置
配置 名称 内容 说明
开机状态
relay1
{"relay1":"1"}
{"relay1":"0"}
通行动作
pass_action
先断后通 {"pass_action":"reset"}
先通后断 {"pass_action":"point"}
{"pass_action":"1"}
{"pass_action":"0"}
无动作 {"pass_action":"dis"}
延时时间(毫秒)
pass_time
1秒 {"pass_time":"1000"}
2秒 {"pass_time":"2000"}
3秒 {"pass_time":"3000"}
4秒 {"pass_time":"4000"}
5秒 {"pass_time":"5000"}
8秒 {"pass_time":"8000"}
10秒 {"pass_time":"10000"}
出门开关动作
action1
先断后通 {"action1":"reset"}
先通后断 {"action1":"point"}
{"action1":"1"}
{"action1":"0"}
无动作 {"action1":"dis"}
出门开关延时
time1
1秒 {"time1":"1000"}
2秒 {"time1":"2000"}
3秒 {"time1":"3000"}
4秒 {"time1":"4000"}
5秒 {"time1":"5000"}
按钮灵敏度
sensitivity
1 {"sensitivity":"1"}
2 {"sensitivity":"2"}
3 {"sensitivity":"3"}
4 {"sensitivity":"4"}
5 {"sensitivity":"5"}
6 {"sensitivity":"6"}
7 {"sensitivity":"7"}
8 {"sensitivity":"8"}
阈值
threshold
4 {"threshold":"4"}
6 {"threshold":"6"}
8 {"threshold":"8"}
10 {"threshold":"10"}
20 {"threshold":"20"}
50 {"threshold":"50"}