-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lock Capability Schema #11
Comments
See also: WebThingsIO/api#53 |
I'm about to add door lock support to the Zigbee adapter. Initially I'd like to proposed that we add a capability of DoorLock along with a locked property which would be something like a LockedProperty or a DoorLockedProperty either with a boolean or with an enumeration. Zigbee locks support 3 locked states: |
For HomeKit, the following are defined:
There are also some further characteristics, which may be interesting/useful:
|
You also need to check a door sensor before locking armored doors. The sensor may be used also as alarm (event) |
Schema proposal below... DoorLock
LockedProperty
TargetLockedProperty
LockAction
UnlockAction
LockJammedEvent
Questions:
|
I like "Lock", personally, since nothing about this is specific to a door.
I don't think we need the in between states, i.e. "locking" and "unlocking". That's why we have Locked vs. TargetLocked. However, I do think that "jammed" could be useful, as the lock is stuck in that state and requires intervention.
I think that would be fine, provided we specify the special meaning of true/false like we do with OpenProperty.
I don't think the actions are particularly necessary, especially not if there is also a writable TargetLockedProperty. The way HomeKit handles this is by using a normal property but requiring a special write procedure which requires a timeout. So, from a spec perspective, it's still just a property.
I would prefer the "jammed" state. |
@dhylands thoughts? |
What about a door state property? If the door is not properly closed you might not activate the lock. I think that a door sensor is a must for a lock. |
We already have a separate DoorSensor capability for that, though. Are those typically integrated into a smart lock? |
A security door must check if door is properly closed before turning the key or the mechanism will get stuck because it will try to lock the top and bottom side of the door. |
I've tried to create a JSON object using Java and webkit v0.12.0 with some example data. I think it complies with the proposed schema and the comments made by mrstegeman: https://pastebin.com/8BG1viEv Have I understood you correctly? |
None of the door locks that I've played with have integrated door sensors (which isn't to say that they don't exist). I'm referring to the types of door locks that a consumer would by at Home Depot to put on the entrance door to their house. I don't see any support for User Codes? I think that a LockedEvent and UnlockedEvent would be useful (along with the JammedEvent). These events would include a timestamp, how the door was locked (via user, touchpad, manually) an associated usercode (not the actual pin, but the index of the usercode that was used), and some text. |
I'm not sure that user codes are a required part of all smart locks, are they? Nor am I sure how we'd represent that. I guess an array of LockUserCodeProperty objects? |
Perhaps not required, but common. Zigbee and zwave would both use an array of strings. Note that there could be potentially hundreds of entries in the array, and it may be sparse (i.e. perhaps only entries 0, 1, and 57 are used). |
I built my own smart lock. These things probably don't need to be in the spec, but might be interesting:
For completeness, my lock device also has:
|
@raidnet-ms wrote:
Note that a device can have multiple capabilities, so you could have a device which exposes both |
No description provided.
The text was updated successfully, but these errors were encountered: