I’d like to know if it is possible and how to add a waiting time between the execution of different triggers in the same button widget.
I have several triggers executed in a sequence on the same button and would like to add a “wait” between the execution of each trigger.
Hi @marco.negonda, this is a great question, thanks for asking! There’s no way to add this wait functionality within a single trigger. There are work arounds, though. One thing you could do is use a boolean variable to check if a trigger has been executed. You could then use a timer-trigger to check the status of the boolean, and if it’s the correct state, fire the rest of your logic.
So the order would be Execute First trigger >> Set Boolean to True >> One a timer trigger, check If Boolean is TRUE, after X duration fire the Trigger >> Convert boolean back to false.
thank you for your quick reply and proposal. As far as I know timer triggers are only available at step level and not at buttons level, is it correct?
In my case what I’d like to achieve at button level is the following:
execute trigger 1
wait n seconds to allow backend system to record the action of trigger 1
execute trigger 2
execute trigger 3
Is there any way to make it work without changing the app logic (app is already in use in Production system)?
When you are ready for the pause or delay, send a command to something outside of tulip (could be Node-RED, PLC, microcontroller, etc.) that responds to a machine api or device trigger after so many seconds have passed that triggers your next set of triggers.
Another option could be in a custom widget that outputs after so many seconds.