I just did a test using my tasker call on the API and it worked correctly.
Hello, everyone.
Indeed, the fix was released to production already, so everything should be working fine. If you notice anything weird please let me know!
While the locks set fine, I noted this morning that on one of my two Schlage locks the names had reverted to Code 1, Code 2, etc. I reset the codes and looked for a way to replicate this behavior, but no luck so far. Other users might want to watch for this as well.
@bthrock have you looked into a way of getting a list of the existing slots and the name associated with them?
As the names weren’t working until recently, I haven’t as yet attempted to request the lockCodes attribute via Tasker or the API directly, but it should be possible.
Until now, I’ve simply viewed them via the CLI or monitored them via my Replica lock on HE, which mirrors those attributes and makes them accessible via webCoRE. The list is just JSON in the form {“1”:“John Doe”,“2”:“Jane Smith”,“3”: “Robert Jones”}, so I just parsed that and looked for name changes. That was how I noticed they had started populating with the proper names recently.
I wish I had a better answer.
I am unfamiliar on querying a device only on attributes. I am not quite certain as to how I would call the API for just lock codes
I believe sending a refresh command to the lock will return all the device attributes in the response, which you could then parse accordingly, but I haven’t tried this for the locks yet. Maybe this link will help.
That’s a post command and I get an accepted from it but it’s still not a get command that pulls down anything.
I’m going to call in the big guns here. Maybe @orangebucket has seen or nose of a way of pulling in the lock code names and slots.
Here’s a hail Mary… @nayelyz is there an API call that will let you get the lock code slot and name? I’ve been looking and I cannot seem to unearth it.
I may have worked with a virtual lock briefly out of curiosity but that’s about it. In general terms you have three options to use the API to get the status out of a device. All are GETs.
/devices/{{deviceId}}/status
(where {{deviceId}}
is the usual UUID) will give you all the data of all of the attributes of all the capabilities of all the components in a hierarchy.
If you know which component you are interested in you can be a bit more precise by using /devices/{{deviceId}}/components/{{componentId}}/status
(where an example of {{componentId}}
would be main
) and you’ll get the data for all of the attributes of all of the capabilities of the one component.
If you know which capability of which component you are interested in you can go one step further and use /devices/{{deviceId}}/components/{{componentId}}/capabilities/{{capabilityId}}/status
(where {{capabilityId}}
might be lockCodes
) and you’ll get the data for all the attributes of that capability for the component.
It doesn’t really make a lot of difference really as you still need to pick the attribute data out of the returned JSON. So in pseudo code it might be components.main.lockCodes.lockCodes.value
v lockCodes.lockCodes.value
v lockCodes.value
, and I’ve no idea what lockCodes.value
contains, if indeed it is the right place.
As of now I can confirm this get the lockCodes and all data.
/devices/{{deviceId}}/components/main/status
I will test all other methods and edit this when I can confirm them.
EDIT
This returns only data that has to do with lock codes(qty, slot number & name, max code lenght, etc)
/devices/{{deviceId}}/components/main/capabilities/lockCodes/status
Absolutely great stuff, and really appreciate @Jake_Mohl tagging you on this. The “/status” option was almost certainly what I was thinking about when I mentioned “refresh,” but with lack of use things tangled in my head. Sadly not the first time, nor the last, I’m sure.
The latter two options I was unaware of. I’m definitely bookmarking your post.
Thank you @orangebucket you again are a wealth of knowledge and never seem to fail with some insight when it comes to the API.
There is an unresolved issue here with Code Names that were previously set being cleared and replaced with the Code 1, Code 2, etc. default on certain Z-Wave locks. This issue was not present when the device was using the groovy DTH supplied by @RBoy.
Specifically, the issue is occurring on my older Schlage BE469 locks. It has not, to date, occurred on my newer Schlage BE469ZP locks.
Schlage BE469
Data
MSR: 003B-6341-5044
fw: 104.21
manufacturer: Schlage
networkSecurityLevel: ZWAVE_S0_LEGACY
Raw Description zw:Fs type:4003 mfr:003B prod:6341 model:5044 ver:104.21 zwv:3.42 lib:06 cc:22,72,7A,98,86 sec:5D,85,20,80,70,62,71,63
I can easily replicate this behavior by sending a Refresh command to the lock. I have tried this with and without Smart Lock Guess Access installed, and the results are the same. There may be other ways to trigger this behavior; I don’t know.
Lock Code presentation from the CLI before refresh
"{\"1\":\"John Doe 1\",\"2\":\"John Doe 2\",\"3\":\"John Doe 3\",\"4\":\"John Doe 4\",\"5\":\"John Doe 5\"}"
Lock Code presentation from the CLI after refresh
"{\"1\":\"Code 1\",\"2\":\"Code 2\",\"3\":\"Code 3\",\"4\":\"Code 4\",\"5\":\"Code 5\"}"
Here is the log from the CLI for a single refresh commend.
Click to Expand Log
2023-01-19T19:34:24.131273592+00:00 TRACE Z-Wave Lock Received event with handler capability
2023-01-19T19:34:24.136786633+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> received command: {"args":{},"capability":"refresh","command":"refresh","component":"main","positional_args":{}}
2023-01-19T19:34:24.140329883+00:00 TRACE Z-Wave Lock Found CapabilityCommandDispatcher handler in zwave_lock
2023-01-19T19:34:24.147364592+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"lockCodes","capability_id":"lockCodes","component_id":"main","state":{"value":"{\"1\":\"John Doe 1\",\"2\":\"John Doe 2\",\"3\":\"John Doe 3\",\"4\":\"John Doe 4\",\"5\":\"John Doe 5\"}"},"visibility":{"displayed":false}}
2023-01-19T19:34:24.159712800+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"scanCodes","capability_id":"lockCodes","component_id":"main","state":{"value":"Scanning"},"visibility":{"displayed":false}}
2023-01-19T19:34:24.173189008+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> sending Z-Wave command: {args={user_identifier=1}, cmd_class="USER_CODE", cmd_id="GET", dst_channels={}, encap="AUTO", payload="\x01", src_channel=0, version=1}
2023-01-19T19:34:24.181217883+00:00 TRACE Z-Wave Lock Z-Wave command(2a0aa044) queued for radio transmission: CC:User Code, CID:0x02
2023-01-19T19:34:24.190739258+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> sending Z-Wave command: {args={}, cmd_class="BATTERY", cmd_id="GET", dst_channels={}, encap="AUTO", payload="", src_channel=0, version=1}
2023-01-19T19:34:24.199667467+00:00 TRACE Z-Wave Lock Z-Wave command(6991177d) queued for radio transmission: CC:Battery, CID:0x02
2023-01-19T19:34:24.203231300+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> sending Z-Wave command: {args={}, cmd_class="DOOR_LOCK", cmd_id="OPERATION_GET", dst_channels={}, encap="AUTO", payload="", src_channel=0, version=1}
2023-01-19T19:34:24.211467467+00:00 TRACE Z-Wave Lock Z-Wave command(f1f2e58a) queued for radio transmission: CC:Door Lock, CID:0x02
2023-01-19T19:34:24.214441383+00:00 DEBUG Z-Wave Lock Lock_BE469 device thread event handled
2023-01-19T19:34:25.561195551+00:00 TRACE Z-Wave Lock Z-Wave command(2a0aa044) transmit status: TRANSMIT_COMPLETE_OK
2023-01-19T19:34:26.065817801+00:00 TRACE Z-Wave Lock Received event with handler unnamed
2023-01-19T19:34:26.070591801+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> received Z-Wave command: {args={user_code="**********", user_id_status="ENABLED_GRANT_ACCESS", user_identifier=1}, cmd_class="USER_CODE", cmd_id="REPORT", dst_channels={}, encap="S0", payload="\x01\x01\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A", src_channel=0, version=1}
2023-01-19T19:34:26.080320926+00:00 TRACE Z-Wave Lock Found ZwaveDispatcher handler in zwave_lock -> Schlage Lock
2023-01-19T19:34:26.083936759+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"lockCodes","capability_id":"lockCodes","component_id":"main","state":{"value":"{\"1\":\"Code 1\",\"2\":\"John Doe 2\",\"3\":\"John Doe 3\",\"4\":\"John Doe 4\",\"5\":\"John Doe 5\"}"},"visibility":{"displayed":false}}
2023-01-19T19:34:26.176965593+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"codeChanged","capability_id":"lockCodes","component_id":"main","state":{"data":{"codeName":"Code 1"},"value":"1 set"},"state_change":true}
2023-01-19T19:34:26.195943259+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> sending Z-Wave command: {args={user_identifier=2}, cmd_class="USER_CODE", cmd_id="GET", dst_channels={}, encap="AUTO", payload="\x02", src_channel=0, version=1}
2023-01-19T19:34:26.206590718+00:00 TRACE Z-Wave Lock Z-Wave command(5ba8b175) queued for radio transmission: CC:User Code, CID:0x02
2023-01-19T19:34:26.212385759+00:00 DEBUG Z-Wave Lock Lock_BE469 device thread event handled
2023-01-19T19:34:26.231476509+00:00 TRACE Z-Wave Lock Z-Wave command(6991177d) transmit status: TRANSMIT_COMPLETE_OK
2023-01-19T19:34:27.651222635+00:00 TRACE Z-Wave Lock Z-Wave command(f1f2e58a) transmit status: TRANSMIT_COMPLETE_OK
2023-01-19T19:34:28.061141969+00:00 TRACE Z-Wave Lock Z-Wave command(5ba8b175) transmit status: TRANSMIT_COMPLETE_OK
2023-01-19T19:34:30.888305178+00:00 TRACE Z-Wave Lock Received event with handler unnamed
2023-01-19T19:34:30.896041345+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> received Z-Wave command: {args={user_code="**********", user_id_status="ENABLED_GRANT_ACCESS", user_identifier=2}, cmd_class="USER_CODE", cmd_id="REPORT", dst_channels={}, encap="S0", payload="\x02\x01\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A", src_channel=0, version=1}
2023-01-19T19:34:30.966062137+00:00 TRACE Z-Wave Lock Found ZwaveDispatcher handler in zwave_lock -> Schlage Lock
2023-01-19T19:34:30.975514678+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"lockCodes","capability_id":"lockCodes","component_id":"main","state":{"value":"{\"1\":\"Code 1\",\"2\":\"Code 2\",\"3\":\"John Doe 3\",\"4\":\"John Doe 4\",\"5\":\"John Doe 5\"}"},"visibility":{"displayed":false}}
2023-01-19T19:34:30.990496095+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"codeChanged","capability_id":"lockCodes","component_id":"main","state":{"data":{"codeName":"Code 2"},"value":"2 set"},"state_change":true}
2023-01-19T19:34:31.003263053+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> sending Z-Wave command: {args={user_identifier=3}, cmd_class="USER_CODE", cmd_id="GET", dst_channels={}, encap="AUTO", payload="\x03", src_channel=0, version=1}
2023-01-19T19:34:31.011888887+00:00 TRACE Z-Wave Lock Z-Wave command(7bf38402) queued for radio transmission: CC:User Code, CID:0x02
2023-01-19T19:34:31.014880053+00:00 DEBUG Z-Wave Lock Lock_BE469 device thread event handled
2023-01-19T19:34:31.036880053+00:00 TRACE Z-Wave Lock Received event with handler unnamed
2023-01-19T19:34:31.043693970+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> received Z-Wave command: {args={door_condition=2, door_lock_mode="DOOR_UNSECURED", inside_door_handles_mode=0, lock_timeout_minutes=254, lock_timeout_seconds=254, outside_door_handles_mode=0}, cmd_class="DOOR_LOCK", cmd_id="OPERATION_REPORT", dst_channels={}, encap="S0", payload="\x00\x00\x02\xFE\xFE", src_channel=0, version=1}
2023-01-19T19:34:31.053336387+00:00 TRACE Z-Wave Lock Found ZwaveDispatcher handler in zwave_lock
2023-01-19T19:34:31.056822928+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"lock","capability_id":"lock","component_id":"main","state":{"value":"unlocked"}}
2023-01-19T19:34:31.067858887+00:00 DEBUG Z-Wave Lock Lock_BE469 device thread event handled
2023-01-19T19:34:31.132040012+00:00 TRACE Z-Wave Lock Received event with handler unnamed
2023-01-19T19:34:31.138226262+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> received Z-Wave command: {args={battery_level=82}, cmd_class="BATTERY", cmd_id="REPORT", dst_channels={}, encap="S0", payload="R", src_channel=0, version=1}
2023-01-19T19:34:31.148172970+00:00 TRACE Z-Wave Lock Found ZwaveDispatcher handler in zwave_lock
2023-01-19T19:34:31.151552720+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"battery","capability_id":"battery","component_id":"main","state":{"value":82}}
2023-01-19T19:34:31.162326178+00:00 DEBUG Z-Wave Lock Lock_BE469 device thread event handled
2023-01-19T19:34:32.472149804+00:00 TRACE Z-Wave Lock Z-Wave command(7bf38402) transmit status: TRANSMIT_COMPLETE_OK
2023-01-19T19:34:32.774733138+00:00 TRACE Z-Wave Lock Received event with handler unnamed
2023-01-19T19:34:32.778871846+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> received Z-Wave command: {args={user_code="**********", user_id_status="ENABLED_GRANT_ACCESS", user_identifier=3}, cmd_class="USER_CODE", cmd_id="REPORT", dst_channels={}, encap="S0", payload="\x03\x01\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A", src_channel=0, version=1}
2023-01-19T19:34:32.788541846+00:00 TRACE Z-Wave Lock Found ZwaveDispatcher handler in zwave_lock -> Schlage Lock
2023-01-19T19:34:32.792138804+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"lockCodes","capability_id":"lockCodes","component_id":"main","state":{"value":"{\"1\":\"Code 1\",\"2\":\"Code 2\",\"3\":\"Code 3\",\"4\":\"John Doe 4\",\"5\":\"John Doe 5\"}"},"visibility":{"displayed":false}}
2023-01-19T19:34:32.859507929+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"codeChanged","capability_id":"lockCodes","component_id":"main","state":{"data":{"codeName":"Code 3"},"value":"3 set"},"state_change":true}
2023-01-19T19:34:32.871686138+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> sending Z-Wave command: {args={user_identifier=4}, cmd_class="USER_CODE", cmd_id="GET", dst_channels={}, encap="AUTO", payload="\x04", src_channel=0, version=1}
2023-01-19T19:34:32.880476179+00:00 TRACE Z-Wave Lock Z-Wave command(0ab42cdd) queued for radio transmission: CC:User Code, CID:0x02
2023-01-19T19:34:32.883439721+00:00 DEBUG Z-Wave Lock Lock_BE469 device thread event handled
2023-01-19T19:34:33.031110429+00:00 TRACE Z-Wave Lock Z-Wave command(0ab42cdd) transmit status: TRANSMIT_COMPLETE_OK
2023-01-19T19:34:37.806997682+00:00 TRACE Z-Wave Lock Received event with handler unnamed
2023-01-19T19:34:37.811385432+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> received Z-Wave command: {args={user_code="**********", user_id_status="ENABLED_GRANT_ACCESS", user_identifier=4}, cmd_class="USER_CODE", cmd_id="REPORT", dst_channels={}, encap="S0", payload="\x04\x01\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A", src_channel=0, version=1}
2023-01-19T19:34:37.819972515+00:00 TRACE Z-Wave Lock Found ZwaveDispatcher handler in zwave_lock -> Schlage Lock
2023-01-19T19:34:37.824270723+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"lockCodes","capability_id":"lockCodes","component_id":"main","state":{"value":"{\"1\":\"Code 1\",\"2\":\"Code 2\",\"3\":\"Code 3\",\"4\":\"Code 4\",\"5\":\"John Doe 5\"}"},"visibility":{"displayed":false}}
2023-01-19T19:34:37.837273307+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"codeChanged","capability_id":"lockCodes","component_id":"main","state":{"data":{"codeName":"Code 4"},"value":"4 set"},"state_change":true}
2023-01-19T19:34:37.851142473+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> sending Z-Wave command: {args={user_identifier=5}, cmd_class="USER_CODE", cmd_id="GET", dst_channels={}, encap="AUTO", payload="\x05", src_channel=0, version=1}
2023-01-19T19:34:37.859228140+00:00 TRACE Z-Wave Lock Z-Wave command(ec06b512) queued for radio transmission: CC:User Code, CID:0x02
2023-01-19T19:34:37.862196765+00:00 DEBUG Z-Wave Lock Lock_BE469 device thread event handled
2023-01-19T19:34:39.251258474+00:00 TRACE Z-Wave Lock Z-Wave command(ec06b512) transmit status: TRANSMIT_COMPLETE_OK
2023-01-19T19:34:39.764731474+00:00 TRACE Z-Wave Lock Received event with handler unnamed
2023-01-19T19:34:39.768937599+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> received Z-Wave command: {args={user_code="**********", user_id_status="ENABLED_GRANT_ACCESS", user_identifier=5}, cmd_class="USER_CODE", cmd_id="REPORT", dst_channels={}, encap="S0", payload="\x05\x01\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A", src_channel=0, version=1}
2023-01-19T19:34:39.777980516+00:00 TRACE Z-Wave Lock Found ZwaveDispatcher handler in zwave_lock -> Schlage Lock
2023-01-19T19:34:39.781659599+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"lockCodes","capability_id":"lockCodes","component_id":"main","state":{"value":"{\"1\":\"Code 1\",\"2\":\"Code 2\",\"3\":\"Code 3\",\"4\":\"Code 4\",\"5\":\"Code 5\"}"},"visibility":{"displayed":false}}
2023-01-19T19:34:39.865984016+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"codeChanged","capability_id":"lockCodes","component_id":"main","state":{"data":{"codeName":"Code 5"},"value":"5 set"},"state_change":true}
2023-01-19T19:34:39.878946474+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> sending Z-Wave command: {args={user_identifier=6}, cmd_class="USER_CODE", cmd_id="GET", dst_channels={}, encap="AUTO", payload="\x06", src_channel=0, version=1}
2023-01-19T19:34:39.887464224+00:00 TRACE Z-Wave Lock Z-Wave command(de1a41d6) queued for radio transmission: CC:User Code, CID:0x02
2023-01-19T19:34:39.890432641+00:00 DEBUG Z-Wave Lock Lock_BE469 device thread event handled
2023-01-19T19:34:41.229998933+00:00 TRACE Z-Wave Lock Z-Wave command(de1a41d6) transmit status: TRANSMIT_COMPLETE_OK
2023-01-19T19:34:41.659786017+00:00 TRACE Z-Wave Lock Received event with handler unnamed
2023-01-19T19:34:41.664273267+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> received Z-Wave command: {args={user_code="", user_id_status="AVAILABLE", user_identifier=6}, cmd_class="USER_CODE", cmd_id="REPORT", dst_channels={}, encap="S0", payload="\x06\x00", src_channel=0, version=1}
2023-01-19T19:34:41.673833142+00:00 TRACE Z-Wave Lock Found ZwaveDispatcher handler in zwave_lock -> Schlage Lock
2023-01-19T19:34:41.677447600+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"codeChanged","capability_id":"lockCodes","component_id":"main","state":{"value":"6 unset"},"state_change":true}
2023-01-19T19:34:41.766215725+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> sending Z-Wave command: {args={user_identifier=7}, cmd_class="USER_CODE", cmd_id="GET", dst_channels={}, encap="AUTO", payload="\x07", src_channel=0, version=1}
2023-01-19T19:34:41.774828975+00:00 TRACE Z-Wave Lock Z-Wave command(20af80d5) queued for radio transmission: CC:User Code, CID:0x02
2023-01-19T19:34:41.777888975+00:00 DEBUG Z-Wave Lock Lock_BE469 device thread event handled
2023-01-19T19:34:43.201213934+00:00 TRACE Z-Wave Lock Z-Wave command(20af80d5) transmit status: TRANSMIT_COMPLETE_OK
2023-01-19T19:34:43.528598851+00:00 TRACE Z-Wave Lock Received event with handler unnamed
2023-01-19T19:34:43.532720934+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> received Z-Wave command: {args={user_code="", user_id_status="AVAILABLE", user_identifier=7}, cmd_class="USER_CODE", cmd_id="REPORT", dst_channels={}, encap="S0", payload="\x07\x00", src_channel=0, version=1}
2023-01-19T19:34:43.571479976+00:00 TRACE Z-Wave Lock Found ZwaveDispatcher handler in zwave_lock -> Schlage Lock
2023-01-19T19:34:43.575178393+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"codeChanged","capability_id":"lockCodes","component_id":"main","state":{"value":"7 unset"},"state_change":true}
2023-01-19T19:34:43.594814809+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> sending Z-Wave command: {args={user_identifier=8}, cmd_class="USER_CODE", cmd_id="GET", dst_channels={}, encap="AUTO", payload="\x08", src_channel=0, version=1}
2023-01-19T19:34:43.604228309+00:00 TRACE Z-Wave Lock Z-Wave command(aa06e422) queued for radio transmission: CC:User Code, CID:0x02
2023-01-19T19:34:43.607338309+00:00 DEBUG Z-Wave Lock Lock_BE469 device thread event handled
2023-01-19T19:34:43.982265101+00:00 TRACE Z-Wave Lock Z-Wave command(aa06e422) transmit status: TRANSMIT_COMPLETE_OK
2023-01-19T19:34:48.555843562+00:00 TRACE Z-Wave Lock Received event with handler unnamed
2023-01-19T19:34:48.560220853+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> received Z-Wave command: {args={user_code="", user_id_status="AVAILABLE", user_identifier=8}, cmd_class="USER_CODE", cmd_id="REPORT", dst_channels={}, encap="S0", payload="\x08\x00", src_channel=0, version=1}
2023-01-19T19:34:48.569872062+00:00 TRACE Z-Wave Lock Found ZwaveDispatcher handler in zwave_lock -> Schlage Lock
2023-01-19T19:34:48.573406395+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"codeChanged","capability_id":"lockCodes","component_id":"main","state":{"value":"8 unset"},"state_change":true}
2023-01-19T19:34:48.584695645+00:00 INFO Z-Wave Lock <ZwaveDevice: { Device ID } [53] (Lock_BE469)> emitting event: {"attribute_id":"scanCodes","capability_id":"lockCodes","component_id":"main","state":{"value":"Complete"},"visibility":{"displayed":false}}
2023-01-19T19:34:48.597588062+00:00 DEBUG Z-Wave Lock Lock_BE469 device thread event handled
I wasn’t sure whether it was appropriate to post this in this thread, or split it off into a new topic. Do with it what you think best.
What driver are you using, the stock driver or [ST EDGE] Z-Wave Lock PH - Devices & Integrations / Community Created Device Types - SmartThings Community from @philh30? His has the option to disable code query on refresh which solved the issue for me. Be sure to also set the code length to your existing length so that the refresh setting doesn’t revert.
Upon further investigation, the codeName-clearing issue is present when executing a refresh, reloadAllCodes, or a requestCode command on the BE469. This anomaly came to light as a result of application testing I am doing on behalf of another developer. Neither of the current Edge drivers I have tried to date have resolved this.
Perhaps with this particular lock, it can’t be resolved, just worked around, but I thought you might want to be aware nonetheless. Thanks.
Is this something that can be addressed by the driver or is it a lower level issue that ST staff need to look into?
There is something much more fundamental at play here with the Z-Wave locks under EDGE.
Putting aside the code-name clearing issue on the BE469 for the moment, now that we have the ability to set the code names via the API, we should be able to use them when evaluating lock events as well, correct? But neither driver is returning the codeName correctly.
To confirm, I first checked via the CLI to ensure that the names were correctly set (in this instance, on the BE469ZP).
lockCodes “{“1”:“John Doe”,“2”:“Jane Doe”,“3”:“Bill Smith”,“4”:“Guest 1”,“5”:“Guest 2”}”
I then unlocked the door using John Doe’s code and checked the event log. Note the codeName (in boldface) that was returned in the data attribute.
2023-01-25T14:25:41.694333783+00:00 INFO Z-Wave Lock <ZwaveDevice: {deviceId} [57] (BE469ZP)> emitting event: {“attribute_id”:“lock”,“capability_id”:“lock”,“component_id”:“main”,“state”:{“data”:{“codeId”:“1”,“codeName”:“Code 1”,“method”:“keypad”},“value”:“unlocked”}}
If this were working correctly, codeName should say “John Doe,” not “Code 1.”
Sorry to keep drumming on these locks, but these are serious issues for lock automation. @andresg we really need a response and some attention given to this.