Light turns back on


1) Give a description of the problem
I have a studio. I have to walk through my “furnace room” (basement, but the furnace is in it!) to get to it. The furnace has a zwave light switch for the light, my studio has a zwave light switch for the light. I also have a motion detector in the Studio facing the window.
I have a Piston (below) for security: If the Studio’s light switch is off, and the motion detector sees motion, and the furnace room light switch is off, then: Turn on the studio light for 2 minutes, and turn on the furnace room light for 2 minutes, and text my phone Studio Motion. This will let me know of either a break-in, or that I locked the cat in the studio!

I ALSO have TWO SmartThings New App automations: If the furnace light switch is turned on, then turn on the Studio Light. If the furnace light switch is turned off, then turn off the Studio light. That way I don’t have to reach for the Studio switch - it’s a bit tough to get to.

2) What is the expected behaviour?
The studio light stays off when the furnace light is turned off, unless there’s motion in the studio when both switches are off.

3) What is happening/not happening?
The problem I’m having is that I’ll be working in the studio and leave, I’ll turn off the furnace room light, the Studio light will turn off… And then turn back on after a few seconds… And stay on.

**4) Post a Green Snapshot of the piston!!
Can’t post a piston for the SmartThings automations.

5) Attach logs after turning logging level to Full
I don’t think logs for the motion part are needed (but I’ll certainly post if someone wants) I think that the webCoRE and SmartThings pistons are interfering with each other, and I’d like to make both Webcore - but I could use some guidance on how.


I’m headed out the door, just a quick look…If you have not tried this, I would get the piston working correctly without the automations. Then add the automations to the mix and debug from there.


Thanks! Good idea - I just checked.

So the piston does work correctly without the automations.

The automations do work correctly without the piston.


You’ve got three conditions in the IF portion of the statement, which in the absence of any actual triggers webCoRE is treating as triggers (see the lightning bolts to the left). This won’t work.

Let’s assume that you want the motion detector to trigger piston execution. In that case, I would write the IF as

Motion Sensor changes to active
Switch 30 is OFF
Switch 15 is OFF

When you do that, only the first line (motion detector) will have lightning bolt, while the second two won’t. The piston will execute on the trigger, but evaluate the two conditions before proceeding.

Using a motion detector as a trigger, especially when you have waits in your piston, can be tricky because when the motion detector stops being active, it will cause the piston to reevaluate. You will most likely need to change the Task Cancellation Policy on your “with” statements to “Never Cancel.”


I agree with @bthrock. You problem is your re just leaving so you motion sensor will stay active for a little while. Once you turn all the lights off, all your conditions will be true and the lights will turn on. Then there is nothing in your piston to turn them back off. By changing the motion to a trigger, the exiting motion will no longer turn on the lights. Only when it sees new motion after no motion. Should work the way you want.


I get it! Thanks so much for the help!!


Ok, have a look at these:


The first piston looks good. Personally, I would send the notification as soon as the switch is turned on (before the wait) but that is your preference.


You know, I always forget that order thing, thanks, I’ll bump it up.