Lock init
https://api.sciener.com/v3/lock/init
Call this api after calling SDK method to add a lock. This api will create an admin ekey for current user. If lock is already added via Sciener's APP, there is no need to call this API, just call lock/list api to get the lock .
After initializing a lock, the admin can send ekey or create passcode for others.
1. Description
| Name |
Type |
Required |
Description |
| clientId |
String |
Y |
The app_id which is assigned by system when you create an application |
| accessToken |
String |
Y |
Access token |
| lockName |
String |
Y |
Lock name |
| lockAlias |
String |
N |
Lock alias |
| lockMac |
String |
Y |
Lock MAC |
| lockKey |
String |
Y |
The key data which will be used to unlock |
| lockFlagPos |
Int |
Y |
The flag which will be used to check the validity of the ekey |
| aesKeyStr |
String |
Y |
AES encryption key |
| lockVersion |
JsonObject |
Y |
Lock version |
| adminPwd |
String |
Y |
admin code, which only belongs to the admin ekey, will be used to verify the admin permission. |
| noKeyPwd |
String |
Y |
Super passcode, which only belongs to the admin ekey, can be entered on the keypad to unlock |
| deletePwd |
String |
N |
Erasing passcode,which belongs to old locks, has been abandoned. Please don't use it. |
| pwdInfo |
String |
Y |
Initial data of passcode, which is generated by SDK, is used to create passcode |
| timestamp |
String |
Y |
The timestamp which is generated by SDK during lock initializing time |
| specialValue |
Int |
Y |
characteristic value. it is used to indicate what kinds of feature do a lock support. |
| electricQuantity |
Int |
Y |
Lock battery |
| timezoneRawOffset |
Long |
Y |
The offset between your time zone and UTC, in millisecond |
| modelNum |
String |
Y |
Product model |
| hardwareRevision |
String |
Y |
Hardware version |
| firmwareRevision |
String |
Y |
Firmware version |
| date |
Long |
Y |
Current time (timestamp in millisecond) |
Parameter in lockVersion object
| Parameter |
Type |
Description |
| protocolType |
Int |
Protocol type |
| protocolVersion |
Int |
Protocol version |
| scene |
Int |
Scene |
| groupId |
Int |
ClientID |
| orgId |
Int |
ClientSubID |
2.Response
| Parameter |
Type |
Description |
| lockId |
Int |
Lock ID |
| keyId |
Int |
Admin ekey id |
3.Example of response
{
"lockId": 456456,
"keyId": 456456
}