Toggle a Door Using Automation Rules
1.0 Introduction
The following Automation rule explains how to setup a toggle feature on an NXT-MSC controller or True Mercury controller. This setup uses the 'Double Presentation' feature to trigger the unlock of the door and can also require the cardholder to be a member of a specific user group.
While the door is in an unlocked state a double presentation will generate a specific event type in live events. When the door is in a locked state a double presentation will generate a slightly different event. Both of these event types are then used as separate triggers to action the unlock and the re-lock of the specific reader/door.
2.0 Enable 'Double Presentation' at the Specific Reader
From the main menu click on Hardware >> Readers.
Place a check mark against the reader that will have the toggle function.
From the reader's Action menu (located on the right) select Edit.
The reader settings will appear.
Scroll down the reader settings until you see 'Enable Double Presentation'.
Check the box to enable this feature.
Present a valid credential to the reader twice and verify in live events you are seeing the double presentation event.
Note: Each time the credential is presented the reader will beep twice.
This is the specific event that will be used in Automation Rules as a trigger to Unlock the door.
3.0 Create the Macro Items to Unlock and Re-Lock the Door
The next steps are to create a macro with two items. The first item is to unlock the door and the second macro item is to re-lock the door.
3.1 Create the Macro Item Type that will Unlock the Door
- From the main menu, click on Automation >> Automation Rules.
- Click the CREATE MACRO ONLY button.
- Select the site that the controller is added to.
- Then select the specific controller. Click NEXT.
- Enter a macro name such as (Toggle Door).
Click the ADD ACTION button.
From the Action Item Type list select Reader Mode Control.
Leave the Action Item Prefix set to Type A.
Select the specific reader (for the toggle feature).
Set the mode to Unlocked.
Click the SAVE MACRO button.
3.2 Create the Macro Item Type to Re-Lock the Door
From the macro setup screen click on the ADD ACTION button again.
From the Action Item Type list, select Reader Mode Control.
Set the Action Item Prefix to Type B.
Select the same specific reader again.
Set the mode to Lock.
Click the SAVE MACRO button.
- The two macro item types will now appear on the automation rules screen.
4.0 Test the Unlock and Lock Macro Items
You can now execute the two new macro item types to verify they are functioning correctly.
- On the Automation Rules screen, locate the Action menu on the right side of the screen.
- From the drop-down menu, select Execute Macro with Prefix A (this is the Unlock action).
- Almost immediately the specific reader will Unlock (and the reader's LED will be green).
- Use the Action menu again and select Execute Macro with Prefix B (the re-lock action).
- Almost immediately the specific reader will lock (and the reader's LED will display amber).
5.0 Create the Triggers to Unlock and Re-Lock the Door
The next steps are to define the trigger events that will action the two different macro item types.
- If you perform a double credential presentation when the door is locked then the following event will appear in live events:
- If you perform a double credential presentation when the door is unlocked then the following event will appear in live events:
Note: this event type is slightly different to the double presentation event that is generated while the door is locked (therefore these two events can be used as separate triggers.
5.1 Create the Trigger that will Unlock the Door
To unlock the door we will use the double-presentation trigger event that is generated when the door is locked.
From the main menu, click on Automation >> Automation Rules.
Click the CREATE RULE button.
Select the site.
Select the specific controller.
Click NEXT.
Enter a name for the unlock trigger.
From the Trigger Source Group select: 'ACR: Access Control Reader'.
Click NEXT.
- From the Transaction Type menu on the right, select 'Formatted Card with Cardholder ID'.
- From the trigger source list, select the specific event that is generated when the door is locked (Access Event - Grant Double Presentation).
- Click NEXT.
- Select the specific reader that this will apply to.
- Click NEXT.
- Leave the schedule at always if you want the toggle unlock function to be operational at this reader 24/7.
- Click NEXT.
- From the linked macro list select the door unlock and lock macro.
- From the Macro Command list select to 'Execute Actions with Prefix A' (unlock the door).
- Click the SAVE button.
- With the reader in the locked state present the credential twice. The specific 'Access Event - Granted Double Presentation' event will be generated, the unlock macro will be triggered and the door will be unlocked.
5.2 Create the Trigger that will Re-Lock the Door
To lock the door we will use the double-presentation trigger event that is generated when the door is unlocked.
- From the main menu, click on Automation >> Automation Rules.
- Click the CREATE RULE button.
- Select the site.
- Select the specific controller.
- Click NEXT.
- Enter a name for the Re-lock trigger.
- From the Trigger Source Group select: 'ACR: Access Control Reader'.
- Click NEXT.
- From the Transaction Type menu on the right, select 'Formatted Card with Cardholder ID'.
- From the trigger source list, select the specific event that is generated when the door is locked (Access Event - Double Presentation).
- Click NEXT.
- Select the specific reader that this will apply to.
- Click NEXT.
- Leave the schedule at always if you want the toggle re-lock function to be operational at this reader 24/7.
- Click NEXT.
- From the linked macro list select the door unlock and lock macro.
- From the Macro Command list select to 'Execute Actions with Prefix B' (relock the door).
- Click the SAVE button.
- With the reader in the unlocked state present the credential twice. The specific 'Access Event - Double Presentation' event will be generated, the relock macro will be triggered and the door will be relock.
6.0 Test the Toggle Function With a Double Presentation
- When the reader/door is in the locked state, perform a double presentation and the reader will unlock.
- When the reader/door is in the unlocked state, perform a double presentation and the same reader will return to its locked state.
7.0 Restrict the Toggle Function to a Specific User Group
It is likely that the toggle functionality for a door needs to be applied only to a specific cardholder/ or cardholders. This can easily be achieved by creating a user group, assigning that user group to a cardholder and then selecting the user group in the trigger setup.
- From the main menu click on Automation Rules >> User Groups.
- Click the CREATE button located on the right side of the screen.
- Enter a new name for the group (i.e Toggle Group).
- Click SAVE.
- Go to the cardholder record and use the Action menu to select Edit.
- The cardholder edit for will appear.
- Scroll down the cardholder settings and assign the newly created user group.
- Save the cardholder record.
- From the main menu, click on Automation >> Automation Rules.
- Use the Action menu for the Unlock trigger.
- Select Edit Rule.
- Navigate to where the specific event type is selected.
- From the User Group list select the new user group that was setup and assigned to a specific cardholder.
- Set the User Group Index to 1.
- Click through the next screens and then save the rule.
- Repeat the steps to also assign the same user group to the re-lock trigger.
- Now the toggle functionality will only occur for cardholders which are assigned this specific user group. Other cardholders who perform a single or double presentation will unlock the door for the configured unlock time.