For Door Status, you can see the door status through the response of api/doors/status
However, we found out that the /api/doors/status cannot show the door heled opened/forced opened in BioStar 2 API even though BioStar 2 server can receive the two different alarms from the internal API. Please create a ticket to provide you a patch file until Suprema team releases a new version of BioStar 2 to update the API correctly.
<Response Example>
{
"door_id":
{
"id": "3"
},
"opened": "true",
"unlocked": "true",
"last_open_time": "1622466141",
"alarm": "2049", //held-opened + STATUS_OPERATOR_UNLOCKED
"status": "2048" //STATUS_OPERATOR_UNLOCKED
}
How to know the door status
Door Status | Description |
-1 | STATUS_INVALID |
0 | STATUS_NORMAL |
1 | STATUS_LOCKED |
2 | STATUS_UNLOCKED |
4 | STATUS_FORCED_OPEN_ALARM |
8 | STATUS_HELD_OPEN_ALARM |
16 | STATUS_APB_FAILED |
32 | STATUS_DISCONNECTED |
64 | STATUS_SCHEDULE_LOCKED |
128 | STATUS_SCHEDULE_UNLOCKED |
256 | STATUS_EMERGENCY_LOCKED |
512 | STATUS_EMERGENCY_UNLOCKED |
1024 | STATUS_OPERATOR_LOCKED |
2048 | STATUS_OPERATOR_UNLOCKED |
How to calculate the Alarm status
The Alam result needs to be combined with the door alarm+the door status.
Alarm | Held/Forced Opened Alarm | Description | Door Status | Description | ||
65 | = | 1 | Held Opened | + | 64 | STATUS_SCHEDULE_LOCKED |
66 | = | 2 | Forced Opened | + | 64 | STATUS_SCHEDULE_LOCKED |
129 | = | 1 | Held Opened | + | 128 | STATUS_SCHEDULE_UNLOCKED |
130 | = | 2 | Forced Opened | + | 128 | STATUS_SCHEDULE_UNLOCKED |
257 | = | 1 | Held Opened | + | 256 | STATUS_EMERGENCY_LOCKED |
258 | = | 2 | Forced Opened | + | 256 | STATUS_EMERGENCY_LOCKED |
513 | = | 1 | Held Opened | + | 512 | STATUS_EMERGENCY_UNLOCKED |
514 | = | 2 | Forced Opened | + | 512 | STATUS_EMERGENCY_UNLOCKED |
1025 | = | 1 | Held Opened | + | 1024 | STATUS_OPERATOR_LOCKED |
1026 | = | 2 | Forced Opened | + | 1024 | STATUS_OPERATOR_LOCKED |
2049 | = | 1 | Held Opened | + | 2048 | STATUS_OPERATOR_UNLOCKED |
2050 | = | 2 | Forced Opened | + | 2048 | STATUS_OPERATOR_UNLOCKED |