SmartThings Community

Schlage Z-wave Lock Command Works Occasionally


(Ben W) #34

In events you should have something like this:

Lock command sent to Front Door (this is ST sending a command Source:Command)
Front Door is Locked (source: Device, with name lock and value locked)

With wireless connections it just sends the command and assumes the lock will respond. There is retry logic built into the protocol, but it doesn’t report if a device does not respond. This is not unique to ST.

How long did the lock work fine? How far is the lock from the hub? If its not a range/interference issue than it may be a faulty antenna in the lock. Schlage has a one year warranty.


(Ben W) #35

There is an update planned for version 2 hubs tomorrow, with improvements to zwave. I would probably hold off any more troubleshooting till Tuesday.


#36

I’m thinking the lock worked fine for about a week or so? Can’t really pin it down to an exaact time frame.
Is the device supposed to have a “Zigbee ID” in the “Device List” - because it doesn’t. The other devices I have using the ZWave have IDs, just noticed this one doesn’t. It just has a “Device Network ID”

I uploaded a screenshot of the event view of the device.


(Ben W) #37

No ids for my zwave locks. Looks like the device is not responding (or the message is not being received)


#38

I’m not thinking it’s a distance from the hub thing because if that was the case, would I even be able to get it on the network to start with? If it was “too far” from the hub I shouldn’t have been able to add it in the first place?


(Ben W) #39

Not necessarily. You did have trouble pairing it and its just a theory. Its worth moving the hub away from walls and other electronics, and if possible closer to the lock. If it still does not work then you eliminated a range issue, which if you contact ST or Schlage I am sure they will want you to try.

Working for a week does make it seem like it was in range, but who knows. Maybe sunspots or being too close to your wireless router is causing more interference than before. Or maybe the batteries are a little weaker so the signal is not quite as strong as it was the first week.

If it is a range issue than purchasing a repeater (like a light switch that supports beaming) can resolve that.


#40

Appreciate all the help and brain storming you’ve been doing. When I first installed the lock, there wasn’t an issue at all with pairing. Everything worked smooth as silk. Just recently this fiasco has been happening. Just wanted to clarify that there was not an issue before. My hub is in the center of my house on the top floor with a direct line of sight to the lock.


(Ben W) #41

Should be good then. But double check Antenna orientation.

Do you have any powered zwave devices? Maybe a zwave repair is in order, which rebuilds paths to the devices.

What till Tuesday’s update, may improve the issue. If not you will probably need to work with support, may have something hung up in the backend or a faulty device.

Hang in there, I have 3 Schlage locks and besides the one blip I had they been pretty solid.


(Ben W) #42

Looks like there was a fix in the hub update for Secure Inclusion.

May need to disconnect and reconnect you lock to ST, but it may resolve your issue.


#43

Thank you! The lock is back working now. I can use the ST app to lock and unlock the door.

Truly, thanks!!!


(Ben W) #44

Glad to hear. Sounds like you just had bad timing with a ST defect messing you up.


(Doug Hamilton) #45

New to smartthings and was having problems with getting the Schlage Camelot to lock after closing door, I’m using a recessed door sensor as well. I used your code (works great btw) , but when I have an arrival sensor set to unlock the door , it does unlock but it then locks again because the code reports the sensor as closed and signals it to lock. it works exactly as it should but is there a way to use the arrival sensor @milktea?


#46

Hi, yes the code is function as it is supposed to if you dont open the door within 15 seconds (see “handler” function). It was my first app so the code itself is not that complicated. It only detects if the door is unlocked or if the door is closed, then try to lock it in 15 seconds and retry if failed.

If 15 seconds is not enough for you, you might want to increase that value (option 1); or (option 2) add additional logic to handle the door unlock event separately. For your situation, you might want to check if the contact has been opened and subsequently closed “after” the door unlock event before the “runIn(15, lockTheDoor)” function execution. You will definitely need some variables to keep track the state of the contact sensor after the door unlock event.

Hope that helps.


(Doug Hamilton) #47

Well, I get what you are saying in theory but still not sure how to add it into the code lol. This coding thing is all Greek when you are first starting out lol. Thanks for your feedback though. Quite the learning curve :slight_smile:


#48

Hmm… sorry I have been busy these few weeks so I dont have much time to help (may be others can jump in?)

On the other hand, depends on what behavior you want the door lock to behave, you may find separating the contact sensor from the door lock into two smartapps be useful. Perhaps to have the door auto-lock (immediately or after couple seconds) when you close the door with one smartapp; and when you unlock the door (manually or with the presence sensor), wait for a minute to check if the door is still unlocked and send a warning to your phone using a separate smartapp instead?

This way, the door will always lock when you closed it, and it will not auto-lock unless it is transitioning from door opened to door closed. Also, it will not auto-lock when your presence sensor open to door. It will only warn you if you dont opened and closed the door, or left it unlocked without opening it within the allowed time period.

This could be done by modifying my code above.


#49

BTW, may I ask what presence sensor are you using? I have been trying to find a good presence sensor for myself and tried many. None of them can give me exactly what I want in a crowded apartment complex (iphone /GPS presence coverage is too big, smartthings presence sensor doesnt activates the scene every time I walk towards my apartment, and detecting my phone connecting to my wifi doesnt work because it has no reception before I walk up to my door, which also means I cannot use iBeacon as my phone will not be able to connect to my smartthings hub without wifi/gsm connection until I am right next to my door).

I am currently using a raspberry pi pinging my phone’s BT address which works the best but I have to turn my BT on/off every other day (or else my iphone BT will not respond after couple days of continues pinging).


(Doug Hamilton) #50

That could work. Basically, I only want the door to lock after the door sensor reports open and then closed. So if the presence sensor unlocks the door, I don’t want it to relock until it’s opened and then closed. if I could get your code to initiate the lock command only after the sensor reports open and then closed.


(Doug Hamilton) #51

I’m using the ST presence sensor but also live in a rural area. How close do you want to be before it connects?


#52

If you remove this line from my code’s initialize function, the door will lock 15 seconds after you close the door:

subscribe(thelock, “lock.unlocked”, handler)

Within that 15 seconds, if you re-open the door and leaves it open, it will not try to lock again. However, in this case, the contact sensor will trigger another close event when you close the door again and therefore it will try to lock the door after another 15 seconds. You can change that 15 seconds setting in the handler function:

runIn(15, lockTheDoor)

Please be aware that if your arrival sensor unlock the door, it will remain open until you open and close the door, or manually lock the door again (using keypad, key, or the smartthings app).

Note: the contact sensor will always report opened event before a closed event (unless at the contact magnet is not presence when the contact sensor is being powered up; in your case, the door is opened when the recessed sensor is powered up).


#53

Ah… I see. ST presence sensor will not work for me as I had tried it for a week before. Thanks :slight_smile: