Working with short, double and long taps

Quite often in a smart home there is a need to perform several different actions using a single switch. This allows you to save space on the wall and money for additional switch mechanisms.

Task: By briefly pressing the switch, control the lighting group (in the hallway), and by pressing it for a long time, launch the "I left" scenario.

Modules are needed to implement this function.:


Connection



The modules are connected to a common data bus to the AlphaSE Hub2 controller. Please note that the SE8i scenario module must have an address of 120, otherwise pressing the scenario switches will not be processed.


Setting

By default, all module inputs are designed to be triggered by a short press. We need to set up a long press in the SE8i module at the Point 0 input. You can do this in the settings of the parameters of this module.

After that, you need to configure the script itself. Read more about how to do this in the article.