Widgets/Logic
First Event Widget
First Event Widget
A "Logic" type widget. First Event Widget allows the first event to pass through and then suspends execution for a specified duration. It's particularly useful for implementing debouncing, handling initial triggers, or creating time-based patterns in your workflow.
Inputs
-
input1 to input20 (DataType: Anything) Multiple input ports that can receive events. The number of ports is configurable (up to 20 inputs). When an event arrives at any input, it triggers the widget's behavior.
-
reset (DataType: Anything) Resets the internal timer, allowing the next event to pass through immediately regardless of the remaining delay time.
Outputs
-
output1 to output20 (DataType: Same as input) When matching outputs is enabled, each input has a corresponding output port. Events from
input1go tooutput1,input2tooutput2, and so on. -
output (DataType: Same as input) When matching outputs is disabled, all passed events go through this single output port.
-
aborted (DataType: Same as input) Events that arrive during the delay period are sent to this port instead of being passed through.
Custom Settings
-
Input/Output Configuration — Configure the number of input ports (
1-20) -
Match Outputs — When enabled, each input has a corresponding output port (
input1 → output1,input2 → output2, etc.). When disabled, all passed events go through the singleoutputport. -
Delay Duration — Set how long to suspend events after the first event passes through. The delay is specified in
milliseconds. Setting it to 0 disables the delay.

📌 Important Notes
- The delay timer starts when the first event successfully passes through
- Setting delay to 0 disables the delay, allowing all events to pass through
- The reset input can be triggered at any time to allow the next event through
- When matching outputs is enabled, each input's events only go to its corresponding output
Examples
Basic Debouncing
This example shows how to use the First Event Widget to implement basic debouncing
Drag the example onto the workspace to explore and experiment!
In this example:
- The Clock widget generates events every
100mscontinuously - The First Event widget is configured with
1input,matching outputsenabled, and a1000msdelay - When the first event arrives, it passes through to the
output1port immediately - The internal delay timer starts, blocking all subsequent events for the next
1000ms - Events that arrive during the delay period are redirected to the
abortedport - The first Counter widget tracks successful events that passed through
- The second Counter widget tracks events that were blocked during the delay period
- Result: Demonstrates classic debouncing behavior where only the first event passes through, and all subsequent events within the delay window are blocked
Multiple Input Handling
This example demonstrates using multiple inputs with matching outputs
Drag the example onto the workspace to explore and experiment!
In this example:
- Two Clock widgets generate events at different intervals (
100msand235ms) - The Button widget starts both clocks simultaneously
- The First Event widget is configured with
2inputs,matching outputsenabled, and a1000msdelay - When the first event arrives from either input, it passes through to its corresponding output (
input1→output1,input2→output2) - Subsequent events from the same input are blocked during the
1000msdelay period - Counter widgets track which input's events successfully passed through
- Result: Only the first event from each input port passes through, demonstrating independent debouncing per input channel
📌 Additional Notes
- The widget preserves the data type of the input when passing it to the output
- The widget maintains its timer state until explicitly reset or the recipe is reloaded
Glossary
-
Debouncing
Technique for limiting the frequency of function execution, preventing multiple rapid activations. Useful for handling user input or sensor data that may trigger multiple times in quick succession.
-
Initial Triggers
The first event that activates a process before a waiting period is established. This widget allows the initial trigger to pass through immediately while blocking subsequent events during the delay period.