-
-
Notifications
You must be signed in to change notification settings - Fork 915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow clearing of user codes when user passes [0,0,0,0] #1059
Conversation
Note, this is raw zero data, not the ascii characters '0000' or [0x30, 0x30, 0x30, 0x30] for setting the door code of '0000'. |
Hrm. Let me think about this. using '0000' implies that the user is knowledgeable about Z-Wave. Id like something intuitive like a button etc. |
The primary reason I picked the '\0\0\0\0' was because I'm coming through the python API Value object so my only real options are setting the value or something through the node object but that doesn't seem right. Can you assign a zero length string to a value? That might be more understandable for the average user. |
Based on this posting: http://forum.z-wavepublic.com/t/3-51-user-code-command-class-version-1/80 we now know that the RFID'd devices were breaking the specs. The usercode should be a ASCII string. So I'm inclined to make the following changes:
The only constraint, we only have 256 indexes to work with on ValueID's. I think its time to expand that to 65536 :) |
I agree with your proposition @Fishwaldo |
This issue is now going on a year standing, is it possible there will be any movement on this change in the foreseeable future? |
@Fishwaldo Any progress on incorporating this? The PR works as described and seems to be an important update for people that want to clear codes. Could we merge this as is and create a separate issue for adding ValueInt and ValueString? |
Looking further around the threads it seems that 0000 only clears on certain devices and on others it is a working code when set. That said I don't think this should necessarily be incorporated as it has unintended consequences for those who have a device that doesn't clear upon setting 0000. |
I was the original poster. That patch was really a kludge to work within the current API. It probably makes more sense to add a ClearValue or such to the API but I don't know enough about the official zwave command classes to know if that is correct or not. Unfortunately, it seems like lock manufacturers are doing different things for clearing so it may end up being some piece that needs custom handling based on the lock type. |
I'm Closing this as I'm refactoring the UserCode CC right now. See #997 |
I think most zwave locks allow removing/clearing codes from their memory. According to the zwave spec file "SDS12652-13 - Z-Wave Command Class Specification N-Z.pdf" on page 333, you can set the status to Available and pass 4 bytes of 0 data.
I've tested this with my old Schlage BE369 deadbolt and it appears to work as intended.