Custom smart lock manager that utilizes existing z-wave drivers?

Let me start by saying that I am new to Hubitat development. I am coding a Smart Lock Management application that automates the following process (using Kwikset Home Connect 620 Z-Wave locks):

  1. Read a data table or iCal link containing basic booking information (e.g., name, move-in date & time, move-out date & time, etc.);
  2. Create a unique, 4-digit access code for each booking in the table; and
  3. Add each access code to the relevant smart locks with the appropriate enable/disable dates

In effect, a more 'automated' version of Hubitat's existing Lock Code Manager application that can also be hooked into external sources. I am basically replicating the Airbnb lock management services that hook into a booking calendar and automatically set smart lock codes for new guests.

Is it possible to code this application while utilizing Hubitat's existing z-wave smart lock driver? I would like to avoid having to code my own driver as well, if possible.

Yes. Lock Code Manager just uses the standard commands on any lock (well, lock with keypad) driver to read, add, and remove codes. These are standard parts of any driver for this kind of device, and it's part of the reason drivers exist in the first place--abstracting device-specific details away from apps. Any app could do the same, as could you manually, and there should be no problem writing your own app to use the same commands.

Unless the locks don't behave, which some are notorious for. Another story. :slight_smile:

2 Likes

Thanks, bertabcd1234. So it sounds like I can get away without coding a custom driver for this particular application.

One follow-up question for you-- I have been struggling to locate documentation that outlines these 'standard' commands for Z-Wave smart locks. Are they published anywhere on Hubitat's Documentation portal, Github, or by the manufacturer (i.e., Kwikset)?

Capabilities Lock and LockCodes - Driver Capability List | Hubitat Documentation

1 Like

The above link by @thebearmay is what you're looking for. But to clarify, these are not Z-Wave-specific; they are the commands and attributes any device that implements the capability should have -- in your case, the "LockCodes" capability is probably the most important (though pretty much any device like this would likely also have "Lock").

In other words: if you write something like this, there is no reason it shouldn't also work with a Zigbee lock, for example.

1 Like

Did you end up creating this lock management code and are seeking to share?