I am having issues with Lock Code Manager after using Swap App Device.
I was having a problem with a smart lock and thought I might need to possibly remove and re-add the lock, so I created a new Virtual Lock device and used Swap App Device to replace the problem lock with the Virtual Lock device so I wouldn't have to edit all my apps that reference that lock.
I resolved the problem with the lock and then re-reran Swap App Device to put things back to normal.
Now it appears that Lock Code Manager has the 2 devices confused. If I add a user code to the lock on its device page, Lock Code Manager says that the newly added user code is on the Virtual Lock. The Virtual Lock device page shows no codes. If I manually delete the user code on the lock device page, then Lock Code Manager show errors for the Virtual Lock.
What is the best sequence of actions to resolve this:
remove the Virtual Lock device, then remove and re-install Lock Code Manager, or
Remove Lock Code Manager, remove the Virtual Lock, then re-add Lock Code Manager?
Discovered that a user code added to the Virtual Lock device via Lock Code Manager, but is now showing up in Lock Code Manager as assigned to the physical lock. But the physical lock device page, shows no such user code. I can't get rid of this user code in Lock Code Manager.
You would think but the user code assigned to the Virtual Lock (which has been removed) keeps coming back assigned to the physical lock with which it had been swapped!
Then turn on debug logging and run "Get Codes" from the device page. Check the logs, it should go through and request the code in every slot. I think that will clear out that slot if there is no code in it.
Or also you could just add a code to that slot (from device page) and then delete it again.
I have added a user code to slot 1 manually to the physical lock (Rear door lock) many times and every time, the phantom user code from the deleted Virtual Lock device keeps coming back assigned to the physical lock as shown in the Lock Code Manager below.
Obviously, there is data retained after the Virtual Lock device is deleted and Lock Code Manager keeps accessing that retained data.
No, there isn't. The data would only be in the device or the app, nothing is saved anywhere else, so if both were delete that data is gone and the only place it is getting it is from the remaining lock which has a messed up code slot from the swapping I suppose.
Set a code in slot 2 manually from the device page. Then delete it.
Another option would be to change the type/driver to the "Device", save, delete the current states using the command button, then switch back to your normal driver, save, and run Get Codes.
You will lose the names on the codes but you can set them again from the device page using the setCode command button.
Also make sure LCM is either deleted or does not have any pending jobs at the time of doing this.
Even if you just set a random code to slot 2 and then try to delete it?
I have deleted failed/pending jobs in LCM, removed LCM and rebooted my hub to clear out any other issues. Now awaiting restart, then will check status of lock device codes at that point, try to add and delete user codes, etc. before re-adding LCM.
Having trouble adding more than 1 user code to the lock. Also Get Codes is starting its retrieval of user codes at 20 instead of 1. There must be some corruption in the lock. I am going to do a Factory Reset on the lock and try again.
OK, lock appears to be working again with LCM. Removed LCM . Had to do manual Factory default reset on the lock which wipes all the user codes but also disrupted the z-wave connection. Manually added some user codes via the lock to verify it was operational. Then ran Z-Wave Details - Replacement and manually hit the re-enroll button on the lock to get z-wave working again. Then re-installed LCM.
All default and manually entered codes on the lock show up in Device page and LCM, as follows:
Used LCM to delete these existing user codes and re-added user codes with names. All is well now.