This FAQ shows you how to create automation to be able to activate the switch by special code for certain amount of time.
It is necessary to associate switch with the bluetooth, RFID reader or finger print modules in case that these access method will be used. In this example Bluetooth module is used and it is necessary to associate moduel to a specific switch. In this example switch 1 is used.
Switch 1 has following parameters:
- Switch mode: Monostable
- Switch-On duration: 5s
- Controlled output: None
- HTTP switch-On command: https://<IP address of the intercom >/enu/trigger/<keyword>
Notice that the switch 1 does not control any output. To be able to met all requirements described at the beginning of the article, it is necessary to control outputs via the automation. Switch 1 is used only to transfer the information about the activation of the switch to the automation function. Swtich 1 can be activated by the Bluetooth, RFID card, Finger print or by numeric code defined in the global switch codes of the switch 1.
It is necessary to configure door section and assign the switch which will be used to control output and doors. Switch 2 is used in this example.
Switch 2 parameters:
- Switch mode- Bistable
- Controlled output - Output 1
Switch 2 is sued to control the output. Notice that the switch mode is in Bistable mode - this is crucial to ensure that the switch 2 remains activated during the time specified in the automation function. If the time profile needs to be used, it has to be applied on the switch 2.
How it works:
- If the 666 code is entered - Switch 2 will be activated, delay for 50s will be activated. This delay can be modified and determines the time during which the switch 2 will be active. Also FlipFlopRS is set to 1 to save the info that code 666 has been used. Once the timeout expire, Switch 2 is deactivated if the time profile is not active. HTTP command with reset keyword is send to reset FlipFlopRS to 0. Switch 2 deactivation related to 666 activation code is highlighted on the picture as object with ID 1.
- If code 777 is used - the switch 2 is deactivated if the time profile is not active and HTTP command to loopback address is send with the keyword reset - this will reset FlipFlopRS to 0.
- If any access method associated with switch 1 is used - the switch 1 will send the HTTP command with the keyword: open. Based on this keyword, the switch 2 is activated and after 5s time out the switch 2 is deactivated if the condition is met. Switch 2 deactivation is highlighted on the picture as object with ID 2.
Conditions and logic description:
|Time profile||state of FlipFlopRS||Object ID 1 condition state||Object ID 2 condition state|
Automation file can be downloaded