Remote Lock/Unlock
Execute Lock/Unlock
Flowchart
graph TD;
id(Execute Operation)
id1{Is Lock State Open}
id2(Unlock openDoor)
id3(Lock closeDoor)
id4{Unlock Result}
id5{Lock Result}
id6(Unlock Success)
id7(Lock Success)
id8(Show Error)
id --> id1
id1-->|Yes|id2
id1-->|No|id3
id2 --> id4
id3 --> id5
id4-->|Yes|id6
id4-->|No|id8
id5-->|Yes|id7
id5-->|No|id8Description
- To determine whether the lock is locked, you need to get the value of the lock state dp47(lock_motor_state) to judge. If the value is true, it means the door is open, otherwise it is closed.
- If the lock/unlock operation fails, you need to display a prompt message according to the error code
- The lock/unlock API fully validates whether the current
Remote Lock/Unlock Function Switchis enabled, whether the current device is online, whether the current user has remote lock/unlock permissions, etc.
Remote Lock/Unlock Function Switch
- Default is enabled, i.e., supports remote lock/unlock functionality
- Users can configure the switch
Remote Lock/Unlock Permissions
- Supported permissions include:
Only administrators can lock/unlock,Everyone can lock/unlock,No one can lock/unlock - Default remote lock/unlock permission is:
Everyone can lock/unlock
API
Check Remote Lock/Unlock Function Switch Status
- Meaning: Confirm whether the current remote lock/unlock function is available
- Details: View Documentation
Unlock
- Meaning: Send remote unlock command
- Details: View Documentation
Lock
- Meaning: Send remote lock command
- Details: View Documentation
Set Function Enable or Disable
- Meaning: Enable or disable remote lock/unlock function
- Details: View Documentation
Get Current Remote Lock/Unlock Permission
- Meaning: Get the current user's remote lock/unlock permission
- Details: View Documentation
Get Permission List
- Meaning: Get the permission list for remote lock/unlock
- Details: View Documentation
Configure Permission
- Meaning: Set remote lock/unlock permission
- Details: View Documentation