Toggle a Door (to alternate between lock and unlock)

Toggle a Door (to alternate between lock and unlock)

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

  1. From the main menu click on Hardware >> Readers.
  2. Place a check mark against the reader that will have the toggle function.
  3. From the reader's Action menu (located on the right) select Edit.
  4. The reader settings will appear.
  5. Scroll down the reader settings until you see 'Enable Double Presentation'.
  6. Check the box to enable this feature. 



  7. 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.



  8. 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

  1. From the main menu, click on Automation >> Automation Rules.
  2. Click the CREATE MACRO ONLY button.



  3. Select the site that the controller is added to.
  4. Then select the specific controller. Click NEXT.
  5. Enter a macro name such as (Toggle Door).
  6. Click the ADD ACTION button.



  7. From the Action Item Type list select Reader Mode Control.
  8. Leave the Action Item Prefix set to Type A.
  9. Select the specific reader (for the toggle feature).
  10. Set the mode to Unlocked.



  11. Click the SAVE MACRO button.

3.2 Create the Macro Item Type to Re-Lock the Door

  1. From the macro setup screen click on the ADD ACTION button again.
  2. From the Action Item Type list, select Reader Mode Control.
  3. Set the Action Item Prefix to Type B.
  4. Select the same specific reader again.
  5. Set the mode to Lock.



  6. Click the SAVE MACRO button.
  7. 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.
  1. On the Automation Rules screen, locate the Action menu on the right side of the screen.
  2. From the drop-down menu, select Execute Macro with Prefix A (this is the Unlock action).
  3. Almost immediately the specific reader will Unlock (and the reader's LED will be green).
  4. Use the Action menu again and select Execute Macro with Prefix B (the re-lock action).
  5. 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.

  1. If you perform a double credential presentation when the door is locked then the following event will appear in live events:



  1. 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.
  1. From the main menu, click on Automation >> Automation Rules.
  2. Click the CREATE RULE button.
  3. Select the site.
  4. Select the specific controller.
  5. Click NEXT.
  6. Enter a name for the unlock trigger.
  7. From the Trigger Source Group select: 'ACR: Access Control Reader'.
  8. Click NEXT.
  9. From the Transaction Type menu on the right, select 'Formatted Card with Cardholder ID'.
  10. From the trigger source list, select the specific event that is generated when the door is locked (Access Event - Grant Double Presentation).



  11. Click NEXT.
  12. Select the specific reader that this will apply to.
  13. Click NEXT.
  14. Leave the schedule at always if you want the toggle unlock function to be operational at this reader 24/7.
  15. Click NEXT.
  16. From the linked macro list select the door unlock and lock macro.
  17. From the Macro Command list select to 'Execute Actions with Prefix A' (unlock the door).
  18. Click the SAVE button.



  19. 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.

  1. From the main menu, click on Automation >> Automation Rules.
  2. Click the CREATE RULE button.
  3. Select the site.
  4. Select the specific controller.
  5. Click NEXT.
  6. Enter a name for the Re-lock trigger.
  7. From the Trigger Source Group select: 'ACR: Access Control Reader'.
  8. Click NEXT.
  9. From the Transaction Type menu on the right, select 'Formatted Card with Cardholder ID'.
  10. From the trigger source list, select the specific event that is generated when the door is locked (Access Event - Double Presentation).



  11. Click NEXT.
  12. Select the specific reader that this will apply to.
  13. Click NEXT.
  14. Leave the schedule at always if you want the toggle re-lock function to be operational at this reader 24/7.
  15. Click NEXT.
  16. From the linked macro list select the door unlock and lock macro.
  17. From the Macro Command list select to 'Execute Actions with Prefix B' (relock the door).



  18. Click the SAVE button.
  19. 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

  1. When the reader/door is in the locked state, perform a double presentation and the reader will unlock.
  2. 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. 

  1. From the main menu click on Automation Rules >> User Groups.
  2. Click the CREATE button located on the right side of the screen.
  3. Enter a new name for the group (i.e Toggle Group).
  4. Click SAVE.
  5. Go to the cardholder record and use the Action menu to select Edit.
  6. The cardholder edit for will appear.
  7. Scroll down the cardholder settings and assign the newly created user group.



  8. Save the cardholder record.
  9. From the main menu, click on Automation >> Automation Rules.
  10. Use the Action menu for the Unlock trigger.
  11. Select Edit Rule.
  12. Navigate to where the specific event type is selected.
  13. From the User Group list select the new user group that was setup and assigned to a specific cardholder.
  14. Set the User Group Index to 1.



  15. Click through the next screens and then save the rule.
  16. Repeat the steps to also assign the same user group to the re-lock trigger.
  17. 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.



    • Related Articles

    • Lock and Unlock Doors

      1.0 Introduction Reader Control allows you to lock, unlock or temp unlock any door on the system. A temp unlock will unlock the door for the same duration as following a valid card read. You can send remote lock and unlock commands to a single door ...
    • Auto Unlock Time Schedules

      1.0 Introduction Auto-Unlock Time Schedules (AUL) allow you to use a time schedule to automatically configure a door to unlock and re-lock at certain times of the day. The door will unlock at the start time of a schedule and will re-lock at the stop ...
    • PXL - Global Lock

      PXL Global Lock, Lockout and Lockdown - Using PXL-500 Controllers in Borealis 1.0 Introduction The global lock feature uses a dedicated input on the satellite board installed on the primary controller. This option will not appear if a satellite board ...
    • PXL - Global Lock

      PXL Global Lock, Lockout and Lockdown - Using PXL-500 Controllers in Borealis 1.0 Introduction The global lock feature uses a dedicated input on the satellite board installed on the primary controller. This option will not appear if a satellite board ...
    • PXL - Global Unlock

      1.0 Introduction This section explains how to enable the standard implementation of the Global Unlock feature using the dedicated Global Unlock input on a Primary PXL controller (controller addressed #1). The dedicated Global Unlock input is ...