KeyMaster Z-Wave lock manager and scheduler

Have you interviewed the locks with the zwavejs integration? Try excluding them and make sure you delete any stray entities that are hanging on. Then include your locks again, and retry setting up KeyMaster.

Try re-interviewing the lock.

Iā€™m seeing the same thing as @mstroud. I added my homeassistant.log to the issue on github, but this is what Iā€™m seeing:

2021-07-11 13:32:50 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration keymaster which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-07-11 13:32:50 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-07-11 13:32:54 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry frontdoor for keymaster
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/keymaster/__init__.py", line 266, in async_setup_entry
    await async_reset_code_slot_if_pin_unknown(
  File "/config/custom_components/keymaster/helpers.py", line 420, in async_reset_code_slot_if_pin_unknown
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1438, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Unable to find service script.frontdoor_reset_codeslot

I see that script in the scripts node, but canā€™t actually see it anywhere under the config folder.

I am seeing something similar. I am running 2021.6.3, and trying to make keymaster work with a Yale YRM476 Zwave lock. Connectivity to this lock is great.

Hereā€™s the error message from my log:

Logger: homeassistant.config_entries
Source: core.py:1438
First occurred: 9:35:02 AM (3 occurrences)
Last logged: 9:24:00 PM

Error setting up entry Side Door for keymaster
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/keymaster/__init__.py", line 266, in async_setup_entry
    await async_reset_code_slot_if_pin_unknown(
  File "/config/custom_components/keymaster/helpers.py", line 420, in async_reset_code_slot_if_pin_unknown
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1438, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Unable to find service script.side_door_reset_codeslot

Any ideas as to whatā€™s wrong?

Try deleting the integration and re-add it, but rename your door to sidedoor and see if that works. The problem be the space and/or capital letters.

1 Like

That worked! Seems to have created devices now and looks like itā€™s functional. Did I miss something in the documentation on naming the lock?

Should I file a bug on the space issue? Given there is no such requirement on the lock name in ZwaveJS, it would seem like keymaster should be OK with spaces.

Thanks again!

Mine worked too, in that I no longer see errors, so thanks for that!

HACS is barking at me though, thinking that 0.54 is older than 0.53, but Iā€™m just going to ignore it. Iā€™m new to HA in general though, so Iā€™m having trouble figuring out which sensors I should be pointing KeyMaster at and why I donā€™t see the codes and whatnot, but Iā€™ll play around a bit more. If anyone can point me in the right direction, thatā€™d be great, but no worries if not. I have (according to Z-Wave JS) BE469 by Allegion, Firmware: 128.22.

So I didnā€™t see the Code 1 etcā€¦ cards, and looked at the documentation which said I needed to install a Zwave package to allow automation. I did that, restarted HA, and now get errors again:

Logger: homeassistant.config_entries
Source: core.py:1438
First occurred: 10:42:27 AM (4 occurrences)
Last logged: 10:50:09 AM

Error setting up entry SideDoor for keymaster
Error setting up entry Sidedoor for keymaster
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/keymaster/__init__.py", line 266, in async_setup_entry
    await async_reset_code_slot_if_pin_unknown(
  File "/config/custom_components/keymaster/helpers.py", line 420, in async_reset_code_slot_if_pin_unknown
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1438, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Unable to find service script.sidedoor_reset_codeslot

No spaces in the lock name, but not sure what the problem is. Should I not add the package file as the documentation says?

@fresnoboy - I saw an update in HACS for v0.54, did you upgrade to that? I had to change the dropdown and manually choose it. I actually removed v0.53 and installed v0.54 clean and redid the keymaster integration.

That fixed it - itā€™s actually up to .55 now. Thanks for all the help!

Yeah, some publishing error happened so I made a new one to force it.

1 Like

So when I install this integration, I get a huge number of new entities with generic names like days of the week and ā€œunlock eventsā€ and such, but donā€™t get a card that has Code Slot 2, etcā€¦ with the ability to set the code, etcā€¦

What am I doing wrong?

You have to copy the yaml code from the package that is created.

go to

config->packages->keymaster->frontdoor->frontdoor_lovelace

where frontdoor is your lock name.

Here is where you paste it straight from the wiki.

Open Home Assistant and open the LoveLace editor by clicking the elipses on the top right of the screen, and then select ā€œConfigure UIā€. Click the elipses again and click ā€œRaw config editorā€. Scroll down to the bottom of the screen and then paste your clipboard. This will paste a new View for your lock. Click the Save button then click the X to exit.

Ok, this did seem to show up automatically in the main lovelace dashboard. What I missed was the little keypad at the top. It has all the useful data right there. Sorry for missing it! It all works now.

I ahve this working, but ran into a situation where one of the locks wouldnā€™t update a Code Slot. It just said adding, but never connected. So I deleted the integration for that lock, and tried to recreate it. I get this error:

Logger: homeassistant
Source: custom_components/keymaster/services.py:223
Integration: keymaster (documentation, issues)
First occurred: 3:48:20 PM (1 occurrences)
Last logged: 3:48:20 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/keymaster/__init__.py", line 451, in update_listener
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1491, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await self._hass.async_add_executor_job(handler.job.target, service_call)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/keymaster/__init__.py", line 257, in _generate_package
    generate_package_files(hass, name)
  File "/config/custom_components/keymaster/services.py", line 223, in generate_package_files
    raise ValueError(f"Couldn't find existing lock entry for {name}")
ValueError: Couldn't find existing lock entry for sidedoor

The other locks work fine, and the sidedoor lock is pingable and controllable - I can lock and unlock the lock just fine from the dashboard. There is no sidedoor file being created in the packages directory.

Any ideas as to whatā€™s wrong?

thx!

Post a pic of the integration settings for that lock.

Sure. Here you go.

Thx!
mike

Try restarting HA then try setting it up again.

Wow, that worked! Why would a delete and restart be needed?

Also, I am having issues with code slot 2. It goes to the adding state, but on the zwavejsmqtt debug window, I donā€™t see any commands flowing to the lock. The other slots work ok though! It did have a code before I set up keymaster, but it had worked a couple days agoā€¦

Thanks @jwelvaert for answering. Unfortunately, that did not fix my issue. I tried to re-interview all of my locks but all it did was change the PIN status connecting to adding.

I upgraded KeyMaster to the newest version 0.55. Then I deleted all KeyMaster lock integrations, rebooted HA and reinstalled the KeyMaster integrations for each lock. Still no change.

I then removed one of my locks from my z-wave network and then re-added it. The lock did work correctly except for slot 1. Slot 1 still showed adding/deleting. All of the other slots showed connected. I added another test user to slot 5 the lock and it worked perfectly. It added the user and showed connected. I did not test the user code on the lock.

At some point with in a couple of hours, the lock went back to adding/deleting. I have tried deleting the KeyMaster integration for the lock and then re-adding it but it is still the same.

When I look at Developers Tools > Entities, all of the slots are unavailable. Every other entity for the lock is ok.

When I click the Call Service button for debug, the log only shows KeyMaster has been called.

2021-07-16 10:53:31 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.000 seconds
2021-07-16 10:53:36 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.000 seconds
2021-07-16 10:53:41 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.000 seconds

I am not sure what to do next.