When a sequence is triggered, it can receive an input value containing information about what caused it to start. While this capability existed previously, its applications were limited. Version 2.1 expands these capabilities, particularly for creating customized switch press behaviors.
Now, when a switch configured as an action switch triggers a sequence, it will provide additional input values. Note that this requires setting the switch type to "action" in the Push Button behaviour settings, which is specifically designed to trigger sequences.
An action switch will now provide the following input values
Input Value | Action | Description |
65535 | Short Press | No further messages from a short press event expected |
65534 | Long Press Start/Repeat | Sent on start and then every 150ms, whilst the button remains held. Useful for triggering DIM commands. |
0-255 | Time in Seconds that the switch was pressed for | Sent after a release of a long press. No further message for a long press expected. |
Example: Scene Selector Switch
Below, a sequence which acts on the number of presses from an action switch to send a selected scene.
The user will short press the action switch, causing the action switch to trigger the sequence with 65535. The sequence will check the input value and end if the input value is not 65535 (perhaps they accidentally long pressed it).
After passing action 1, we will be counting the pre action delay of 1 second. If we do not hear a further short press, the user has pressed the switch once and the command Go To Scene 1 will be sent onto the bus and the sequence will follow the Post action behaviour to end.
However, if the user pressed the button again, during the 1 second time, the Override behaviour will apply and the sequence will go to action 3 and begin counting down the pre action 1 second time again.
Other Considerations
It should be noted that a great deal of hidden logic applies to our inbuilt switch configurations. If you are building a custom switch, you may have to deal with the following challenges:
- LED state maintenance - you may wish to change the LED state of your switches based on your own logic
- Next Press handling - an external command is sent onto the bus might cause the next press to need to be adjusted.
Comments
0 comments
Please sign in to leave a comment.