Zigbee Door Lock Pin Codes

I am considering a Zigbee based pin-code operated deadbolt (Schlage) for a rental property. I see the Zigbee Adapter already supports lock/unlock. I’ve examined the Zigbee Cluster documentation and see the protocol has messages defined for setting PIN entry codes. Does the adapter support this functionality?

Unfortunately, it doesn’t currently support entering/managing the PIN/user codes.

I’ve got a lot of irons in the fire, but I’d be willing to spend some time working on adding it. Are there any design considerations I would need to consider?

The biggest issue is the UI. I just ran into this issue with the zwave adapter as well. The Yale zwave lock I was using supports 100 user codes.

One possibility would be initially support some small number of PIN/User codes and create a property per code.

I think that the right long term solution is to have some custom UI, and have a single user-code property which would bring up the custom UI when clicking on that property (or something along those lines).

We discussed this in a meeting yesterday and there are a couple of approaches that were raised:

  1. Representing the list of codes as an object property (A map of strings in JSON)
  2. Having the adapter add-on provide custom UI for managing codes

Number 1 requires new features in the gateway to represent properties with a type of object in the UI, which is already support in the Web Thing API specification.

Number 2 is technically possible today by having an adapter expose a URL for a custom web UI in a Thing Description.

"links": [
  {
    "rel": "alternate",
    "mediaType": "text/html",
    "href": "/things/lock"
  }
]

Unfortunately in practice this is quite hard to do in an add-on and I’m not sure whether anyone has figured out how to do it yet.

We’re going to try to add a smart lock capability in the next release, so will look at this in more detail. Ideas and contributions welcome.

Ok, looks like I have some reading to do in order to catch up with the concepts here. Is either option preferred by the team over the other?

On a side note, my Schlage Connect Smart Deadbolt (Zigbee) arrived last night. After a few failed attempts, I was able to pair and activate the lock.

I would like to propose a set of actions based on what I read in the Zigbee Cluster specification for Door Locks (see attached zip file). This is just a subset of actions supported by Zigbee, but enough to get started (at least for my needs :grinning:). They are proposed in the order of priority.

Some values use in the integer limits, such as the number of supported pin-code users and the number of schedules per user, are variable and need to be read from the door lock.

Question on Web Thing API: Is there a specific date/time property type I can use in the schedule?

DoorLockActions.zip (747 Bytes)

I have come up with an idea, and would like your feedback.

I would like to add actions to the Zigbee Doorlock to Add and Remove users, set pin code, etc. The door lock will keep an array of users, and store some details (e.g. user name) in a file. I have posted a proof of concept called SimDoorLock. It implements a “users” property to represent the array of user objects. The Mozilla IoT gateway does not show this property, but it can be queried. The gateway does show the actions. They work, but are not very pretty.

In addition, I am working on an extension for the gateway called Door Lock Manager. It’s not much to look at right now, but the plan is for it to provide the nice user interface to manage users for any door locks which implement the generic AddUser/RemoveUser actions (among others).

1 Like