Open daelsc opened 2 years ago
I'm having the same issue. Only happens on one of my child locks and only 3 code slots. I deleted the lock and re-added it and the same thing happens on the same slots for the same lock. I'm trying to look at the logs, but I don't know where the logs are located.
OK I figured out how to "fix" it, or at least manually push the codes to the door. Once done, the slot shows it as "connected" or "deleted". Once I did this fix, I could change the code, disable or enable the code and it works as it should. It's almost like there was a some sort of communication problem with just those code slots and for some reason Keymaster couldn't get the lock to change the code. and when I manually pushed the code to the lock, it fixed the problem.
Here is what I did:
Create a new script with the following code:
alias: Manual Set Lock Codes
sequence:
- service: zwave_js.set_lock_usercode
data:
code_slot: 15 (what ever your slot is)
usercode: 1234 (or whatever your code is)
entity_id: lock.xxxxxx (entity ID of your lock)
mode: single
Save the script
Click "run script"
Sometimes I had to play around with it or maybe it just took a few minutes to work. The first slot worked right away and keymaster changed it to "connected"
The second slot I had to un-enable it, then run the script. At that point, keymaster showed it as "deleted" and when I enabled it, it showed "Adding" then shortly after "Connected"
The third slot took a few times of running the script and enabling / disabling the slot in keymaster.
Maybe it just takes time to cycle through the system when you run the script? I don't know, but as of now, it works as it should.
Oh and finally, it seems obviously, but if you have multiple slots that need to be done, make sure you change them in the script after the previous slot is fixed and save the script before running it.
Hope that all makes sense. Good luck. Any questions, please ask.
@dcf1999 That WORKED! I had a similar experience as you, had to do it a few times but eventually, it got back to a working state. Thank you so much.
I ended up forcing the automations "synchronize ___" and that fixed it for me.
I just acquired a lock from someone that had been doing manual code management on the lock itself. I ran into this same problem. My solution was to disable the offending slot and then use the developer tools / services to do the following:
call keymaster.clear_code with the lock entity_id and the code_slot defined. Once this was done, I could enter my target code and set to enable and it picked up properly from then on.
Keymaster definitely has a bit of an issue when taking over a lock that has been in use in some way outside of Keymaster management.
Keymaster definitely has a bit of an issue when taking over a lock that has been in use in some way outside of Keymaster management.
Which is funny because it's just the zwave commands wrapped up.
I just acquired a lock from someone that had been doing manual code management on the lock itself.
I've noticed this mostly happening on specific brands of lock, Yale and Schlage. Kwikset seems to work flawlessly out of the box. :man_shrugging:
I just acquired a lock from someone that had been doing manual code management on the lock itself.
I've noticed this mostly happening on specific brands of lock, Yale and Schlage. Kwikset seems to work flawlessly out of the box. man_shrugging
The one I acquired was a Kwikset :-/ It's happened to me with two different previously used Kwiksets.
Strange, I've never had any issues with my Kwikset.
@firstof9 I only seem to have the issue with Kwikset locks if they've been used outside of Keymaster. Or in the case of one lock, a different installation of HA & Keymaster that I moved locations of! It's all around codes already being in the lock and Keymaster for some reason doesn't pick them up properly though I've seen it actually get the codes but it seems to get stuck in a weird state of deleting/adding them.
I am having this issue but with Every user code.
If you are still stuck... I have the Schlage BE469ZP (Allegion) and have had this problem and have been trying to fix it using all the tips found with no progress. Finally here is what I did to fix my issue. I had been using the red enroll/un-enroll button in the back with the battery. I changed that method to:
Remove Z-Wave Device:
Add lock again. This time use the code route
From this point I tried the method suggested here of manually clearing the code slots thanks to @tykeal.
I honestly am not so sure that the button in the back with the battery is secure. I think the way I wrote above to add the lock in Z-Wave JS made all the difference.
Hoping someone can help!
I also have the Schalge BE469ZP (Allegion) and have exluded it and removed all keymaster integrations 3 times now and set everything back up using @alsoszaa method of adding the lock back in. The lock connects just fine in home assistant, but I can not get this integration to work.
After installing the the integration in HACS and then adding the integration in HA, I get 11 entities (10 code slots and the network sensor). When I view those 11 entities though, the 10 card slots show as "unavailable" and the network entity shows just a "-" under status.
I'm guessing this is why, if I go through the rest of the set up process, I am unable to clear and reset codes, either in the UI or through the developer tools.
Please be gentle as I am new to HA, but would greatly appreciate any help that can be offered. Other Zwave devices are working just fine, when these sensors are generated through the integration, they are all showing as unavailable.
Thanks in advance!
the network entity shows just a "-"
If you go to dev tools -> settings -> info under system health, what does the keymaster info say?
Example:
Thanks for the response!
Mine is showing exactly what you have in your example.
Once the network status goes 'on' it should attempt to pull your codes from the lock and make the sensors available.
Thanks Chris. I’ve been away for the last couple of hours and just had the chance to check the keymaster entities. They are all showing unavailable still with the exception of the network entity.
From: Chris @.> Sent: Sunday, April 24, 2022 1:46:29 PM To: FutureTense/keymaster @.> Cc: eboline @.>; Comment @.> Subject: Re: [FutureTense/keymaster] ISSUE: Stuck on Deleting or Adding (Issue #270)
Once the network status goes 'on' it should attempt to pull your codes from the lock and make the sensors available.
— Reply to this email directly, view it on GitHubhttps://github.com/FutureTense/keymaster/issues/270#issuecomment-1107896154, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARZAC2533MOSVTUA4T66X7LVGWJILANCNFSM5REGG27Q. You are receiving this because you commented.Message ID: @.***>
Try enabling debugging to see if there's any errors happening.
I’ve enabled debugging (based on info in the wiki I think) but not real sure how to check for errors. Can you provide some information on how to do that?
From: Chris @.> Sent: Sunday, April 24, 2022 6:06:59 PM To: FutureTense/keymaster @.> Cc: eboline @.>; Comment @.> Subject: Re: [FutureTense/keymaster] ISSUE: Stuck on Deleting or Adding (Issue #270)
Try enabling debugginghttps://github.com/FutureTense/keymaster/wiki/Troubleshooting#enable-debugging to see if there's any errors happening.
— Reply to this email directly, view it on GitHubhttps://github.com/FutureTense/keymaster/issues/270#issuecomment-1107935674, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARZAC22NZEONVRAUG3MCNF3VGXHZHANCNFSM5REGG27Q. You are receiving this because you commented.Message ID: @.***>
So I went to Dev Tools -> Services and selected the "logger.set_level" service and put "custom_components.keymaster: debug" and pressed "Call Service." The box turned green and I got no error messages on the screen. I then went to Configuration -> Settings -> Logs tab. I don't see anything related to keymaster, but maybe I'm not reading it correctly. Here's what comes up:
View your home-assistant.log
file in the /config
directory.
I'm having the same issue, I tried the dev tools clear code and I'm getting this in my logs;
2022-04-25 23:00:45 DEBUG (MainThread) [custom_components.keymaster] Clear Code service: <ServiceCall keymaster.clear_code (c:2cf6a44af212f2d59815c2859bdbafd4): code_slot=1, entity_id=lock.west>
2022-04-25 23:00:45 DEBUG (MainThread) [custom_components.keymaster.services] Attempting to call clear_usercode...
2022-04-25 23:00:45 ERROR (MainThread) [custom_components.keymaster.services] Error calling zwave_js.clear_lock_usercode service call: userIdStatus for code slot 1 not found
2022-04-25 23:00:45 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: userIdStatus for code slot 1 not found
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 379, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 582, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1634, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1671, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/config/custom_components/keymaster/__init__.py", line 245, in _clear_code
await clear_code(hass, entity_id, code_slot)
File "/config/custom_components/keymaster/services.py", line 192, in clear_code
await call_service(
File "/config/custom_components/keymaster/services.py", line 94, in call_service
raise err
File "/config/custom_components/keymaster/services.py", line 89, in call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1634, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1671, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 692, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 677, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 955, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 714, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/zwave_js/lock.py", line 134, in async_clear_lock_usercode
await clear_usercode(self.info.node, code_slot)
File "/usr/local/lib/python3.9/site-packages/zwave_js_server/util/lock.py", line 122, in clear_usercode
value = get_code_slot_value(node, code_slot, LOCK_USERCODE_STATUS_PROPERTY)
File "/usr/local/lib/python3.9/site-packages/zwave_js_server/util/lock.py", line 32, in get_code_slot_value
raise NotFoundError(f"{property_name} for code slot {code_slot} not found")
zwave_js_server.exceptions.NotFoundError: userIdStatus for code slot 1 not found
2022-04-25 23:00:45 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [281473088680672] Error handling message: Unknown error (unknown_error)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 630, in handle_execute_script
await script_obj.async_run(msg.get("variables"), context=context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1275, in async_run
await asyncio.shield(run.async_run())
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 359, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 379, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 582, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1634, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1671, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/config/custom_components/keymaster/__init__.py", line 245, in _clear_code
await clear_code(hass, entity_id, code_slot)
File "/config/custom_components/keymaster/services.py", line 192, in clear_code
await call_service(
File "/config/custom_components/keymaster/services.py", line 94, in call_service
raise err
File "/config/custom_components/keymaster/services.py", line 89, in call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1634, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1671, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 692, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 677, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 955, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 714, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/zwave_js/lock.py", line 134, in async_clear_lock_usercode
await clear_usercode(self.info.node, code_slot)
File "/usr/local/lib/python3.9/site-packages/zwave_js_server/util/lock.py", line 122, in clear_usercode
value = get_code_slot_value(node, code_slot, LOCK_USERCODE_STATUS_PROPERTY)
File "/usr/local/lib/python3.9/site-packages/zwave_js_server/util/lock.py", line 32, in get_code_slot_value
raise NotFoundError(f"{property_name} for code slot {code_slot} not found")
zwave_js_server.exceptions.NotFoundError: userIdStatus for code slot 1 not found
This means your lock didn't complete the interview.
Thanks, weird as the lock was working for months, I added another lock and it seems to be having issues. I'll try re-interviewing. Thanks.
I’ve tried reinterviewing the lock multiple different times and still no luck. Still showing the code slots as unavailable.
From: tommywatson @.> Sent: Tuesday, April 26, 2022 5:33:54 AM To: FutureTense/keymaster @.> Cc: eboline @.>; Comment @.> Subject: Re: [FutureTense/keymaster] ISSUE: Stuck on Deleting or Adding (Issue #270)
Thanks, weird as the lock was working for months, I added another lock and it seems to be having issues. I'll try re-interviewing. Thanks.
— Reply to this email directly, view it on GitHubhttps://github.com/FutureTense/keymaster/issues/270#issuecomment-1109740278, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARZAC22SUD262K4BKW72YFTVG7PDFANCNFSM5REGG27Q. You are receiving this because you commented.Message ID: @.***>
Still showing the code slots as unavailable.
Need those logs to help you find out why.
Good morning, sorry the delay. I've been out of town on work. Are these the logs you are hoping to see:
These contain no debug logs from keymaster.
I double checked my configuration.yaml file to ensure that logging was enable using the instructions above. Then I called the service through Dev Tools -> Services from the instruction and got a green check mark. This is what was added to the log when I called the service:
Try making your configuration yaml similar to this:
logger:
default: error
logs:
custom_components.keymaster: debug
and restart Home Assistant, this will give a better run down of what's going on.
I really appreciate your help with this Chris!
I updated the configuration.yaml file as you showed above and restarted HA. Here's what is in the log now:
2022-04-29 09:04:32 DEBUG (MainThread) [custom_components.keymaster.binary_sensor] Connected to zwave_js network
2022-04-29 09:04:32 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.000 seconds (success: True)
Looks like no code slots are being checked. They would have shown up between these two lines. Can you check in zwavejs2mqtt that the code slots are infact showing up for the lock?
Excuse my "newbie" status to HA. I'm using zwavejs. Do I also need to install zwavejs2mqtt for this integration work? Did I miss that in my install?
zwavejs2mqtt is the community made addon for zwavejs, you run one or the other not both.
zwavejs2mqtt has a seperate UI to help facilitate troubleshooting, there are steps on flipping to the other addon here.
I'll work on converting that over this after work and let you know what happens. Again, truly appreciate your help!
I got mine working by removing all the locks, uninstalling keymaster, reboot, pairing the locks again in legacy secure mode, reinstalling keymaster and adding the locks back. I then made sure all the codes for each lock matched and was able to remove/re-add codes. I looked through the logs and couldn't find any keymaster errors before doing the above.
edit: FYI these are all BE469ZP locks
I’ve done that 3 times so far with no luck. Are you using the zwavejs2mqtt integration or just the zwave js integration? Also, what do you mean by "in legacy secure mode?" I believe I have been doing that, but am I'm not adding them back in correctly.
Also, when reinstalling I have been adding the lock to zwave js before installing keymaster. Maybe I should do this the other way around?
From: tommywatson @.> Sent: Friday, April 29, 2022 2:57:10 PM To: FutureTense/keymaster @.> Cc: eboline @.>; Comment @.> Subject: Re: [FutureTense/keymaster] ISSUE: Stuck on Deleting or Adding (Issue #270)
I got mine working by removing all the locks, uninstalling keymaster, reboot, pairing the locks again in legacy secure mode, reinstalling keymaster and adding the locks back. I then made sure all the codes for each lock matched and was able to remove/re-add codes. I looked through the logs and couldn't find any keymaster errors before doing the above.
— Reply to this email directly, view it on GitHubhttps://github.com/FutureTense/keymaster/issues/270#issuecomment-1113671684, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARZAC25JEOBI4KI7JFKIEXDVHQ5JNANCNFSM5REGG27Q. You are receiving this because you commented.Message ID: @.***>
js only. When adding a device there is a link you click to get more options. I added the device then installed keymaster, I don't think the order matters, the zwave linking does, also it looks like keymaster will not update the lock if the codes mismatch, you must setup the lock with the existing codes in keymaster, then you can change them, or it appears that way for me...
I'm curious about your statement of adding the existing codes in.
I have reset the lock during this process so the only codes currently in the lock are the 2 it comes with. Are you saying I need to add those into code slot 1 and 2 in keymaster or should they be found?
@tommywatson - Thanks for the help. I removed everything and reinstalled with the suggestions you listed above. Same issue.
@firstof9 - The log looks a little different now though to me, but appears to still not be checking the code slots. That said, I do see an entity for each code slot under keymaster integration, but they all say unavailable. Here's the log after a restart:
It should be saying stuff like "Code slot 1: xxxx" where the xxxx would be your code.
Would you recommend switching to zwavejs2mqtt to see if that helps? I'm not sure I understand why that would make a difference, but it's definitely not working right now.
It would definitely help troubleshoot easier due to the builtin UI
Are you saying I need to add those into code slot 1 and 2 in keymaster or should they be found? Yeah, you need to put the two codes into the slots for keymaster, at least that's what seems to be going on in my installation, also if you're planning on using more than 4 digits, you have to change it in the lock, that can be a source of frustration.
I tried that. And once enabled, the status stayed as adding. Something else is getting mixed up because all of the entities for the key slots that are generated with the keymaster integration are showing as unavailable.
I'm going to try to switch over to zwavejs2mqtt as @firstof9 suggested and see if there is better troubleshooting information in via that route.
I'm curious, does the device info show up correctly when you look at it through config->devices? And do you see the sensors?
If I go to config->devices I see a device called "keymaster." I do not see any sensors listed under the devices. If I go to config->entities I see a bunch of entities with the name: front_door_lock: Code Slot X. All of those have a red filled in circle with an exclamation point in them. When I hover over that icon it says "Unavailable".
EDIT: I also see bunch related to "keymaster" that have a icon that looks like a circle made out of an arrow and an exclamation point in the middle. When I hover over that it says "Restored"
I wonder if this isn't your problem, your device wasn't interviewed correctly? If I go to Configuration->Devices then select Devices from the top line and search for one of my locks, I see the correct model and the sensors listed, if it doesn't show up correctly Keymaster wont work...
@tommywatson I have reinterviewed the device a few times, but I'm definitely seeing some different sensors.
It looks like you have interviewed it in the highest security mode, I could never get that to work, if you check my screenshot above my device is in legacy mode. I'd suggest you remove the device from zwave, then adding it again using legacy mode.
https://github.com/FutureTense/keymaster/issues/270#issuecomment-1113745515
@firstof9 - I switched everything over to zwavejs2mqtt last night and this morning. I reinstalled keymaster integration and I'm not seeing anything keymaster related in zwavejs2mqtt. That being said, I could be looking in the wrong spot. What should be seeing here?
Also, after reinstalling keymaster, I looked at the code slot entities that are created and they are all showing as unavailable still.
Describe the bug When adding / removing Code3 from the Home Assistant dashboard the PIN Status is stuck on Deleting or Adding. All of the other code #'s work fine, can add and delete without issue.
Environment (please complete the following information):
HassOS Unraid VM Home Assistant 2022.3.5 zwave_js Yale YRD-256
Logs Paste your error logs here.
Screenshots
Additional context
Otherwise works great!