Activate a routine but if a window sensor is on then don’t turn on?

I am wanting a routine to activate whenever I arrive or leave home but I don’t want some lights to turn on or off if a window is open.

ie if I arrive home and window is closed then go ahead and turn on lights. If the window is open and I arrive home then don’t turn on the lights.

Any ideas?

The easiest way to do this is with a webCoRE piston. However, if you don’t want to go that route, then you could use something like SmartRules or Stringify. I don’t think there is a way to add that kind of a conditional into a routine.

Honestly, I would create a simple piston to do it.

1 Like

Thanks a lot. Didn’t know about webCoRE. I got it installed and deleted all my routines now haha. I am going all through CoRE. This is way better. This is the first thing people should get when they install a SmartThings hub!

Follow up question for you sir. Trying to have webCoRE send a notification when an invalid door code is used. Totally get when a code is used to send a notification but can’t figure out about an INVALID code. I posted something already but I haven’t heard from anyone.

What kind of lock are you using and more importantly, which DTH are you using?

This might be something better suited for a smartapp by either @RBoy ([RELEASE] Door lock code/lock user management (create, delete and schedule codes) with automatic lock/unlock, custom user actions and SHM integration) or Lock Manager by @ethayer ([RELEASE] Lock Manager). Both of them are excellent and will do exactly what you are asking for without needing webCoRE.

For a DTH, if it is a zigbee lock, I’d recommend using this one [DEPRECATED] - Universal ZigBee Lock DTH with Lock Codes by @jhamstead.

Otherwise, for z-wave, you can search through the forum for a DTH for your particular brand.

With all that said, I believe that the invalid notification in webCoRE might be tied to the DTH and not the smartapp so much, but I’m not 100% certain of that. So, changing out your current lock’s DTH for an “enhanced” version might be just what you need.

2 Likes

That’s absolutely correct. Invalid notifications have 2 things that needed to be done for it to work. One the lock must support sending it. Different brands behave differently, for e.g. Schlage locks will send an invalid notification on every 3rd or 4th invalid pin entered (depending up on the model) where as Yale locks can be configured to send the notification on every entry.

2nd and equally importantly you need a Device Handler that can capture and process those notifications and report them to SmartApps like CoRE or the Lock Multi User Management app @Core_Phx pointed to above.

This is a device handler that support enabling/configuring the invalid pin feature on the lock and then also capturing the reporting the same.

1 Like

Yale locks FTW. :slight_smile: LOL

1 Like