Skip to main content

LockV2

1.LockV2.fetchState

Fetch current status of device (Fetch the newest status of the device in the cache)

BDDP

ParamValueDesc
methodLockV2.fetchStateFetch newest status
targetDevice<String,Necessary>DeviceId of the Lock you use
token<String,Necessary>Net token of the Lock you use

BUDP

ParamValueDesc
data.state.state.lock<String,Necessary>State of lock,["locked","unlocked"]
data.state.attributes.autoLock<Integer,Necessary>Auto lock duration in seconds, 0 is disable
data.state.attributes.enableSetButton<Boolean,Necessary>Enable set button
data.state.attributes.rlSet<String,Necessary>Left/Right open door["left","right"]
data.state.attributes.soundLevel<Integer,Necessary>Volume mute,low,medium,high [0-3]
data.state.battery<Integer,Necessary>Level of device's battery, 0 to 4 means empty to full
data.hwVersion<String,Necessary>Hardware Version of device
data.version<String,Necessary>Firmware Version of device
data.tz<Integer,Necessary>Timezone of device. -12 ~ 12

2.LockV2.getState

Get current status of device (Get the newest status from the device)

BDDP

ParamValueDesc
methodLockV2.getStateGet current status
targetDevice<String,Necessary>DeviceId of the Lock you use;
token<String,Necessary>Net token of the Lock you use;

BUDP

ParamValueDesc
data.state.lock<String,Necessary>State of lock,["locked","unlocked"];
data.attributes.autoLock<Integer,Necessary>Auto lock duration in seconds, 0 is disable
data.attributes.enableSetButton<Boolean,Necessary>Enable set button
data.attributes.rlSet<String,Necessary>Left/Right open door["left","right"]
data.attributes.soundLevel<Integer,Necessary>Volume mute,low,medium,high [0-3]
data.battery<Integer,Necessary>Level of device's battery, 0 to 4 means empty to full
data.hwVersion<String,Necessary>Hardware Version of device
data.version<String,Necessary>Firmware Version of device
data.tz<Integer,Necessary>Timezone of device. -12 ~ 12

3.LockV2.setState

Lock\Unlock

BDDP

ParamValueDesc
methodLockV2.setStateLock/UnLock the door
targetDevice<String,Necessary>DeviceId of the device you use
token<String,Necessary>Net token of the device you use
params.state.lock<String,Necessary>Lock\Unlock state["locked","unlocked"]

BUDP

ParamValueDesc
data.state.lock<String,Necessary>State of lock,["locked","unlocked"]

4.LockV2.setAttributes

Set lock attributes

BDDP

ParamValueDesc
methodLockV2.setAttributesLock/UnLock the door
targetDevice<String,Necessary>DeviceId of the device you use
token<String,Necessary>Net token of the device you use
params.autoLock<Integer,Optional>Auto lock duration in seconds,0 is disable
params.rlSet<String,Optional>Left/Right open door["left","right"]
params.soundLevel<Integer,Optional>Volume mute,low,medium,high [0-3]
params.enableSetButton<Boolean,Optional>Enable set button

BUDP

ParamValueDesc
methodLockV2.setAttributesLock/UnLock the door
targetDevice<String,Necessary>DeviceId of the device you use
token<String,Necessary>Net token of the device you use
params.autoLock<Integer,Necessary>Auto lock duration in seconds,0 is disable
params.rlSet<String,Necessary>Left/Right open door ["left","right"]
params.soundLevel<Integer,Necessary>Volume mute,low,medium,high [0-3]
params.enableSetButton<Boolean,Necessary>Enable set button

5.LockV2.userManagement

getTemporaryCredentials

BDDP

ParamValueDesc
methodLockV2.userManagementUser management
targetDevice<String,Necessary>DeviceId of the Lock you use
token<String,Necessary>Net token of the Lock you use
params.command<String,Necessary>User management command: getTemporaryCredentials
params.type<String,Necessary>Temporary credential type ["OneTime","RangeTime","PeriodTime"]

BUDP

ParamValueDesc
data.command<String,Necessary>User management command: getTemporaryCredentials
data.credentials[index].id<Integer,Necessary>CredentialId
data.credentials[index].cipher.type<String,Necessary>Credential cipher type ["password"]
data.credentials[index].cipher.secret<String,Necessary>Credential cipher secret, encoded with base64
data.credentials[index].startAt<Long,Optional>Effective time timestamp in milliseconds, Available when type is "RangeTime" or "PeriodTime"
data.credentials[index].endAt<Long,Optional>Expiration time timestamp in milliseconds, Available when type is "RangeTime" or "PeriodTime"
data.credentials[index].effectivePeriod.type<String,Necessary>Effective period type ["disable","weekly","monthly"]
data.credentials[index].effectivePeriod.value<String[],Optional>Effective period value, if effective period type is "weekly" [0-6](Sunday to Saturday), if effective period type is "monthly" [1-31], Available when type is "PeriodTime"

addTemporaryCredential

BDDP

ParamValueDesc
methodLockV2.userManagementUser management
targetDevice<String,Necessary>DeviceId of the Lock you use
token<String,Necessary>Net token of the Lock you use
params.command<String,Necessary>User management command: addTemporaryCredential
params.type<String,Necessary>Temporary credential type ["OneTime","RangeTime","PeriodTime"]
params.cipher.type<String,Necessary>Cipher type ["Password"]
params.cipher.secret<Optional,Necessary>Secret is required if cipher type is Password,encode with base64
params.startAt<Long,Optional>Effective timestamp in milliseconds, Available when type is "RangeTime" or "PeriodTime"
params.endAt<Long,Optional>Expiration timestamp in milliseconds, Available when type is "RangeTime" or "PeriodTime"
params.effectivePeriod.type<String,Necessary>Effective period type ["disable","weekly","monthly"]
params.effectivePeriod.value<String[],Optional>Effective period value, if effective period type is "weekly" [0-6](Sunday to Saturday), if effective period type is "monthly" [1-31], Available when type is "PeriodTime"
params.effectiveStartTime<String,Optional>Effective start time is required if credential type is "PeriodTime", format with "H:m", Available when type is "PeriodTime"
params.effectiveEndTime<String,Optional>Effective end time is required if credential type is "PeriodTime", format with "H:m", Available when type is "PeriodTime"

A maximum of 3 temporary passwords per type

BUDP

ParamValueDesc
data.command<String,Necessary>User management command: addTemporaryCredential

delTemporaryCredential

BDDP

ParamValueDesc
methodLockV2.userManagementUser management
targetDevice<String,Necessary>DeviceId of the Lock you use
token<String,Necessary>Net token of the Lock you use
params.command<String,Necessary>User management command: delTemporaryCredential
params.credentialId<Integer,Necessary>credentialId

BUDP

ParamValueDesc
data.command<String,Necessary>User management command: delTemporaryCredential

getUserList

BDDP

ParamValueDesc
methodLockV2.userManagementUser management
targetDevice<String,Necessary>DeviceId of the Lock you use
token<String,Necessary>Net token of the Lock you use
params.command<String,Necessary>User management command: getUserList

BUDP

ParamValueDesc
data.command<String,Necessary>User management command: getUserList
data.users[index].id<Integer,Necessary>UserId

index from "0" to "11"

delUser

BDDP

ParamValueDesc
methodLockV2.userManagementUser management
targetDevice<String,Necessary>DeviceId of the Lock you use
token<String,Necessary>Net token of the Lock you use
params.command<String,Necessary>User management command: delUser
params.userId<Integer,Necessary>UserId

BUDP

ParamValueDesc
data.command<String,Necessary>User management command: delUser

getUserCredentials

BDDP

ParamValueDesc
methodLockV2.userManagementUser management
targetDevice<String,Necessary>DeviceId of the Lock you use
token<String,Necessary>Net token of the Lock you use
params.command<String,Necessary>User management command: getUserCredentials
params.userId<Integer,Necessary>UserId

BUDP

ParamValueDesc
data.command<String,Necessary>User management command: getUserCredentials
data.credentials[index].id<Integer,Necessary>CredentialId
data.credentials[index].cipher.type<String,Necessary>Cipher type ["Fingerprint","Card","Fob","Code"]
data.credentials[index].cipher.secret<Optional,Necessary>Secret is required if cipher type is Code
data.credentials[index].startAt<Long,Necessary>Effective timestamp milliseconds
data.credentials[index].endAt<Long,Necessary>Expiration timestamp milliseconds
data.credentials[index].effectivePeriod.type<String,Necessary>Effective period ["disable","weekly","monthly"]
data.credentials[index].effectiveStartTime<String,Necessary>Effective start time; H:m
data.credentials[index].effectiveEndTime<String,Necessary>Effective end time ; H:m
data.credentials[index].effectiveTimes<Integer,Necessary>Effective times

addUserCredential

BDDP

ParamValueDesc
methodLockV2.userManagementUser management
targetDevice<String,Necessary>DeviceId of the Lock you use
token<String,Necessary>Net token of the Lock you use
params.command<String,Necessary>User management command: addUserCredential
params.userId<Integer,Necessary>UserId
params.cipher.type<Optional,Necessary>Cipher type ["Fingerprint","Card","Fob","Code"]
params.cipher.secret<String,Necessary>Secret is required if cipher type is Code, length[4-8] encode with base64
params.effectivePeriod.type<String,Necessary>Effective period ["disable","weekly","monthly"]
params.effectiveStartTime<String,Necessary>Effective start time, H:m
params.effectiveEndTime<String,Necessary>Effective end time, H:m
params.effectiveTimes<Integer,Necessary>Effective times, 0 is no limits

BUDP

ParamValueDesc
data.command<String,Necessary>User management command: addUserCredential
data.credentials[index].id<Integer,Necessary>CredentialId
data.credentials[index].cipher.type<String,Necessary>cipher type ["Fingerprint","Card","Fob","Code"]

delUserCredential

BDDP

ParamValueDesc
methodLockV2.userManagementUser management
targetDevice<String,Necessary>DeviceId of the Lock you use
token<String,Necessary>Net token of the Lock you use
params.command<String,Necessary>User management command: delUserCredential
params.userId<Integer,Necessary>UserId
params.credentialId<Integer,Necessary>User credentialId
params.cipherType<Optional,Necessary>Cipher type ["Fingerprint","Card","Fob","Code"]

BUDP

ParamValueDesc
data.command<String,Necessary>User management command: delUserCredential