Are you a Newbie, this is your post


I am not going to respond on the pistons. :frowning:

I am going to warn users that webcore for ST users will probably cease by the end of this year or whenever groovy is shut down by ST. Users should start planning ahead and looking at automations in the ST app or take a look at Rules API which is not yet finalized. Avoid the Smart Lighting smartapp as it will also be shutdown with the demise of groovy.


Ugh. Thanks for the warning.

Is moving everything to Hubitat a reasonable alternative?


i’m currently researching on that option


Since I moved to Hubitat I have found everything fine, if not better


I have looked into Hubiat for some time. If you have basic zwave and zigbee items all is good. But if you have Ring, MyQ or want to manage TV’s it’s a mess. Things work sometimes, work once and not again. So for the basics works fine. To much work for me…


Thank you all for the feedback…
This round i want to start simple… dimers, lights, maybe a harmony hub etc…
i believe im going to be happy with hubitat


Rodolfo Calderon, Did you get this figured out?


But if you do this what purpose does the first trigger serve?


In reference to:


The trigger is just to “fire up” the piston…
What happens afterwards depends on the structure.

If X is false, then only Z executes
If X is true, then both Y & Z executes


ut to avoid the nested If, he moved Y to below Z. Based on that, can’t Z just fire on its own without X?


If Y is moved outside the IF block, then the IF block will be empty. This means the trigger (X) will still execute the piston, top to bottom, and execute any code not blocked by conditions.

The piston could also run top to bottom for many other reasons:

  • Another trigger event happened
  • A timer went off
  • Pressed Test
  • ExternalURL was activated
  • etc


Hello -

I am trying to use the following:

For the most part it works, triggering either living room or Kitchen sensor, turns the light on (if the bedroom door is shut)

The problem is the light goes off after 5 minutes, even though there is motion during that 5 minute window. Is there a different option I should be using for turning off, other than ‘stay inactive’??

Also, fyi the light does not come on if bedroom door is shut, or shuts off at any time the door is closed --this is intended

I tried setting it this way, as a test, but the light never goes off, even when I close the door

Any help would be great


Hi there,

I wouldn’t use IF - ELSE…
Instead, I would create a seperate second IF clause…

the second one (kitchen cabinet lights) on the picture at least, there is nothing to turn the lights off??? in both IFs the cabinet lights will turn ON…


The way ‘stays’ works is that if the motions sensors are all inactive it sets a timer, and then returns false straight away and the piston continues. If nothing happens to stop the timer, when it fires a new piston instance starts up, fast forwards to the ‘stays’, and returns true.

The way the timer is stopped is by the ‘stays’ being evaluated again when a motion sensor activates. However if a motion sensor activates the piston runs the ‘then’ and not the ‘else’ so the ‘stays’ isn’t reached.

Your second effort is better because when motion is activated the second ‘if’ is reached. However it says ‘on’ not ‘off’ for the action.


@ike2018 @orangebucket Thank you. It looks like the 2nd one indeed does work as intended. In my haste building that one I simply set the 2nd IF to off and didn’t realize it. Sometimes its the easiest things that bite you.

Thanks again


Ok so this one appears to be working, except for one thing.

If the lights are currently on and I go and shut the Bedroom door, the lights do NOT go off, in fact while testing the lights only went off when I closed the door AND then went and created motion.

I would like to just be able to shut the lights off (if on) by simply shutting the door.

Any suggestions?


You likely want a trigger on the contact is open or closed. (at least for the 2nd ‘contact is closed’)

you could tell it to always subscribe on line 26


That worked, thank you.