While condition All questions

Is there a "While" construct in the pipeline at all?. This would be pretty useful.

At present, I can't see how to create a timing loop which would be very useful for turning devices on or off based on 'real time' activity.

I'm trying to use a PIR sensor to detect activity within a random, environmentally triggered 10 minute period. No problem triggering the sequence but no way I can see to come back repeatedly every 10 minutes to check if motion has been detected other than an 'infinite' number of pauses. Yuck!

Asked by Evan on July 30, 2020, at 3:36am

Hello, I can look at adding this type of step, but I think what you're aiming for can be achieved with the existing functionality - you might just have to create two separate sequences.

First, you need to create your 10 minute window.  To do this, use a variable (in this example period_started) to track whether or not it's within the 10 minute window:

  • Sequence trigger - your random environmental trigger
  • Set the variable period_started to true
  • Pause for 10 minutes
  • Set the variable period_started to false
Now, your PIR motion sequence:
  • Triggered when the sensor detects motion
  • Check if period_started = true
  • If yes, perform whatever other steps you want to run
  • Else - do nothing
Let me know if this will work for your scenario.

Post a reply

The SEQUEmatic bot is still new and learning. If you don't get the answer you need, just ask to speak with Derek and your chat will be transferred.