[Release] Reliable Locks

Reliable Locks app for Hubitat

An app that will create virtual locks that 'wrap' your physical lock devices, making them more reliable.

Purpose

Some smart locks are not reliable about reporting their status changes. For example, my Kwikset z-wave locks will sometimes accept a lock command from Hubitat, lock themselves, but never report the 'locked' state back to Hubitat. This app 'wraps' the locks inside a virtual lock that tries to make them more reliable. Then you expose the virtual reliable lock to your dashboards, homekit, Alexa, or Google Home user interfaces.

Installation

The best way to install this code is by using Hubitat Package Manager.

However, if you must install manually:

  1. Go to the "Drivers Code" page in Hubitat
  2. Click "+ New Driver"
  3. Paste in the contents of ReliableLockVirtualDevice.groovy
  4. Click Save. You've now set up the driver for the virtual device.
  5. Go to the "Apps Code" page in Hubitat
  6. Click "+ New App"
  7. Paste in the contents of ReliableLocks.groovy
  8. Click Save
  9. Click "+ New App" again
  10. Paste in the contents of ReliableLocksInstance.groovy
  11. Click Save. You've now set up the parent and child apps.
  12. Go to the "Apps" page in Hubitat
  13. Click "+ Add User App"
  14. Choose "Reliable Locks"
  15. Click "Done" You've now activated the parent app. Next, we'll use it to wrap our locks in the virtual locks.
  16. Click on "Reliable Locks"
  17. Click the "Add a new Reliable Lock" button
  18. Select a lock device and click "Done"

Now if you go to your "Devices" page, you'll find a new virtual device for your reliable lock. If you lock or unlock this virtual device, it will lock/unlock the real device, and then do a refresh afterwards. It can also do periodic refreshes. And, if you physically lock/unlock the real door, those state changes will still be reflected in the virtual device.

This virtual device is the one you should expose in your dashboards and other user interfaces, such as Alexa or HomeKit.

22 Likes

Nice app, thanks, could you add to turn off debug and text logs in future release?

Yes, I will work on that. Right now, you can turn off debug logging on the device pages for the virtual devices. Although that won't stop everything, because some logging comes from the app. I'll convert it into a single switch per lock (in the app settings) to turn it all on and off. Thanks for the feedback!

2 Likes

Ok, I just published an update to github. Now you can turn off logging by a setting in the app instance for the reliable lock. This will turn off logging both from that app, and from the associated virtual lock.

The files you'll need to update:

  • ReliableLockVirtualDevice.groovy
  • ReliableLocksInstance.groovy

So in my case, the refresh doesn't work because my locks never got the signal to lock or unlock. Here's an example in the logs.

[dev:609] 2019-03-04 09:10:54.066 pm [info] 3rd Garage Lock battery is 93%
[dev:609] 2019-03-04 09:10:54.066 pm [info] 3rd Garage Lock is locked
[app:460] 2019-03-04 09:10:52.473 pm [debug] 3rd Garage Lock:refreshing
[dev:609] 2019-03-04 09:10:40.352 pm [info] 3rd Garage Lock battery is 92%
[dev:609] 2019-03-04 09:10:38.383 pm [info] 3rd Garage Lock is locked
[app:460] 2019-03-04 09:10:37.427 pm [debug] 3rd Garage Lock:unlocking
[app:460] 2019-03-04 09:10:37.426 pm [debug] Reliable 3rd Garage Lock:unlocking detected
[dev:739] 2019-03-04 09:10:37.411 pm [debug] Reliable 3rd Garage Lock.unlock()

So I'm assuming instead of doing runIn(refreshTime, refreshWrappedLock) I'd call runIn(refreshTime, unlockWrappedLock()) (for unlock) and runIn(refreshTime, lockWrappedLock()) (for lock). EDIT: Nevermind... infinite loop. Will try separate functions for each to do a relock/reunlock.

I don't know if that's going to fix it for you. If the unlock command isn't reaching your lock (which, from your logs, it doesn't look like it's getting there), my initial guess would be an issue with your z-wave mesh. Though, without knowing more about your setup, it's hard to really know. You might try increasing the delay before refresh. Maybe your mesh is just taking a long time to get the unlock message to the lock. What brand are your locks?

Great app! Thanks!

Schlage. I have an open ticket with them. I’ll ask for an update as I believe my mesh issues have been resolved (at least from what I can tell).

2 Likes

If we take Reliable Locks out of the equation, do your locks lock/unlock reliably if you just trigger them on their device pages?

Not always. They are unreliable but in a different way. :slight_smile:

Lol. Yes, my z-wave locks (mine are Kwikset) are the only really unreliable part of my setup.

I signed up just to thank you for this. I recently set up my HE, and my Schlage Z-Wave locks had been giving me fits until I stumbled onto this post and installed your app. Now they're actually responding. Thanks for sharing your work!

3 Likes

Yeah I have a Schlage Be469. Factory reset, unpaired, repaired. Changed all my rules to use the releliable lock, but I still have broke Schlage that do not stay in sync. My mesh is awesome for every other device. Even contact sensors on my gates on either end of my yard. Good app tho. For my front door, it works great!

What version firmware on your Schlage? Just curious.

I have the Schlage BE469 locks and they are fairly spotty (sometimes work great; other times intermittent). I recently purchased an Aeotec Z-wave repeater ($30 on amazon) and they have worked 100% of the time since. Even thought the locks (front and back door) are only about 12 feet from the Hubitat, for some reason, the Aeotek repeater has fixed the network. I'll give this a try without the repeater and test the results.

1 Like

Reliable is no longer working for me since the latest updates to HE. Anyone else?

I just did the HE update, and tried it out. I'm having issues with some of my reliable locks, but I have the same issues if I try to control the locks directly through a dashboard.

  • If I physically manipulate the lock, it sends its new status back to the hub instantly.
  • But if I try to lock/unlock from a dashboard, a couple of my locks are not responding reliably, whether I use the Reliable Lock tile, or the tile for the actual lock.
  • I am not seeing any errors or anything unexpected in the logs.

This seems like a mesh issue. I'm going to do some z-wave repairs and wait a day and test again.

1 Like

Mine are working for the most part but are spotty. I'll try running Z-Wave network repair

Mine seem to be working fine after the z-wave repair.

Same here. Thanks