Support PIN management for Matter DoorLock #551
Replies: 10 comments 27 replies
-
|
This is missing from zwave locks, as well (though zwave js UI does provide a way to directly access the code assignments.) |
Beta Was this translation helpful? Give feedback.
-
|
I've created a workaround. Download / clone the file matter_door_lock.py. Place the shell_command:
matter_door_lock: ./matter_door_lock.py --nodeId {{node_id}} {{sub_command}}You can then create a script which executes the file: To get the device node ID: sequence:
- action: shell_command.matter_door_lock
data:
node_id: >-
{% set entity_id = 'lock.yale_smart_lock_with_matter' %}
{% set device_id = device_id(entity_id) %}
{% set matter_id = device_attr(device_id, 'identifiers') | selectattr(0, 'eq', 'matter') |
map(attribute=1) | select('match', 'deviceid_.*') | first %}
{% set node_id = matter_id.split('-')[1] | int(base=16) %}
{{ node_id }}
sub_command: >-
set-user --userIndex {{ user_index }} --userName {{ user_name }}
--userUniqueID {{ unique_id }} --userType {{user_type}}
response_variable: response
fields:
user_index:
selector:
text: null
required: true
name: User Index
unique_id:
selector:
text: null
name: Unique Id
required: true
user_name:
selector:
text: null
name: User Name
required: true
user_type:
selector:
text: null
name: User Type
required: true
description: |-
kUnrestrictedUser
kYearDayScheduleUser
kWeekDayScheduleUser
kProgrammingUser
kNonAccessUser
kForcedUser
kDisposableUser
kExpiringUser
kScheduleRestrictedUser
kRemoteOnlyUser
alias: Set Lock User
description: ""If this is worth additional investment let me know, or if there is a clear direction on how to add users / pins in Home Assistant I can refactor and contribute! |
Beta Was this translation helpful? Give feedback.
-
|
Ignore my earlier comment about aiohttp/chip imports, this was a red herring... In the Home Assistant Traces I see the following: So it appears all arguments are being passed to matter_door_lock.py except for nodeId. If I test the logic in Template editor node_id is correctly returned. {% set matter_id = device_attr(device_id, 'identifiers') | selectattr(0, 'eq', 'matter') | map(attribute=1) | select('match', 'deviceid_.*') | first %} I'll try to dig into this further, but let me know if you see anything obvious. |
Beta Was this translation helpful? Give feedback.
-
|
FYI, I posted a new feature request for a universal lock user code manager that would apply to all locks instead of just Matter protocol, see here: Regardless of that, developers who have input on this would probably also want to contribute idea and feedback to this architecture discussions: Those discussions also have links to custom components for lock managers where a developer is working on adding cross-protocol support. See: and |
Beta Was this translation helpful? Give feedback.
-
|
Looks like a few days ago this was pushed up in PR home-assistant/core#161936 and based on it's contents it would probably supersede this work. |
Beta Was this translation helpful? Give feedback.
-
|
Unfortunately, I'm not a Python expert so I can't judge. The lock of course did have a user and PIN, but it was set on another fabric (Google Home) which I was using because Home Assistant could not set PINS. The lock was also joined to the Home Assistant fabric, but as I understand it, users and PINS and maintained separately by each fabric and one fabric cannot see the other's users. Edit: Looking at the Matter server logs, it appears this lock probably does not keep user info by fabric. The unknown entry would appear to be some kind of hash of the user created with Google Home. |
Beta Was this translation helpful? Give feedback.
-
|
FYI, the custom Lock Code Manager integration componest just added a new lock provider for Matter locks as well if want some additional features like sync codes between different locks and ability to schedule when codes should be enabled (and more via Blueprint automations): For reference, Lock Code Manager is a custom component integration (that can be installed via HACS) which adds severql additipnal lock related features and functions which are not yet supported in Home Assistant’s core:
Lock Code Manager currently support Z-Wave + virtual locks via the Virtual custom integration component (also available via HACS):
PS: Lock Code Manager integration has in turn taken a lot of inspiration from the keymaster interation but taken it to the next level. |
Beta Was this translation helpful? Give feedback.
-
|
This seems to be addressed in the following request and the latest version: |
Beta Was this translation helpful? Give feedback.
-
|
Perhaps we could implement a feature where Lock-type entities require unlocking via your mobile device's security method (fingerprint, pattern, PIN, etc.). |
Beta Was this translation helpful? Give feedback.
-
|
As @lboue mentioned this functionality is addressed on our public roadmap: More recently, there was another improvement in home-assistant/frontend#51293 In general, we aim to further streamline credential management, starting with Matter locks and proceeding with Z-Wave, more info here to engage further OpenHomeFoundation/roadmap#8 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the enhancement
Setting up a Yale matter door lock enables control of the lock but there is no way within homeassistant to configure passcodes for the device. The only way I found to do so was to share the device with google home and configure the passcodes within the google home app. Ideally this would be capable within homeassistant
Device or feature details
Device: Yale Smart Lock with Matter (33040)
Firmware: 1.0.1+0
Use cases
Fully support a matter door lock from within homeassistant without requiring a 3rd party ecosystem.
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions