Skip to content

Add support for new credential management API, schema 48#1418

Merged
MartinHjelmare merged 7 commits into
home-assistant-libs:mainfrom
AlCalzone:credential-api
May 6, 2026
Merged

Add support for new credential management API, schema 48#1418
MartinHjelmare merged 7 commits into
home-assistant-libs:mainfrom
AlCalzone:credential-api

Conversation

@AlCalzone

@AlCalzone AlCalzone commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Adds support for the new access-control / credential-management API introduced in Z-Wave JS 15.23.4 and exposed via Z-Wave JS Server schema 48 (zwave-js-server v3.8.0).

Bumps MAX_SERVER_SCHEMA_VERSION to 48 and adds:

  • AccessControlAPI wrapper on Endpoint / Node with all schema-48 commands (users, credentials, admin code, credential learn)
  • Dataclasses + DataType TypedDicts for UserData, CredentialData, capabilities, event args
  • Enums in const.command_class.access_control: UserCredentialType, UserCredentialUserType, UserCredentialRule, UserCredentialLearnStatus, SetUserResult, SetCredentialResult, AssignCredentialResult
  • Node/endpoint event models: user added/modified/deleted, credential added/modified/deleted, credential learn progress/completed
  • Buffer helpers (bytes_to_buffer_object / buffer_object_to_bytes) for credential payloads

Requires:

  • zwave-js >= 15.23.4
  • zwave-js-server >= 3.8.0

@MartinHjelmare

Copy link
Copy Markdown
Contributor

This PR needs to wait for completion of schema 47 support.

@MartinHjelmare MartinHjelmare marked this pull request as draft April 23, 2026 10:49
@raman325

Copy link
Copy Markdown
Contributor

What about the lock utility functions that HA uses? They should use these new methods under the hood

@MartinHjelmare MartinHjelmare marked this pull request as ready for review April 29, 2026 08:40
Comment thread README.md Outdated
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Comment thread test/model/test_access_control.py Outdated
Comment thread zwave_js_server/model/access_control.py Outdated
@MartinHjelmare

Copy link
Copy Markdown
Contributor

Some to_dict methods are missing coverage in the new module.

@raman325

raman325 commented May 4, 2026

Copy link
Copy Markdown
Contributor

what do we want to do about https://github.com/home-assistant-libs/zwave-js-server-python/blob/main/zwave_js_server/util/lock.py ? The HA services are currently dependent on these functions and I don't think the lib should have two separate paths for this functionality.

Maybe we just remove it entirely and make the change as part of the dependency bump?

@MartinHjelmare

Copy link
Copy Markdown
Contributor

If we don't need those utils anymore we can remove them and make a breaking change.

@AlCalzone

Copy link
Copy Markdown
Contributor Author

Only the code related ones though, not the lock configuration.
I can remove them if y'all think we should do this as part of this PR.

@MartinHjelmare

Copy link
Copy Markdown
Contributor

No, we should not expand the scope of this PR.

@AlCalzone AlCalzone requested a review from MartinHjelmare May 5, 2026 10:47
Comment thread test/model/test_access_control.py Outdated
Comment thread zwave_js_server/const/command_class/access_control.py Outdated
Comment thread zwave_js_server/model/access_control.py Outdated
Comment thread zwave_js_server/model/access_control.py Outdated
Comment thread zwave_js_server/model/access_control.py Outdated
Comment thread zwave_js_server/model/access_control.py Outdated
Comment thread zwave_js_server/model/access_control.py Outdated
Comment thread zwave_js_server/model/access_control.py Outdated
Comment thread zwave_js_server/model/access_control.py Outdated
Comment thread zwave_js_server/model/access_control.py

@MartinHjelmare MartinHjelmare left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@MartinHjelmare MartinHjelmare merged commit 97e3361 into home-assistant-libs:main May 6, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants