core: Schlage Locks Clear User Code still not working
Home Assistant release with the issue: 90.2 and all previous versions that I am aware of
Last working Home Assistant release (if known): N/A
Operating environment (Hass.io/Docker/Windows/etc.): Python VENV on ubuntu 18.10 but I believe this is on all versions
Component/platform: Schlage locks and clear usercode
Description of problem: Basically many locks clear user codes by sending 0000 as a code. On the Schalge BE469 and FE599, this actually sets a valid code of 0000. This is well commented and has been ongoing for quite a while. It is an issue with usercode.cpp in the OWZ library. I’m not a developer, but I have been able to fix this by using this code
https://github.com/OpenZWave/open-zwave/pull/1576/
I dont know why this was never added to the official dev branch, but if someone could review the code and either merge, or determine what the issue is and maybe make the correct changes that would be great. As it is now, everyone using schlage locks have to use workarounds, either setting random codes as a “clear” or forking the HA openzwave, and adding the code from 1576. I have used the 1576 PR and it worked well for me, and I did not see any reprecussions, but maybe it had issues with other brands, not sure??
I believe that Schlage is one of the biggest user bases for HA but I see many comments in the forums about people not willing to move their locks over until they properly clear user codes, which is fair.
Problem-relevant configuration.yaml
entries and (fill out even if it seems unimportant):
N/A
Traceback (if applicable):
Additional information:
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 33 (8 by maintainers)
The hole zwave stack going to replace soon anyway, the current zwave is ugly
Agreed, I felt like there was a difference of opinion on how best to handle this. I have only tested the 1576 because it seemed to be more appropriate for my lock. the comments on #997, let me to believe that maybe it was not fully working. But you’re right https://github.com/OpenZWave/open-zwave/issues/997 was included in the dev branch, and https://github.com/OpenZWave/open-zwave/issues/1576 was not. If we could cherry pick https://github.com/OpenZWave/open-zwave/issues/997I believe that would solve a lot of peoples issues with locks. I was looked back through some of the previous comments and it seems as if yale locks may also be having issues with clearing codes too.
Actually looking at the current dev branch, there was a very minor update in dec. Not related to clearing codes, but fixes issues with building on windows machines. https://github.com/OpenZWave/open-zwave/commit/12a30b9f87e8b3cabec45db313c0db689453bb49
So I guess is we’re lucky enough to get this added to the HA fork, that we’d probably want that commit which includes the fix implmented in https://github.com/OpenZWave/open-zwave/issues/997 as well.
Edited to fix formatting. Also to add a comment that this could be considered a security risk for users who believe they are clearing out user codes on thier doors not knowing that either the old code is still valid or they now have a code of ‘0000’ in their door. This happened to me and I was aware of the issue. It happened when I started using the HA fork, and forgot to update my fork with this update.
I’ve done the same and it works for me as well, just wanted to get this in the official HA fork of OZW to save the trouble.
I have a Kwikset zwave lock and Clear User Codes wasn’t working for me either.
I forked home-assistant/python-openzwave and applied OpenZWave/open-zwave#1576, which fixed it for me. Here’s how to install my fork (on hassbian, change into your venv however it’s appropriate to you):