Z-Wave JS - cannot set user codes on Schlage Connect lock

I have three locks in my house - A Yale Pro SL and two Schlage Connects. The Yale Pro SL and one of the Schlage Connects work perfectly. But I recently added a second Schlage Connect to my house and I’ve been having difficulty getting it work fully with my set up. Locking and unlocking through Home Assistant works fine, but if I try to set user codes either by using Keymaster or by directly calling the Z-Wave: Set a usercode on a lock service through developer tools, I get the following error in the logs:

[281472885487360] Error handling message: Unknown error (unknown_error)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 648, in handle_execute_script
    await script_obj.async_run(msg.get("variables"), context=context)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1524, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 409, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 453, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 476, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1738, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1775, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 769, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 931, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/zwave_js/lock.py", line 132, in async_set_lock_usercode
    await set_usercode(self.info.node, code_slot, usercode)
  File "/usr/local/lib/python3.10/site-packages/zwave_js_server/util/lock.py", line 112, in set_usercode
    value = get_code_slot_value(node, code_slot, LOCK_USERCODE_PROPERTY)
  File "/usr/local/lib/python3.10/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 system info:

HA 2022.10.1 running on Odroid N2
Silicon Labs ZST10-700 Z-Wave controller
Z-Wave JS driver version 10.3.0 / server version 1.24.0

Any ideas?

Thanks!

  • Jeff

You can try this:

I think Keymaster is supposed to load the user codes as I’ve suggested. Maybe something went wrong there.

I tried running that service call (log output below), but I still can’t set user codes. Anything else I can try?

2022-10-09T22:58:06.103Z SERIAL » 0x011b00a901070f9f035000e705bb978d6c8e3bba87e925000000006784        (29 bytes)
2022-10-09T22:58:06.107Z DRIVER » [Node 007] [REQ] [SendDataBridge]
                                  │ source node id:   1
                                  │ transmit options: 0x25
                                  │ callback id:      103
                                  └─[Security2CCMessageEncapsulation]
                                    │ sequence number: 80
                                    └─[UserCodeCCGet]
                                        user id: 10
2022-10-09T22:58:06.112Z SERIAL « [ACK]                                                                   (0x06)
2022-10-09T22:58:06.115Z SERIAL « 0x010401a90152                                                       (6 bytes)
2022-10-09T22:58:06.116Z SERIAL » [ACK]                                                                   (0x06)
2022-10-09T22:58:06.118Z DRIVER « [RES] [SendDataBridge]
                                    was sent: true
2022-10-09T22:58:07.369Z SERIAL « 0x011d00a96700007b00a47f7f7f7f01010300000000420100007f7f7f7f7fcc    (31 bytes)
2022-10-09T22:58:07.371Z SERIAL » [ACK]                                                                   (0x06)
2022-10-09T22:58:07.372Z DRIVER « [REQ] [SendDataBridge]
                                    callback id:            103
                                    transmit status:        OK, took 1230 ms
                                    routing attempts:       1
                                    protocol & route speed: Z-Wave, 40 kbit/s
                                    ACK RSSI:               -92 dBm
                                    ACK channel no.:        1
                                    TX channel no.:         1
                                    beam:                   1000 ms
2022-10-09T22:58:09.002Z SERIAL « 0x012100a8000107189f035f00d51542cb9f4b84157747ecf3bd3e350c83b10d290 (35 bytes)
                                  0a480
2022-10-09T22:58:09.005Z SERIAL » [ACK]                                                                   (0x06)
2022-10-09T22:58:09.007Z CNTRLR   [Node 007] [translateValueEvent: value updated]
                                    commandClass: User Code
                                    endpoint:     0
                                    property:     userIdStatus
                                    propertyKey:  10
                                    internal:     false
                                    secret:       false
                                    event source: undefined
2022-10-09T22:58:09.009Z CNTRLR   [Node 007] [~] [User Code] userIdStatus[10]: 0 => 0               [Endpoint 0]
2022-10-09T22:58:09.010Z CNTRLR   [Node 007] [translateValueEvent: value updated]
                                    is root endpoint:        true
                                    is application CC:       true
                                    should hide root values: false
2022-10-09T22:58:09.011Z CNTRLR   [Node 007] [translateValueEvent: value updated]
                                    commandClass: User Code
                                    endpoint:     0
                                    property:     userCode
                                    propertyKey:  10
                                    internal:     false
                                    secret:       true
                                    event source: undefined
2022-10-09T22:58:09.012Z CNTRLR   [Node 007] [translateValueEvent: value updated]
                                    is root endpoint:        true
                                    is application CC:       true
                                    should hide root values: false
2022-10-09T22:58:09.014Z DRIVER « [Node 007] [REQ] [BridgeApplicationCommand]
                                  │ RSSI: -92 dBm
                                  └─[Security2CCMessageEncapsulation]
                                    │ sequence number: 95
                                    └─[UserCodeCCReport]
                                        user id:   10
                                        id status: Available
                                        user code: ********

Although I’m no longer seeing an error in the log when I try to set the code. It looks like everything worked in the HA UI, but the code is not accepted when I attempt to physically unlock the door.

here’s what I now see in the log when I issue the “Z-Wave: Set a usercode on a lock” service call:

2022-10-09T23:19:14.902Z CNTRLR   [Node 007] [setValue] calling SET_VALUE API UserCodeCCAPI:
                                    property:     userCode
                                    property key: 2
                                    optimistic:   true
2022-10-09T23:19:14.914Z SERIAL » 0x012900a901071d9f037b00f42767ec2a7d2591ffa14139c063f34cb2fafc3f512 (43 bytes)
                                  5db51c4250000000075e3
2022-10-09T23:19:14.915Z DRIVER » [Node 007] [REQ] [SendDataBridge]
                                  │ source node id:   1
                                  │ transmit options: 0x25
                                  │ callback id:      117
                                  └─[Security2CCMessageEncapsulation]
                                    │ sequence number: 123
                                    └─[SupervisionCCGet]
                                      │ session id:      27
                                      │ request updates: true
                                      └─[UserCodeCCExtendedUserCodeSet]
                                          code #2: ****** (status: Enabled)
2022-10-09T23:19:14.924Z SERIAL « [ACK]                                                                   (0x06)
2022-10-09T23:19:14.926Z SERIAL « 0x010401a90152                                                       (6 bytes)
2022-10-09T23:19:14.927Z SERIAL » [ACK]                                                                   (0x06)
2022-10-09T23:19:14.928Z DRIVER « [RES] [SendDataBridge]
                                    was sent: true
2022-10-09T23:19:16.198Z SERIAL « 0x011d00a97500007d00a47f7f7f7f01010300000000420100007f7f7f7f7fd8    (31 bytes)
2022-10-09T23:19:16.199Z SERIAL » [ACK]                                                                   (0x06)
2022-10-09T23:19:16.201Z DRIVER « [REQ] [SendDataBridge]
                                    callback id:            117
                                    transmit status:        OK, took 1250 ms
                                    routing attempts:       1
                                    protocol & route speed: Z-Wave, 40 kbit/s
                                    ACK RSSI:               -92 dBm
                                    ACK channel no.:        1
                                    TX channel no.:         1
                                    beam:                   1000 ms
2022-10-09T23:19:17.735Z SERIAL « 0x011a00a8000107119f038c00a79e8c0805626311505f6e4d9200a4f8          (28 bytes)
2022-10-09T23:19:17.737Z SERIAL » [ACK]                                                                   (0x06)
2022-10-09T23:19:17.739Z DRIVER « [Node 007] [REQ] [BridgeApplicationCommand]
                                  │ RSSI: -92 dBm
                                  └─[Security2CCMessageEncapsulation]
                                    │ sequence number: 140
                                    └─[SupervisionCCReport]
                                        session id:          27
                                        more updates follow: false
                                        status:              Success
                                        duration:            0s
2022-10-09T23:19:17.744Z CNTRLR   [Node 007] [setValue] result of SET_VALUE API call for UserCodeCCAPI: (Supervi
                                  sionResult)
                                    status:   Success
2022-10-09T23:19:17.745Z CNTRLR   [Node 007] [setValue] updating value with event
2022-10-09T23:19:17.746Z CNTRLR   [Node 007] [translateValueEvent: value updated]
                                    commandClass: User Code
                                    endpoint:     0
                                    property:     userCode
                                    propertyKey:  2
                                    internal:     false
                                    secret:       true
                                    event source: driver
2022-10-09T23:19:17.747Z CNTRLR   [Node 007] [translateValueEvent: value updated]
                                    is root endpoint:        true
                                    is application CC:       true
                                    should hide root values: false
2022-10-09T23:19:23.162Z SERIAL « 0x011a00a8000107119f038d00cc4be509e0c8e347a2477dc4e100a4b5          (28 bytes)
2022-10-09T23:19:23.166Z SERIAL » [ACK]                                                                   (0x06)
2022-10-09T23:19:23.169Z DRIVER « [Node 007] [REQ] [BridgeApplicationCommand]
                                  │ RSSI: -92 dBm
                                  └─[Security2CCMessageEncapsulation]
                                    │ sequence number: 141
                                    └─[SupervisionCCReport]
                                        session id:          27
                                        more updates follow: false
                                        status:              Fail
                                        duration:            0s

I got this working. I read in another thread that the lock needs to be close to the the Z-Wave controller during initial pairing. So I temporarily uninstalled the lock from my back door, and installed in a door right beside the controller. Un-paired, re-paired, and BOOM. All works properly now. I have the lock re-installed on my back door, and I can add and remove codes both using the direct z-wave service calls and with Keymaster.

Super odd… I never expected this was going to work, but since it only takes a few minutes to uninstall the lock from the door, I thought I’d give it a shot. Z-Wave works in mysterious ways!

I still have the problem of being unable to set the codes. Replaced the batteries, unpaired, repaired with the radio a few centimeters from the lock, has S2 control access, shows all the right subcategories of parameters in ZJS2M. But when I change a code, it says that it changed it, then just reverts back several seconds later. If I set the codes at the lock itself, those codes show up in ZJS2M.