Skip to main content

AutoLock

1.AutoLock.getState

Get Current Lock State

BDDP

ParamValueDesc
methodAutoLock.getStateGet Current State
targetDevice<String,Necessary>DeviceId of the Lock you use;
token<String,Necessary>Net token of the Lock you use;

BUDP

ParamValueDesc
data.state<String,Necessary>Current lock state;["Locked","UnLocked"]
data.battery<String,Necessary>The battery of the lock; ["high","normal","low","empty"]

2.AutoLock.lock

Lock the special lock

BDDP

ParamValueDesc
methodAutoLock.lockLock Lock
targetDevice<String,Necessary>DeviceId of the Lock you use;
token<String,Necessary>Net token of the Lock you use;

BUDP

ParamValueDesc
data.state<String,Necessary>Current lock state;"Locked"

3.AutoLock.unlock

UnLock the special lock

BDDP

ParamValueDesc
methodAutoLock.unlockUnlock Lock
targetDevice<String,Necessary>DeviceId of the Lock you use;
token<String,Necessary>Net token of the Lock you use;

BUDP

ParamValueDesc
data.state<String,Necessary>Current lock state;"Locked"

4.AutoLock.getUserInfo

Get the user info by given user index, Admin is 0 .

BDDP

ParamValueDesc
methodAutoLock.getUserInfoGet user info by index
targetDevice<String,Necessary>DeviceId of the Lock you use;
token<String,Necessary>Net token of the Lock you use;
params.userId<String,Necessary>The index of the user that you want to fetch info, admin is 0

BUDP

ParamValueDesc
data.userInfo.maxCount<Integer,Necessary>The count of users.
data.userInfo.index<Integer,Necessary>Current userIndex.
data.userInfo.pwdCount<Integer,Necessary>The count of this user's password/card/finger
data.userInfo.typeCode<Integer,Necessary>The type of this user, ["管理员","主人",'孩子',"客人","保姆","钟点工","临时工"]
data.userInfo.nameBytes<ArrayBuffer,Necessary>The buffer of username,"GBK" encoded

5.AutoLock.addUser

Add user for lock

BDDP

ParamValueDesc
methodAutoLock.addUserAdd User
targetDevice<String,Necessary>DeviceId of the Lock you use;
token<String,Necessary>Net token of the Lock you use;
params.nameBytes<ArrayBuffer,Necessary>The username you want to add;

BUDP

ParamValueDesc
data.userInfo.index<Integer,Necessary>userIndex of the new user.

6.AutoLock.deleteUser

Delete user for this lock

BDDP

ParamValueDesc
methodAutoLock.deleteUserGet user info by index
targetDevice<String,Necessary>DeviceId of the Lock you use;
token<String,Necessary>Net token of the Lock you use;
params.userId<Integer,Necessary>The index of user that you want to delete;

BUDP

| Param | Value | Desc|


7.AutoLock.getUserPasswords

Lock Lock

BDDP

ParamValueDesc
methodAutoLock.getUserPasswordsGet user‘s password info by index
targetDevice<String,Necessary>DeviceId of the Lock you use;
token<String,Necessary>Net token of the Lock you use;
params.userId<Integer,Necessary>The index of user;
params.passwordId<Integer,Necessary>The index of passowrd; 0 is first

BUDP

ParamValueDesc
data.passwordInfo.maxCount<Integer,Necessary>Count of passwords
data.passwordInfo.id<Integer,Necessary>Index of password
data.passwordInfo.typeCode<Integer,Necessary>Type of password,["密码","指纹","卡"]
data.passwordInfo.password<NSString,Necessary>Content of password

8.AutoLock.addUserPassword

Lock Lock

BDDP

ParamValueDesc
methodAutoLock.addUserPasswordAdd password for special user
targetDevice<String,Necessary>DeviceId of the Lock you use;
token<String,Necessary>Net token of the Lock you use;
params.userId<Integer,Necessary>The index of user;
params.password<NSString,Necessary>The password you want to add

BUDP

ParamValueDesc

9.AutoLock.addUserCard

Lock Lock

BDDP

ParamValueDesc
methodAutoLock.addUserPasswordAdd password for special user
targetDevice<String,Necessary>DeviceId of the Lock you use;
token<String,Necessary>Net token of the Lock you use;
params.userId<Integer,Necessary>The index of user;
params.cardNo<NSString,Necessary>The password you want to add

BUDP

ParamValueDesc

10.AutoLock.delUserPassword

Lock Lock

BDDP

ParamValueDesc
methodAutoLock.addUserCardDelete password
targetDevice<String,Necessary>DeviceId of the Lock you use;
token<String,Necessary>Net token of the Lock you use;
params.userId<Integer,Necessary>The index of user;
params.passwordId<NSString,Necessary>Index of password
params.passwordTypeCode<NSString,Necessary>Type of password

BUDP

ParamValueDesc

11.AutoLock.clearPwd

Lock Lock

BDDP

ParamValueDesc
methodAutoLock.clearPwdClear all passwords
targetDevice<String,Necessary>DeviceId of the Lock you use;
token<String,Necessary>Net token of the Lock you use;

BUDP

ParamValueDesc

12.AutoLock.getLogs

Get lock logs

BDDP

ParamValueDesc
methodAutoLock.getLogsClear all passwords
targetDevice<String,Necessary>DeviceId of the Lock you use;
token<String,Necessary>Net token of the Lock you use;

BUDP

ParamValueDesc

13.AutoLock.getVersion

Get firmware info

BDDP

ParamValueDesc
methodAutoLock.getVersionGet firmware info;
targetDevice<String,Necessary>DeviceId of this device;
token<String,Necessary>Net Token of this device;

BUDP

ParamValueDesc
data.version<String,Necessary>Current Version;
data.newVersion.versionId<String,Optional>Id of the newest version;
data.newVersion.versionCode<String,Optional>Code of the newest version;
data.newVersion.fileSize<String,Optional>File Size of the newest version;

14.AutoLock.startUpgrade

Start Upgrade

BDDP

ParamValueDesc
methodAutoLock.startUpgradeStart Upgrade
targetDevice<String,Necessary>DeviceId of this device;
token<String,Necessary>Net Token of this device;
params.versionId<String,Necessary>Version Id you want to upgrade;

BUDP

ParamValueDesc
data.isStarted<Boolean,Necessary>Is upgrading started;