Repository navigation
Conversation
…pending set
Schlage locks confirm a UserCode Set with an occupied report whose code is
masked ("**********") or blank. On migrated locks the Schlage sub-driver
classified that report as manufacturer-specific and dropped it, so
addCredential and updateCredential never emitted a commandResult, the
credential was never recorded, and the next addCredential reused the same
slot and overwrote the PIN.
While an add or update is waiting on a slot, an occupied report for that
slot now goes to the generic handler, as a report with the code in clear
already does. Other masked reports are still consumed as before.
Fixes SmartThingsCommunity#3365
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
5 of 12 tasks
Contributor
Author
|
Superseded by #3373. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Check all that apply
Type of Change
Checklist
Description of Change
Fixes #3365.
Schlage locks confirm a
UserCode:Setwith an occupied UserCode Report whose code is masked (**********) or blank. On migrated locks,schlage-lock/init.luaclassified that report as manufacturer-specific (is_user_code_report_mfr_specific) and dropped it. As a result,addCredentialandupdateCredentialnever emitted acommandResult, the credential was never recorded, and becausetables.next_indexkept returning the same slot, the nextaddCredentialoverwrote the PIN.While an add or update is waiting on a slot, an occupied report for that slot now goes to the generic
user_code_reporthandler, which already handles a report with the code in clear. Every other masked report is still consumed as before, including the index 0 master-code case.This is the success-side counterpart of #3318 (masked reports during code sync) and #3364 (refused PINs). It touches the same function as #3364, so whichever merges second needs a small rebase.
Summary of Completed Tests
New tests in
test_schlage_lock.lua:addCredential: a masked occupied report for the new slot confirms the add, and the next add goes to slot 2.addCredential: a masked occupied report for another slot does not confirm the add.updateCredential: a masked occupied report for the slot confirms the update.Without the change, the first and third fail. With it,
test_schlage_lock.luaandtest_schlage_lock_legacy.luapass (12/12). The fullzwave-lockrun locally has the same 17 failures as unmodifiedmain(test_lock_programming_code,test_lock_code_slga_migration,test_zwave_responses), which I believe come from running against the latest publiclua_libs(API v21) rather than this change.Device testing plan: we'll install this build on a migrated Schlage BE469 in our lab and confirm
addCredentialreports success and a second add lands in a new slot.🤖 Generated with Claude Code