Automation, one-time access - How to set up one-time codes with automation

The steps in this article require using the web interface of a 2N device. Please follow this manual in case this is your first time using the web interface.
 

This is an FAQ which shows configuration of a one-time access code which can be (re)activated using an HTTP command. You need Gold license to use this automation.

Testing scenario

One-time code on keypad. You can use a web browser on your PC or mobile phone to define codes for guests using HTTP commands. When an HTTP command is received, and is recognized, it enables the code to be used once for access. Once the code is entered, the Switch is activated and the condition falls back to False = the code doesn't work the next time. You can reactivate the code by sending the HTTP command again. You can set up to 25 guest codes (6*5*5 objects).

Format of the HTTP command is as follows:

https://ip_address/api/automation/trigger?triggerId=abcd&param1=1234

Where abcd stands for the trigger name, and 1234 stands for the code that will be entered from the keypad.

 

How it works

  1. The expected HTTP command is received

  2. FlipFlopRS is set to 1

  3. Formatter extracts the code from the HTTP command and saves it

  4. The code is entered

  5. The switch is activated

  6. FlipFlopRS is reset to 0 1 second after the code was entered.

 

Firmware & License info

  • 2N OS v3.1 with GOLD license

  • Last updated on 9th of March 2026

Was deze pagina nuttig?