Affected SDK Version: Suprema G-SDK v1.9.0 or later

Overview


This article explains how to register a Lock Override card and open a locked door using Suprema G-SDK.


In general, when a door is in the Locked state, it does not open even after successful authentication. However, in a fire or other emergency, you may need to open a locked door, and the Lock Override feature is provided for this purpose.


Closed vs. Locked
In Suprema G-SDK, Closed and Locked are different door states. Closed refers to the physical position of the door, while Locked refers to the state of the door lock. A door in the normal locked state can be unlocked after successful authentication. However, a door locked with a DoorFlag such as SCHEDULED or OPERATOR does not open even after successful authentication, and access is denied. In this article, the Locked state refers to this case.


Lock Override opens a door in the Locked state using a pre-registered card, and it is supported in Suprema G-SDK v1.9.0 or later.


When you present a Lock Override card to a door in the Locked state, whether the door opens is determined by the priority of the DoorFlag applied to the door. A door in the Locked state (e.g., Scheduled Lock or Operator Lock) can be opened, but a door in the EMERGENCY lock state cannot.


How does Lock Override work?


When a Lock Override card is presented to a door in the Locked state, the authentication is processed as an unlock request with EMERGENCY priority.


Lock/Unlock requests for a door use DoorFlag, which indicates which request is controlling the door and its priority. The priority of DoorFlag is EMERGENCY > OPERATOR > SCHEDULED > NONE.


DoorFlag
Value
Meaning
NONE
0
Lock/Unlock by normal operation
SCHEDULED
1
Lock/Unlock by schedule (e.g., Scheduled Lock/Unlock Zone)
OPERATOR
4
Lock/Unlock by an operator command
EMERGENCY
2
Lock/Unlock due to an emergency condition
(e.g., Fire Alarm Zone or Intrusion Alarm Zone)

 

The Lock/Unlock status of a door is determined by the priority of the currently applied lockFlags and unlockFlags.


lockFlags indicates which DoorFlag locked the door, and unlockFlags indicates which DoorFlag unlocked it. If an unlock request has a lower priority than the current lockFlags, the unlock operation fails.


Therefore, whether a Lock Override card actually opens the door depends on the current lockFlags of the door. The result of presenting a Lock Override card for each DoorFlag is as follows.


DoorFlag
Result of presenting a Lock Override card
NONE
The card is processed as a normal authentication credential.
However, a card registered without a userID does not open the door.
SCHEDULED
unlockFlags is set to EMERGENCY, and the door opens.
OPERATOR
unlockFlags is set to EMERGENCY, and the door opens.
EMERGENCY
Access is denied with a Locked message, and the door remains locked.

 

How to configure and use Lock Override

Before you begin: Check device support

Before using Lock Override, check whether your device supports the feature.

If the lockOverrideSupported value of DeviceCapability is true, the device supports Lock Override.

You can check the DeviceCapability values using the GetCapability API.


GetCapability API: https://supremainc.github.io/g-sdk/api/device/#getcapability


Step 1: Register a Lock Override card

To use Lock Override, register the card to be used for emergency opening as a Lock Override credential.

You can register the card using the SetLockOverride API. Both CSN cards and secure cards can be used as Lock Override cards.


SetLockOverride API: https://supremainc.github.io/g-sdk/api/card/#setlockoverride


Note

  • If the card is already assigned to a user, also specify the userID.
  • If you do not specify a userID, the card is registered for emergency opening only. In this case, it cannot be used for normal authentication when the door is not locked.
  • Up to 8 Lock Override credentials can be registered per user, and up to 1,000 per device.


Step 2: Use Lock Override

Procedure

  1. Lock the door using the DoorFlag you want to test.
  2. Present the registered Lock Override card to the door in the Locked state.
  3. Call Door.GetStatus to check the lockFlags and unlockFlags values and whether the door has opened.


Result

  • In the NONE state, the card is processed as a normal authentication credential.
  • In the Locked state (e.g., Scheduled Lock or Operator Lock), the door switches to the EMERGENCY unlock state and opens.
  • In the EMERGENCY lock state, the door does not open, and access is denied with a Locked message.


Optional: Manage registered credentials

You can manage the registered credentials using the Lock Override APIs.


API
Action
Card.GetLockOverride
Retrieves a specific Lock Override credential registered on the device
Card.DeleteLockOverride
Deletes a credential registered as a Lock Override credential


GetLockOverride API: https://supremainc.github.io/g-sdk/api/card/#getlockoverride

DeleteLockOverride API: https://supremainc.github.io/g-sdk/api/card/#deletelockoverride