detection.door.unlockEvent (Unlock event)
detection.door.unlockEvent: Unlock event
detection.door.unlockEvent · device scope · message query permission Alarm
What it does
Reported on unlock. msgType is detection.door.unlockEvent. Subscribe to capabilityEvent for pushes. See Receive device messages, setMessageCallback, Event catalog、Overview and common payload.
Reported fields
Fields inside outputData. Platform fields are described in Overview and common payload.
| Name | Description | Type | Required | Values |
|---|---|---|---|---|
type | Unlock credential type. | enum | no | 0;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15 |
keyID | keyID | int | no | 0-999999, step 1 |
result | result | int | no | 0;1 |
direction | Unlock direction | enum | no | 0 unlock from outside; 1 unlock from inside |
Example
{
"msgType": "detection.door.unlockEvent",
"deviceId": "TESTIPC000012345",
"productId": "56WGTET2",
"outputData": {
"type": "0",
"keyID": 0,
"result": 0,
"direction": "0"
},
"time": 1673406989,
"localTime": "20230111T111629",
"alarmId": "116257862023505xxxx"
}
Minimum permission
The administrator does not need an extra permission on a device they bound. A shared device needs the alarm-message permission. A bound sub-user does not. A sub-account needs Alarm. List and search APIs filter out events you are not allowed to see.
