Help with IFTTT controlling switch in SmartThings with webCoRE

I have IFTTT setup to turn on my smart life switch when motion is detected. In webCoRE I created a piston to turn light back off after 1 minute. That works great.
My problem is that if I turn the switch on manually and motion is detected, the switch is turned of after 1 minute.
I would like to figure out how to keep the light always on if I turned it on manually.
I have asked for help in webCoRE forum with no luck so far
Hoping someone here can point me in the right direction.
Thanks
Joe

I read somewhere that SmartThings depricated the physical v. programmatic function on devices. Due to the issue @JDRoberts mentions in this thread:

Even if they didn’t you can tell from the thread that while the spec supports it, not all manufacturers implement it so it’ll be spotty at best.

With cloud connected devices like SmartLife switches the odds are you will not be able to differentiate it easily if at all.

Thanks for the shout, but everything in that thread only applies to zwave devices. Not Wi-Fi devices.

That said, I would think the folks in the webcore forum could figure something out if it is possible. So I would try that again.

True, although the point was more that if a spec that theoretically supports it can’t, don’t expect a device without one to either. :wink: Do you know if they actually killed support for physical detection or no JD?

I was thinking about how to do it in WebCoRE actually… It would involve setting some variable somewhere first to tell that it was programmatic access then flipping the switch and another piston that detects the device off and resets the variable. It’s kind of messy but it could work.

Maybe a better option here is for the IFTTT activity that turns on the switch call a webcore piston’s http address instead. In that piston set a global boolean variable to denote whether the switch was turned on by motion. Also add a clause that clears this boolean every time the light is turned off.

In the piston that turns off the switch, have it check the variable you set in the piston above and if it’s true, do nothing and if not then continue turning off the light. (when the light is turned off, the other piston fires resetting the variable.)

This way if motion set it it works as expected. If anything else turns on the light then your piston won’t turn it off.

They did for zwave. This is one of those things that is going to be protocol specific: does the system register the distinction or not. Z wave has the capability of registering the distinction, but as noted in the thread, not all manufacturers implemented it, which ends up making it useless for a system like smartthings.

Back to the OP: this is one of the most common complex use cases, people have been bringing it up for the past five years. Wayback at the beginning, Bruce managed it with virtual proxies and keeping track of the state of the switch prior to the motion sensor detecting motion. So rather than distinguishing between digital and physical, he distinguished between the motion sensor being the trigger for the light coming on and anything else being the trigger for the light coming on. That should work regardless of protocol.

I’m sure you could do that with webcore, it just might get fairly complex. :sunglasses:

1 Like

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.