When executing a piston from another piston in high frequency, is there a potential risk of their execution getting cancelled? I guess my understanding of how pistons run is pretty blurry. I don’t know if each execution runs in it’s own instance, or if it’s like a physical machine…if it’s running and something else calls it, then the caller either has to wait, or the piston restarts from the beginning cancelling whatever it was in the middle of.
I know there’s settings to define whether to wait for an executed piston to finish or not. As well as settings regarding parallelization and execution/cancellation policy. I’m still trying to read up on those, so I’m sorry if this is already covered in those sections of the wiki.
See my example piston below. I’ve built this to handle all of my notifications…I can set it to notify via SMS, Echo Speaks or PUSH. I can also choose which contacts for SMS messages to be sent to.
In most cases, I don’t see this piston being a problem…but for some uses, I’m worried that a high frequency could cause problems, and I don’t have an easy way to test this off the top of my head.
For example, I have a piston that will notify me for every physical action that takes place in the house, if everyone is away. If something happens, then it executes this piston telling it to send me a text for each action. However, our roommate is not part of our smartthings setup, so when only they are home, I’ll get a stream of texts for things like doors opening/closing, motion triggering, etc. I’m curious to know if while the piston is in the middle of running, and it gets another execution request…do those execution requests pile up, or do they tell the piston to give up what it’s doing and start over?