Running piston with condition only once


#1

1) Give a description of the problem
I’ve got a piston set up to test if my garage door is open (and one to test if it’s closed). If the piston to open detects that the garage door is closed it will open it and if the piston to close detects that it is open it will close it. I’m executing that piston using Ask Alexa macro triggers. Basically I just tell Alexa to tell smartthings to open my garage door and then it runs the Open Garage Piston. Vice versa for the Close Garage Piston.

2) What is the expected behavior?
Everything works to open and close the garage door using the Ask Alexa skill. The problem is that when I close the door manually the “Open Garage Door” “If statement” is still running and it will open my garage door again.

I need to stop the execution of the piston after it has run once and not run it again until I invoke it again using Ask Alexa. Anybody have any ideas?

This is my setup for the Open:

06 PM


#2

For those who may be having the same problem, I solved it by changing the “If” blocks subscription method to “Never subscribe”. That forced my piston to only execute when acted upon. In my case that was AskAlexa running the piston.


#3

This option is also available from the piston settings (click on the name of the piston while in edit mode). You can then disable all subscriptions from one spot. Useful if you have a large piston with multiple subscriptions! Also just another way you can do it.


How to call one piston from another
Piston keeps triggering without my input