‘PULSE’ is a trigger function that lets you run repeat actions at an interval of your choice based on whether or not the trigger is true:
True For – Lets you keep a trigger at ‘true’ for a fixed length of time, regardless of whether the underlying condition becomes false in the meantime.
Repeat – Set-up a recurring action if the underlying trigger remains true.
- After – A fixed period of time during which the trigger will stay locked at false. Think of this as ‘a delay before checking whether the trigger is true again’. The trigger transitions to the ‘after’ period once the ‘True For’ period has elapsed.
When the ‘after’ period is over, the trigger will switch back to true IF the underlying condition remains true. This causes another instance of your action to occur.
- Up to – The cycle described above can be repeated as often as you like by entering a number in the ‘up to’ field:
- Once – The trigger will run your action immediately when its underlying conditions become ‘true’ (someone opens the door). It will revert to false only when the ‘True For’ period has elapsed.
- The trigger will stay true even if the underlying condition becomes ‘false’ (someone closes the door).
- The trigger will switch to false at the end of the ‘true for’ period’. It will stay false even if the underlying condition remains ‘true’ (the door is still open).
- Only one voice notification gets sent. The trigger is only reset if somebody physically closes the door (the trigger becomes false).
- Repeat – Use the ‘after’ boxes to choose how long the trigger should remain ‘false’ before switching back to true. Specify how often you want to repeat this process.
- If the underlying condition remains true for the full length of the ‘after’ period then a second instance of your action is fired. The trigger will then begin another cycle of the pulse and remain ‘true’ for the length of time you specified.
- If the underlying condition becomes false during the ‘after’ period then the pulse is immediately disabled. No more repeat cycles occur and no further instances of the action are run.
- Infinite – Same as the ‘Repeat’ flow explained above but you do not have to specify the number of repetitions in the ‘up to’ box. The pulse will simply repeat endlessly until the underlying condition becomes false
Let’s illustrate how pulse works with a simplified meshbot and some diagrams.
The following image shows a trigger set to activate if the front door is left open. We set a ‘PULSE’ function with a 3 minute ‘True for’ period and a 5 minute ‘after’ period. We set the cycle to repeat 3 times:
The following charts show how pulse reacts to changes in the underlying trigger condition (the door open/closed state):
Trigger becomes false during a ‘True For’ phase:
Trigger becomes false during an ‘After’ phase:
In both cases, no further actions occur after the door is closed.
In the first case, the trigger eventually transitions to ‘false’ according to the pulse specifications. It stays at ‘false’ because the door is closed. This means, even if we had set up more cycles, no further actions would get fired.
In the second case, the pulse is ‘interrupted’ and stays at false because the door was closed. This resets the pulse and cancels all subsequent cycles and actions.
Notes and advice
- The ‘True For’ duration of 3 minutes shown in the examples above is mainly for illustration – it is almost certainly too long for most real-world use cases. Pulse is best used as a ‘quick check’ of whether or not a trigger is true, and then perform a (repeatable) action if it is.
- For this reason, you can set ‘True For’ to maybe just one or two seconds.
- Conversely, the ‘after’ period and ‘repeat’ quantity is where you have more scope to shape a trigger which fits your needs. ‘After’ essentially means ‘delay running another instance of the action for X minutes’.
- The length of time you choose for ‘after’ depends on how often you feel it is appropriate to perform the action. For example:
- You might want your voice assistant to issue a notification every few minutes if a garden gate or freezer door is left open. You could repeat this indefinitely until somebody closes the door/gate.
- In more urgent situations like a water leak, you might want to send notifications more frequently until the situation is resolved.
- Other situations may call for you to limit the number of repeat cycles to avoid ‘spamming’ the action. For example, send a notification to your support team if you receive a ticket from a high priority client. Send a one-time reminder two hours later if the ticket still hasn’t been assigned to an operative.