How to use access keys (legacy)
In the tab "1wire" can be found the "Reader" element, it is used to control access to the system (by iButton or RFID). Normally, when the keys are not connected, the "Reader" element is in the 'not connected' state. When a valid key is connected to the reader (stored in the database access control data, read - Access control (legacy)), the element goes into a 'normal' state, until the key is turned off. When a not valid key is connected to the reader, the element goes into a 'alarm' state.
The use of "Reader" to open the electronic door lock
These events with indefinite duration (key activation) are best managed through a trigger. Create a trigger "Trigger Valid Key" that will turn on when a valid key is connected. And create a logic "Logic Valid Key" for this event.
Now create the main logic scheme. First, it disables the trigger only after 10 seconds, thus avoiding double triggers. Secondly, it supplies a pulse to the control output of the electronic lock. Set the desired pulse duration in the properties of the corresponding element. If you have a USB camera connected, then this is a good time to use it to record video for security purposes (see USB camera settings. How to save a video).
The use of "iButton" to switch the triggers in a cyclic pattern Normal-> Alarm-> Normal → ...
For this mode, you need to spread over time the processing of conflicting logic to activate the trigger and disable it again. To do this we introduce an auxiliary trigger with logic to handle it, in the same way as described here - How to use "Trigger". This trigger (helper_trigger) will be activated when you connect a valid key (iButton able to 'normal'), and will automatically turn off after 5 seconds.
Create the main trigger (main_trigger) and logic schemes for processing. Note that the logic circuits are activated only when the auxiliary trigger (helper_trigger) is disabled, and when triggered the circuit helper_trigger is immediately converted to an 'alarm' state. Thus main_trigger will be triggered only once per 5 seconds, and so will not be a conflict between the logic to turn on and to turn off the main trigger.