Z Wave JS error when setting Kwikset lock usercode

I have a Kwikset 910 that I successfully included onto my network and have control of (for lock, unlock). I was trying to get Keymaster to work and discovered the problem I’m having, usercodes not being sent to the lock, is actually in Z Wave JS or HA. I get the following error in the logs after attempting to run the zwave_js.set_lock_usercode service in Developer Tools:

zwave_js_server.exceptions.NotFoundError: userCode for code slot 2 not found

The full text of the log is:

Logger: homeassistant.helpers.script.websocket_api_script
Source: components/zwave_js/lock.py:127
First occurred: 7:32:39 PM (1 occurrences)
Last logged: 7:32:39 PM

websocket_api script: Error executing script. Unexpected error for call_service at pos 1: userCode for code slot 2 not found
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 359, in _async_step
await getattr(self, handler)()
File “/usr/src/homeassistant/homeassistant/helpers/script.py”, line 559, in _async_call_service_step
await service_task
File “/usr/src/homeassistant/homeassistant/core.py”, line 1480, in async_call
task.result()
File “/usr/src/homeassistant/homeassistant/core.py”, line 1515, in _execute_service
await handler.job.target(service_call)
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 583, in handle_service
await service.entity_service_call(
File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 649, in entity_service_call
future.result() # pop exception if have
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 692, in async_request_call
await coro
File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 686, in _handle_entity_call
await result
File “/usr/src/homeassistant/homeassistant/components/zwave_js/lock.py”, line 127, in async_set_lock_usercode
await set_usercode(self.info.node, code_slot, usercode)
File “/usr/local/lib/python3.8/site-packages/zwave_js_server/util/lock.py”, line 89, in set_usercode
value = get_code_slot_value(node, code_slot, LOCK_USERCODE_PROPERTY)
File “/usr/local/lib/python3.8/site-packages/zwave_js_server/util/lock.py”, line 32, in get_code_slot_value
raise NotFoundError(f"{property_name} for code slot {code_slot} not found")
zwave_js_server.exceptions.NotFoundError: userCode for code slot 2 not found

My information is:
Core-2021.4.6
HA OS 5.13 supervisor
Z-Wave JS 7.2.4
Installed on a VM on Proxmox running on a SP3

Thanks!

I’m having the same issue with a schlage smart deadbolt (same exact exception / traceback).

core-2021.4.6
supervisor-2021.04.0
Z-Wave JS: 0.1.20
Installed on a VM on Proxmox running on an Intel NUC

Same issue here with a Schlage Connect (BE469ZP).

version: core-2021.5.1
installation_type: Home Assistant Supervised
host_os: Debian GNU/Linux 10 (buster)
update_channel: stable
supervisor_version: supervisor-2021.04.3
docker_version: 20.10.6

Has anyone ever found a solution to this? I am running into the same problem.

Following up since it’s been some time and I am seeing the same error and also running a Debian host_os as mentioned by jreed509 above.

For me this problem is ended up being caused by an incomplete inclusion. For whatever reason, my locks just refused to properly transmit the usercodes during the inclusion process.

After zwave_is added support for S2, my locks started to behave much better. Excluding and re-including using S2 eliminated this problem for all of my locks.

1 Like

I’m having the same issue. I’ve added and removed the lock twice and still get this user code error. Has anyone else come up with a way to make sure the inclusion process succeeds or knows how to verify if inclusion happens properly (note that the GUI tells me the lock is interviewed and interview “completes”).

Lock: BE469ZP
Highest Security: S2

I was encountering the same issue as folks above. I ended up getting the all the user codes registered with zwavejs by:

  • clicking the enroll/unenroll button on the schlage connect lock. The red led will blink for ~10s.
  • reinterview the lock in zwavejs. You will then see the user codes in the zwavejs debug log
  • restart homeassistant

I fixed my issue for reference:

The solution was to call service: zwave_js.invoke_cc_api for each user code you want to see or manage. see the other post for examples and more details.