Enhanced Auto Lock Door?!?!?!?!

I witnessed a bug tonight where a lock reported a false alarm about not locking. Just FYI. I probably messed up on the state counter logic.

Iā€™m experiencing an issue with this app and my schlage deadbolt. I want the lock delay to be 0. And this works perfectly fine when manually unlocking the door via the lever or the touchpad by waiting on the door contact sensor to show as closed before relocking. But when I unlock it via the app, it autolocks itself immediately without waiting for the door to open and then close. What can be causing this issue and is it fixable? For now Iā€™m stuck making the delay 1 minute.

Any idea why Iā€™ve been getting the ā€œLocking attempt FAILED! Check out door immediately!ā€ on a regular basis?

I know Iā€™ve had some connectivity issues between the lock and the hub. If that is the case, is there a way for it to monitor connection status and only check if there is a solid connection and perhaps fail a little more gracefully? And perhaps delay the check until it reconnects.

I looked at the log for the lock but it doesnā€™t show much other than the app command being sent and the lock being set.

This is you being notified that your lock jammed. Not that you lost connection.

@stevenascott Thank you so much for this app.

The enhanced auto lock app was going crazy in my system. I think it may have been the fact that my door sensor had to go through an Arduino (with intentional delay logic), and then a Smart App to multiplex it to a virtual sensor. I suspect that caused the door lock notification to arrive well before the door close notification, thus really confusing the app.

So far, your app seems to be much more robust, and much closer to the functionality I really want (i.e. I donā€™t need the auto-unlock feature.)

One item isnā€™t working for me ā€“ the push notification (such as for the notification when the door is open too long.) Not sure whyā€¦

Curious, are you on iOS or Android? Iā€™ve had a few instances where the notifications donā€™t work, but Iā€™d say that itā€™s about 95% accurate with the door being left open, or not locking properly.

On my to-do list is to add the logic of also notifying when the door is -finally- closed after being left open.

Iā€™ve only tested this on Kwikset locks, so maybe thatā€™s part of the issue. I originally had a bug with the failure notifications, but it has been working perfectly since that was corrected. Make sure you have the latest code and not the first one I posted.

I have the latest code.

I think I figured out the problem though. I had set the auto lock time to be 300 seconds and then the verification check to be 60 seconds because I thought they were additive. I then switched it to make the verification check be 360 seconds because I think they are individual timers, not additive. Since then Iā€™ve had zero issues with that notification about lock being jammed.

So two suggestions: 1) Maybe add some text to the time slots to say that the second check should be greater than the first and 2) Maybe have a logic check that doesnā€™t allow times lower than the initial lock.

It may also be the case that my connectivity was improved and it went away because of that, but I donā€™t think so.

Iā€™ve been making modifications to help with the logic a bit. Hopefully in the next day or so I can get it uploaded. I also added an optional message handler that allows for debug messages to spam your phone. It can be really useful for troubleshooting.

Fantastic. BTW, thanks for writing this app. My wifeā€™s neuroticism thanks you as well.

Haha, awesome. Yeah I fixed a bit of logic around the lock-failure/recovery scenarios. Some state changes/clears/etc. I also bypassed the RunIn command for time settings of 0 seconds. RunIn truly, unbelievably sucks. While it works 90% of the time, that is garbage for controlling locks.

We really need local control from the v2 hub, and it would also be super slick if these locks could be programmed to force-lock after like an hour, regardless of Z-Wave input.

Good afternoon Gents. I had the same questions about the original app also. I tried the code above to create a new smartApp and it works as intended except I am getting notifications for each unlock and lock event twice right after each other timestamped exactly the same. It doesnt matter which setting I choose under notification Yes/No or with none checked. I tried to modify the code to remove the notification section and of course that led to the smartApp not working at all.

Any ideas on why I would be receiving notifications (X2) with this app?

Hey DJ, if youā€™re talking about my app, there have definitely been some bugs regarding the notifications, and failure scenario handling.

Iā€™ve made some improvements, and given more-granular control over alerts. Also, if you choose 0 seconds for lock-after-close, it bypasses the buggy runIn function and uses a pause instead. Please use a 5+ second delay on the re-lock-after-unlock, as that gets a bit funny. Plus, I canā€™t imagine why anyone would use anything lower than that. Iā€™ve had really great success with this app testing all day today with my Kwikset door handle, and deadbolt locks (Iā€™ve got 3 total.) I donā€™t have input normalization or anything like that, so you could potentially cause weird issues with weird settings.

Personally, I use 60s lock-after-close, 300s lock-after-unlock, and 300s notify-if-left-open. Been working great. Iā€™ve used various beta versions of the code all week and have had about 99% success overall. I canā€™t think of a single time it didnā€™t notify on lock failureā€¦which is my book is 100% success, as it worked as intended.

Iā€™ve noticed some slightly strange behavior regarding push notifications with the various settings. Basically debug is OVERKILL, but it might help you troubleshoot something, to help me correct the app. The ST cloud has been super buggy and horrible these last two months, and as a result, my door locking has become less consistent. I hope they correct this. The door sensors I use are ST-branded Zigbee, and seem to be hit hard with ST bugs, along with ST motion zigbee sensors. I have to reboot my hub almost daily, and Support seems overwhelmed with problems like mine.

Anyways, enjoy. By no means is this perfect. Use at your own risk. :smile:

edit: removed link, so itā€™s not duplicated/out-of-sync with Club Steveā€™s AutoLock

1 Like

If I go into this SmartApp and just overwrite the old code and save it, do I then have to go back through the set up? Is this the appropriate way to do it or should I make it a new SmartApp and reset everything up through that? Iā€™ve not ever updated a SmartApp, so I donā€™t know the protocol here.

Thanks.

Edit: I went ahead and overwrote the old code, saved and published the app, and went back through the set up to update the missing settings (for door open notification and the two notification types). Everything seems to be all good.

Yeah in general, you just copy-paste the new code, save, and publish again. The smartapp on your phone should update instantly. The only reason youā€™d need to go into the app on your phone is if the settings options have changed. IE when I added new features to the setup portion.

Iā€™ve just installed this app in favor of it over the Enhanced Auto Lock. Good work.

Iā€™ve been having a problem though. After sending lock attempts 1 and 2, it says ā€œALL Locking attempts FAILED! Check out Garage Door Lock immediately!ā€

When I use the ST app to lock the door, it locks fine, no issues. I believe Iā€™m using the newest code from GitHub. Any idea why I would be having these error notices, and why it isnā€™t locking my door?

is this just today? or in general? if itā€™s today i would say wait a bit and try again, although smart things status says everything is working most of my smart apps this afternoon are not working at all. about two hours ago it seemed to have been resolved and things started working again but currently nothing.

Guys, I had major issues the last few days with my locks reporting failed attempts, and ACTUALLY failing to lock sometimes. I have not made any code changes, so I really think itā€™s ST-related.

My goal is to eventually figure out how to keep checking to make sure the lock is behaving properly. Problem is, to do such a thing really requires me to use the ST scheduling mechanism. Otherwise Iā€™d have to poll the lock constantly and that will cause the battery to drain, and spam the ST hub/cloud for little gain.

Honestly Iā€™ve had huge issues for the last few months. If this were a life-or-death situation, (locks and thermostats definitely could be,) then I wouldnā€™t be using ST right now. I see this as a big toy, basically.

That said, I have every intention of adding better logic to the ā€œis it really lockedā€ aspect of the app. My 60-hour workweeks donā€™t give much time for this, haha.

I have created a new thread for my app: Club Steve's AutoLock

This was just today. I just installed the app today. Iā€™ll give it a shot tomorrow and report back, probably on the new thread :slight_smile:

automatically unlock door when openā€¦

This feature is made for typically businesses or if your home door has a door pully system. In other words if you door closes on its own. Lets just say your multi purpose sensor is link with your Z Wave or Zigg Bee door Lock. When the multi purpose sensor detect your door is open but door lock is locked. Smart Things Hub will assumes the door canā€™t be shut due to the lock being locked. As a result, the feature ā€œautomatically unlock door when openā€¦ā€ feature will come in, allowing the door lock to unlock enabling the door completely shut itself thanks to the door pully system. Now with furter tweaking of your smartthings settings. You can program door lock to auto lock if door is unlock for a ample amout time.