Schlage Z-wave Lock Command Works Occasionally

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.

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

https://support.smartthings.com/hc/en-us/articles/200958070-My-lock-is-showing-the-wrong-status-in-the-SmartThings-app

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

2 Likes

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

Truly, thanks!!!

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

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?

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.

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:

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.

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).

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.

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

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).

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