Help with switch and piston interference/interaction


1) Give a description of the problem
If I go out the door and I turned the physical switch on, will the light stay on, or turn off after 2 minutes? What if a different piston turned it on?

2) What is the expected behaviour?
This piston should be overridden by the physical switch, and/or a different piston that turns it on for longer.


Hi I’m back! I moved (from MA to NH), I took all my zwave switches with me! I’ve been slowly installing them all, and rewiring half of this house while I’m at it. I deleted my former ST Location and Hub! Note: Doing this deletes your SmartApps Pistons, so don’t do it without making SURE you know what they are. Ask me how I know! :slight_smile:


What do you mean by this? Are you talking about the same (smart)switch would turn this light off within the 2x minute run time? Or a different switch all together?

Easiest thing here would be the place a restriction on the piston from turning on if the switch is already on. IE, if another piston had ran the switch and its on, that it would stop this piston from running.

Lastly any reason why you have separated the two time intervals on the first IF block as oppsoed to having it "between 20 minutes to sunset and 20 minutes past sunset in a single restriction?


Try adding one additional item in the IF block…

Switch 1 is off

That way, the piston will only run if the switch is off :slight_smile:


Yep! Sorry, should have been more clear.

I think this covers it:

Which I just did. :slight_smile:

Uhhhhh. LOL It didn’t even occur to me.


In order to achieve this I would add a second IF block on the bottom, not nested in the first block with that command.


Ok! I’ll redo this and post it.


OK! Here’s what I have now. This solves “what if the basement light is turned on before motion is detected - what will stop the piston from running?” and fixes “do the sunset to sunrise in one line”.

I still need “what will keep the light on/stop the piston if the light is turned on by another piston, or by the switch, AFTER the piston starts but before the 2 minutes is up”. In other words - I’ve triggered motion and the piston starts - the light is on for two minutes. But I need the light to stay on, so I: 1. Physically turn the switch on, or 2. Use the SmartThings app to turn the switch on, or 3. Trigger a different piston which includes that light coming on and staying on.


Can you maybe give an example of why you would want it to stay on longer? Just from reading this the easiest way to do this would be with another switch/trigger but for me thats silly just adding more hardware into a room. Depending on your use you might be able to find another condition that would over ride the time.


It’s a light outside my basement door and the switch is inside the door. If someone walks up, 2 minutes is fine. But if I need longer, or if someone pulls into the driveway and triggers the “outside car” piston (all lights come on for 5 minutes)… That.


This would have to be written in a separate condition or piston even just because it could be anything obviously.

Easy, just incorporate this switch in that outside car piston. If in that piston you call for all lights to come on and then also off you can just add this device. If you only call them for on you can add another IF in that piston to turn this device on.

Its easier I found to manage my expected actions in pistons and not have one turn something on but another turn it off. Thats a personal preference though


Oh, no, it is. My “someone’s in the driveway” piston turns on all my outside lights (including that basement light) and leaves them on, but for 5 minutes, not 2. That 3 minutes may not seem like a big deal here, but I can also use the “how to” here in other places.

I’m thinking I didn’t explain myself well! My bad, I’m terrible at typing and explaining. The basement light IS in both pistons, but one piston only turns on the basement light for two minutes, and that is only if there’s motion at the basement doorbell. The basement light (and all other outside lights) turn on for five minutes if there’s motion in a different (driveway) motion detector.

All I want to do is have the basement light NOT turn off after only two minutes if, say, 45 seconds after the basement motion piston turns the basement outside light on, someone pulls in the driveway and triggers THAT 5 minute piston. So the basement light would stay on for five minutes and 45 seconds total, instead of turning off 75 seconds after the driveway piston triggered.

LOL This is like one of those words that even though you’ve spelled it correctly, looks more wrong the longer you look at it! :slight_smile:


Understood now! I do believe that if your basement piston allows task cancellation based on piston state that the new 5 minute timer from the driveway piston will supersede but you will either have to test that or someone with more webcore knowledge would have to confirm/correct that.


Yep, I’ll test it. PLACE YOUR BETS! :slight_smile: