Cancel all pending task restart timer instead of stopping the piston


#1

1) Give a description of the problem
It’s a piston triggered by another piston. It’s meant to remind me to do some chores based on whether or not I opened a door and repeat it until I tell my google mini that I did the chores (via IFTTT)

2) What is the expected behavior?
When IFTTT triggers, completely stop the piston (stop reminding me every 7 minutes)

3) What is happening/not happening?
It’s cancelli the reminding loop but instead of stopping the piston, it restart it Back to the initial 3 minutes wait timer.

**4) Post a Green Snapshot of the piston!


.


#2

What’s the 3 min timer for? Just curious.


#3

The piston is triggered by a parent piston that unlock the door and alarm system when we (our phone) arrive. It then fire 3 pistons that are less critical than unlocking the door and does different things.

The 3 minutes wait is meant to give us time to enter the home (open the door). Since we sometime doesn’t get in immediately, it must loop until we get in. I chose 3 minutes because I felt it was well balanced between my needs and reducing stress on ST (I guess looping every 5 seconds would induce unneeded payload/process)


#4

I tried to play with this earlier and I could not make it work properly. In my observation there are two things at play here.

  1. The wait at the beginning of the piston will trigger each time the piston resets. It’s acting like a trigger even though it’s basically a subroutine.

  2. Cancel all pending tasks doesn’t seem to apply to loops? I was looking for a way to break out of it but didn’t find any.

Need to find a work around to the 3 minute wait at the top of your piston. Without the 3 minute wait, the following test piston seemed to work… I adjusted the times and loop number for testing.

I substituted Switch 4 for the IFTTT trigger.

I hope that made sense.


#5

Thanks a lot for your help.

However, importing your piston and reassigning devices didn’t end up working. The culprit seems to be how IFTTT trigger is handled, as it totally ignored the set variable and restarted the piston from line 1.

I must say I’m a bit confused as to how I can work around the 2 unexpected behaviour your pointed out and how IFTTT trigger is executed.

I’ll sleep on it as there has to be a way to use IFTTT trigger as a killswitch that doesn’t bother about timers and all.


#6

In my testing, I had to move the trigger up top to get around that issue. It was behaving as you described.


#7

Yeah putting it on top kinda solved it, however it also started reprocessing every line which lead the piston into the initial loop, as if the piston initiated and it was waiting for the door to open. The desired behaviour would’ve been to skip that loop and hook to the second one where the piston end if {i} is greater than x

Dunno if I made sense!?