First post, brand new to all of this, tbh I just ordered my ST hub today so I don’t even have it yet! Anyways, hoping someone can point me in the right direction. Trying to get a wifi leviton switch to turn my lights on when my motion sensor is activated and I unlock my door. I have absolutely NO clue how to go about making up this sort of concoction in an “app” here, or if it’s even possible. Help! Thanks.
First things first: you have to have devices which can be recognized by your smartthings account. Some of these will be devices that communicate directly to the SmartThings hub, others will use a “cloud to cloud” integration where your account for the device communicates via the Internet with your SmartThings account.
It often comes down to the exact brand and model of a device. For example, some of the Schlage locks, in particular the Z wave and zigbee models, are recognized by your SmartThings account. But the Home kit and Bluetooth models from Schlage are not.
The D-Link motion sensor is not recognized by the SmartThings account, but it does have its own IFTTT channel, so you may be able to use that for some simple automations.
The Leviton Wi-Fi switch should be recognized by your SmartThings account, so that one is easy.
While you’re checking the model numbers, I suggest you take a look at the following intro FAQ. I think it will help answer some of your basic questions. (This is a clickable link)
Also, before we go any further, are you using an iOS phone or an android phone?
Thanks for the detailed message! So looks like I think my wifi leviton light switch may work directly with it? But either way, both it and the dlink sensor have ifttt integration which will hopefullly suffice if need be. I’m using iOS devices, iPad and iPhone. What’s next!
The issue with using IFTTT is that it can introduce additional lag. At my house it’s about a consistent eight seconds, but some people have IFTTT lag of up to two minutes.
When we talk about lights coming on, we’re usually aiming for a response of under three seconds, and to be honest, anything more than about a second and a half gives people the sense that they are standing there in the dark waiting for the light to come on. So I just don’t know if it’s going to fit your specific needs. But it would certainly be worth trying.
I’m a little bit confused about why the motion sensor is in the picture here. Or rather why both the motion sensor and the lock are in the picture. Why not just have the light come on when the door is unlocked? Or just when motion is detected? What would be different about having all 3 devices in your rule? Or to be more specific, can you write out what your desired if/then statement would be? Nothing complicated, just “if this happens, then that should happen”.
As for why I asked if you were using iOS or android… The official SmartThings features are pretty basic rules. Essentially " if A then B." If motion is detected, turn on the light.
You can set some additional qualifiers around that like time of day or geopresence or mode, but the official features don’t generally let you have what are called stacked conditionals: “if a and B, then C” as far as devices go. So with the official features, you can’t create a rule “if the door unlocks and motion is detected in the hallway, then turn on the light.”
The good news is that there are several methods available for SmartThings which do allow you to have stacked conditionals.
if you have an iOS phone, there is a $10 third-party app called “SmartRules” which is very easy to use and allows you to have a “while” option in a rule. So “if the door unlocks while motion is detected” etc. it’s very popular and works well.
If you have an android phone, you can do something similar with a combination of two paid third-party apps, Tasker and sharpTools
So those are pretty simple add-ons.
If you want to build really complex rules, there is a free community – created rules engine called webcore. It can be quite challenging to set up although there are many community members who will be glad to help you. Usually people with a strong technical background love it and people who are looking for easy non-technical rule pbuilders will choose SmartRules instead. And some people use both, reserving webcore for the stuff that only it can do.
Anyway, the point of all that is to start by just writing out in English what you want your rule to be in an if/then format.
If the structure is simple enough, you can likely do it with the official features like smartlighting.
If there is a “do while” component, and you can do it with SmartRules, that’s a fast and easy way to create those rules.
If you rule is really complicated and involves checking the “state” of a number of different devices as part of the if, then you may need to set up the rule in webcore.
Going back to the beginning, as long as all of the devices can be recognized by your SmartThings account, there will be one way or another to set up even extremely complex rules. But you may use different methods depending on the complexity of each individual rule. Or if you have a strong technical background you may just do everything in webcore. But a lot of people with iOS devices do as much as they can in SmartRules because it’s just a really easy app to use.
We still need to know the model of the Schlage lock, though.
This is the lock:
The reasoning behind the series of events is because, if you can picture this, this setup is at the bottom of the stairs at the entrance of the basement apartment. Essentially, you come in the back door of the house, walk down the stairs into a small laundry room. This is where the motion sensor is located. Now there is a locked door that opens into the basement apartment. The lights I want turned on are on the inside of this door, inside the basement apartment.
If I just relied on the motion sensor, it would turn the lights on in the apartment even if I’m coming from the basement apartment, opening the door, triggering the motion, and now the lights have turned on behind me.
If I just relied on the unlocking of the door, same thing, even when leaving this would trigger the lights on behind me.
This is why I figured I’d need to set up two triggers to ensure the lights will only turn on upon entry to the basement, and not on leave.
IF motion sensed FOLLOWED BY door unlocked, THEN turn apartment lights on
That paid app sounds like it could be the answer, however I’m very weary to purchase it not knowing how easy it will be, or whether it can even do what I need or not. I’m also a little weary of paying for apps on here when I feel like for someone like me who would be helpless without them, I’m screwed if that person ever drops support, are they really going to commit the rest of their life to making sure these things still work for me? I came across this with I believe “rboy” smart apps and device handlers for the schlage lock manager, the whole reason I went with st and the schlage lock was because I thought that’s all I’d need to manage lock codes and view detailed logs, little did I know I’d have to rely on third party devs who want me to subscribe to lifetime subscriptions to use their apps in the hopes that they’ll never stop working on them?
The lock should be fine, and you should be able to distinguish between unlocking from the keypad, which is what would happen as you are entering the basement apartment, and unlocking from the turnbolt, which is what would happen if you were exiting the basement apartment. So I don’t think you’re going to need the motion sensor as well.
But if you do, WebCore can handle sequencing, so there will be a way to do it as long as we can get the devices recognized by your SmartThings account. If we have to rely on IFTTT for the motion sensor and it ends up taking three minutes to report the motion to SmartThings, you’ll already be inside the apartment before the lights come on. That’s why sometimes you just need to try the setup to see if the results meet your requirements for that specific use case.
Okay awesome , I didn’t consider the possibility that we could differentiate between a keypad unlock vs interior thumb latch. If that’s the case, could it be done using the official smarttthings app like you’d previously mentioned as being an If A then B type deal?
With regard to free versus paid… There are free versions of most of the smart apps. For example, lock manager is a very popular free SmartApp. You can find these by looking on the quick browse lists in the community – created wiki.
But many people will find it worth paying a small license fee for a specific set of features. And if what you’re looking at is an actual app, not a smart app, then there’s a lot more that goes into the development of those and it makes sense that there’s a license fee.
It’s true that sometimes Both apps and smart apps are abandoned by their developers. That happens with everything, not just SmartThings. And it can also happen with the official features. It’s a risk with any cloud-based service.
In most cases, if it’s a really useful feature, someone will develop a substitute. That’s fairly easy with smartapps because the code is exposed at the time it runs. But of course if SmartThings itself removes a platform feature so that the code no longer works, there’s nothing anybody can do about it.
I myself treat home automation as something more like a mobile phone with apps rather than something like an air conditioner. Whatever I install for home automation, whether it software or hardware, I assume I may want to replace it in three years and I make choices accordingly.
But different people approach these issues differently. If you want to get something that will run exactly the same way for a very long time with no danger of the company changing how it works, then you need to look at a different kind of system than SmartThings, more a one time install of a software package like indigo.
To be honest, I don’t know, because I don’t know anyone who’s only using the official features with locks.
SmartThings official support for locks is really limited. In particular, there’s no way to manage user codes except by entering them through the keypad, which no one wants to do.
So pretty much everybody either uses the Rboy paid app or the free “lock manager” smartapp with their locks. And once you have one of those you can get down to distinguishing between exactly which code was entered on the keypad and have different things happen because of that. They’re both very slick.
Thanks for all the advice, I hope to tackle this soon.
Do you have much experience with smart locks and st in particular? Any that you would recommend from a hardware side as well as easily integrated with st?
Again, I really just need to be able to set custom codes, and very important is a nice easy to read display of activity logs including who, when, and what. I don’t know if using rboys or the free lock manager offer many differences in terms of those?
As far as the two smart apps, they are both popular. To be honest, I’m not sure of the feature differences, you can just ask in the author threads.
Thanks for your help, last question! Zigbee vs zeewave?
The cheapest of the two locks I have access to is the Yale touchpad deadbolt with zigbee radio.
For some reason I was under the impression people like z wave more, but for this one lock, will it make any difference whatsoever? Is there a communication speed difference or something ?
See the article in the community – created wiki on zigbee versus Z wave.
Unless you have a specific reason for choosing zigbee, Z wave usually makes more sense for locks.