https://api.sciener.com/v3/lock/updateSetting
Modify lock settings, including: 2-Privacy lock、3-Temper alert、4-Reset button、6-Lock sound、7-Open direction、8-Sound volume、10-Wifi lock's power saving(Note: Wifi lock's power saving mode can only be set via bluetooth, it can't be set it via gateway).
If you have modified the lock setting via APP SDK, you can request this API to upload the setting value to cloud server;If the lock is WiFi lock or it's connected to gateway, you can request this API to modify lock settings remotely.
You can query modified lock settings by Get lock details.
POST, ContentType:application/x-www-form-urlencoded
xxxxxxxxxx71curl --location -g --request POST 'https://api.sciener.com/v3/lock/updateSetting' \2--data-urlencode 'clientId=4773aa036f7f49c68d876bb4be85c80c' \3--data-urlencode 'accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f' \4--data-urlencode 'lockId=163377' \5--data-urlencode 'type=3' \6--data-urlencode 'changeType=2' \7--data-urlencode 'date=1625025703000'| Name | Type | Required | Description |
|---|---|---|---|
| clientId | String | Y | client_id from Create application |
| accessToken | String | Y | Access token,refer to: Get access token |
| lockId | Int | Y | Lock ID, generated by Lock init |
| type | Int | Y | The item to be set:2-Privacy lock、3-Tamper alert、4-Reset button、6-Lock sound、7-Open direction、8-Sound volume、10-Wifi lock's power saving、11-Door unclosed alarm time setting Note: Wifi lock's power saving mode can only be set via bluetooth, it can't be set it via gateway. |
| value | Int | Y | Value: 1-on、2-off; Open direction:1-left open、2-right open; Sound volume: 1 to 5 Door unclosed alarm time: In seconds, 0 mean off, need door sensor |
| changeType | Int | Method: 1-via phone bluetooth, you should call APP SDK method first 2- via gateway or WiFi lock, you can call this api directly if it's a WiFi lock or it's connected to gateway | |
| date | Long | Y | Current time (timestamp in millisecond) |
| Parameter | Type | Description |
|---|---|---|
| errcode | Int | Error code |
| errmsg | String | Error message |
xxxxxxxxxx41{2"errcode": 0,3"errmsg": "none error message"4}