Can a piston run again while it's already running?


#1

Hi all, I am new to webcore but have a fairly functioning system (although not the most streamlined). I currently have 4 pistons for settings modes based on different presence triggers. My current pistons have Waits after a presence trigger fires to guard against false positives. I’m looking to condense these pistons into a single piston. If I use all available presence sensors and multiple people arrive home at the same time, will the piston fire for each person? Or if the piston is already running are the triggers blocked from firing? Even though two people can be in the same car, I’ve noticed that sometimes they arrive at different intervals. I’d like to just have the piston run on the first presence trigger event and evaluate who is present and who is not present instead of running on each presence trigger event and evaluating several times (although the end result should be the same).


#2

The trick will be setting your conditions to async. That will allow multiple things to execute when the piston is triggered. I have these 2, as an example. One is using multiple presence sensors to update one virtual presence sensor for each person, and the second is for toggling motion controls on and off for the lights in my house.


#3

I think you might have misunderstood me. If I have a piston that is triggering based on two different presence sensors, and then that piston enters a waiting state immediately after, then what happens if another trigger event happens while the piston is in the waiting state? Does that piston begin running another instance? Does it just restart? Does it continue what it was doing regardless if another trigger occurs?


#4

If presence is a trigger, it changing will cause your piston to reevaluate, and if the piston is no longer true, will cancel scheduled actions, unless you change its task cancellation policy (TCP). Post a green screenshot and can tell you for sure.