https://api.sciener.com/v3/lock/configurePassageMode
在设置的常开时间段内,锁被打开后将一直处于打开的状态,直到被手动关闭。
POST, ContentType:application/x-www-form-urlencoded
xxxxxxxxxx81curl --location -g --request POST 'https://api.sciener.com/v3/lock/configurePassageMode' \2--data-urlencode 'clientId=4773aa036f7f49c68d876bb4be85c80c' \3--data-urlencode 'accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f' \4--data-urlencode 'lockId=163377' \5--data-urlencode 'passageMode=1' \6--data-urlencode 'cyclicConfig=[{"isAllDay":2,"startTime":480,"endTime":1080,"weekDays":[1,2]}]' \7--data-urlencode 'type=2' \8--data-urlencode 'date=1625025703000'| 名称 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
| clientId | String | Y | 创建应用分配的client_id |
| accessToken | String | Y | 访问令牌,通过获取访问令牌接口获取 |
| lockId | Int | Y | 锁ID,由锁初始化接口生成 |
| passageMode | Int | Y | 常开模式:1-开启、2-关闭 |
| cyclicConfig | String | N | JsonArray转成String,可参考上方示例 循环时间设置,最多只能设置五段时间 |
| autoUnlock | Int | N | 自动开锁:1-开启、2-关闭,开启后锁将在常开模式开始时自动打开 |
| type | Int | Y | 设置方式: 1-通过APP蓝牙,必需先通过APP SDK蓝牙设置常开模式后再调用该接口 2-通过网关或WiFi锁,如果是WiFi锁或有连接网关,传2可通过云端接口直接设置生效, 不传默认1。 |
| date | Long | Y | 当前时间(时间戳,单位毫秒) |
cyclicConfig中的参数:
| 参数 | 类型 | 描述 |
|---|---|---|
| isAllDay | Int | 是否全天常开:1-是、2-否 |
| startTime | Int | 开始时间,分钟数, 例如 480 代表 8:00 |
| endTime | Int | 结束时间,分钟数, 例如 1080 代表 18:00 |
| weekDays | JsonArray[Int] | 循环有效星期:1-7,如[1,2,3] |
| 参数 | 类型 | 描述 |
|---|---|---|
| errcode | Int | 错误码 |
| errmsg | String | 错误信息 |
| description | String | 错误描述 |
xxxxxxxxxx51{2"errcode": 0,3"errmsg": "none error message",4"description":"表示成功或是"5}