ApartmentLock
1.ApartmentLock.getState
Get Current ApartmentLock State
Param | Value | Desc |
---|---|---|
method | ApartmentLock.getState | Get Current State |
targetDevice | <String,Necessary> | DeviceId of the ApartmentLock you use; |
token | <String,Necessary> | Net token of the ApartmentLock you use; |
Param | Value | Desc |
---|---|---|
data.state | <String,Necessary> | Current lock state;"Locked" |
data.battery | <String,Necessary> | The battery of the lock;Voltage now;will change to per later |
2.ApartmentLock.lock
Lock ApartmentLock
Param | Value | Desc |
---|---|---|
method | ApartmentLock.lock | Lock ApartmentLock |
targetDevice | <String,Necessary> | DeviceId of the ApartmentLock you use; |
token | <String,Necessary> | Net token of the ApartmentLock you use; |
Param | Value | Desc |
---|---|---|
data.state | <String,Necessary> | Current lock state;"Locked" |
data.battery | <String,Necessary> | The battery of the lock;Voltage now;will change to per later |
3.ApartmentLock.unlock
UnLock ApartmentLock
Param | Value | Desc |
---|---|---|
method | ApartmentLock.close | UnLock ApartmentLock |
targetDevice | <String,Necessary> | DeviceId of the ApartmentLock you use; |
token | <String,Necessary> | Net token of the ApartmentLock you use; |
Param | Value | Desc |
---|---|---|
data.state | <String,Necessary> | Current lock state;"Locked" |
data.battery | <String,Necessary> | The battery of the lock;Voltage now;will change to per later |
4.ApartmentLock.addPwd
Add password to ApartmentLock
Param | Value | Desc |
---|---|---|
method | ApartmentLock.addPwd | Add password to ApartmentLock |
targetDevice | <String,Necessary> | DeviceId of the ApartmentLock you use; |
params.password | <String,Necessary> | Password,6-8 Number; |
params.expires | <Integer,Optional> | Expire time,the unit is hour,null means forever,default null; |
params.enable | <Boolean,Optional> | Is this password enable,default true; |
Param | Value | Desc |
---|---|---|
state | <String,Necessary> | result,"SetSuccess" |
5.ApartmentLock.updatePwd
Update password
Param | Value | Desc |
---|---|---|
method | ApartmentLock.updatePwd | Update Password |
targetDevice | <String,Necessary> | DeviceId of the ApartmentLock you use; |
params.oldPwd | <String,Necessary> | The old password you want to update |
params.newPwd | <String,Optional> | The new password,6-8 Number;Not update when null |
params.expires | <Integer,Optional> | Expire time,the unit is hour,null means forever,default null; |
params.enable | <Boolean,Optional> | Is this password enable,default true; |
Param | Value | Desc |
---|---|---|
state | <String,Necessary> | result,"SetSuccess" |
6.ApartmentLock.getTemporaryPassword
Get Temporary Password
Param | Value | Desc |
---|---|---|
method | ApartmentLock.getTemporaryPassword | Get Temporary Password |
targetDevice | <String,Necessary> | DeviceId of the ApartmentLock you use; |
params.expires | <Integer,Necessary> | Expire time,the unit is hour,between 0 and 24*7; |
Param | Value | Desc |
---|---|---|
data.password | <String,Necessary> | The Temporary Password |
data.expires | <Integer,Necessary> | The Expire Time |
7.ApartmentLock.updateSuperPwd
Update Super Password
Param | Value | Desc |
---|---|---|
method | ApartmentLock.updateSuperPwd | Update Super Password |
targetDevice | <String,Necessary> | DeviceId of the ApartmentLock you use; |
params.password | <String,Necessary> | The new super password,6-8 Number; |
Param | Value | Desc |
---|---|---|
state | <String,Necessary> | result,"SetSuccess" |
8.ApartmentLock.delPwd
Delete User Password
Param | Value | Desc |
---|---|---|
method | ApartmentLock.delPwd | Delete Apartment Lock's password |
targetDevice | <String,Necessary> | DeviceId of the ApartmentLock you use; |
params.password | <String,Necessary> | The password you want to update; |
Param | Value | Desc |
---|---|---|
state | <String,Necessary> | result,"SetSuccess" |
9.ApartmentLock.clearPwd
Clear User Password
Param | Value | Desc |
---|---|---|
method | ApartmentLock.clearPwd | Clear Apartment Lock's password |
targetDevice | <String,Necessary> | DeviceId of the ApartmentLock you use; |
Param | Value | Desc |
---|---|---|
state | <String,Necessary> | result,"SetSuccess" |
10.Callbacks
Param | Value | Desc |
---|---|---|
data.state | <String,Necessary> | result,"Locked" |
data.battery | <String,Necessary> | The battery of the lock;Voltage now; |