"If this happens within 2 minutes of that, do this"


#1

I’m looking to replace my Stringify routine with a webCoRE piston:

If my garage door opens, and within 2 minutes, my hallway door opens, then turn on the kitchen lights.

I can’t seem to figure out how to create this time-bound compound if statement in webCoRE.

Any info greatly appreciated.
Thx.


#2

I tend to use variables for this… Maybe something like:

Note:
Not seen in this image, but the last WITH block has the Task Cancellation Policy set to Never for this to work


#3

Use the “followed within X minutes” with the group feature.

If
garage door changes to open
followed within 2 minutes by
Hallway door open
then
Turn on kitchen lights (task cancellation never)


#4

I’m trying to do something similar with a pretty simple “Welcome Home” piston and the ‘followed with X minutes’ does not seem to work reliably.

What my desired result is that I arrive home, park my car, and when I walk in the door, this triggers the announcement.

I’ve been testing this and I’ve noticed that it only works every other time.
Test #1: Doesn’t work
Test #2: Works!
Test #3: Doesn’t work
Test #4: Works!


#5

I agree 100%, which is why I usually take full control of that sequence this way.


#6

I’m a bit of a newbie and was hoping someone would chime with a better use of ‘followed by X minutes’ but if the variable way is more reliable; looks like it time to learn something new.


#7

I agree with you. Maybe someone has found a reliable way to utilize that command.
I’d love to learn something new!


#8

Thanks for your assistance I just imported your example and rearranged it a bit to make it easier for me to read and it seems to be working reliably.

Now I’m thinking of what else I can make using variables. Certainly is simpler and more consistent than trying to figure out why “Followed by X minutes” wasn’t working.