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.
Paste in the contents of ReliableLockVirtualDevice.groovy
Click Save. You've now set up the driver for the virtual device.
Go to the "Apps Code" page in Hubitat
Click "+ New App"
Paste in the contents of ReliableLocks.groovy
Click Save
Click "+ New App" again
Paste in the contents of ReliableLocksInstance.groovy
Click Save. You've now set up the parent and child apps.
Go to the "Apps" page in Hubitat
Click "+ Add User App"
Choose "Reliable Locks"
Click "Done" You've now activated the parent app. Next, we'll use it to wrap our locks in the virtual locks.
Click on "Reliable Locks"
Click the "Add a new Reliable Lock" button
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.
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!
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.
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?
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!
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!
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.
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.