KeyMaster Z-Wave lock manager and scheduler

KeyMaster also emits events, you can automate off that as well :wink:

Hi There,

I just got around to trying this, I have been recovering from some minor surgery. I have the lock working again within HA (I can manually lock/unlock) but in the Keymaster control panel it will not connect because I think the lock got added as a new entity.

Do I need to unstill Keymaster then go through the setup process once again or what do I need to do to Keymaster to get it working again

Thanks in advance

Richard

Go to Config> Integrations. Click on the keymaster lock name and configure, and you should be able to regenerate package files for the lock there.

Thank you,

That fixed the problem, I had forgotten the keymaster was now an integration. I picked the new lock and chose the other settings then rebooted HA and everything started working

Still unsure what caused this in the first place, this lock has been rock solid for 18 months, maybe I just put some dodgy batteries in it back in Feb and they died after 3 months. The original batteries lasted over 14 months

I finally moved from @ptdalen 's older lock “toolset” to keymaster - one thing I really missed was the Google calendar integration, so I created my own automations for anyone else that makes the move as well. What it does is check every 12 hours (adjust to your needs), and if there’s a start time for that door code, it’ll enable the start/end dates for keymaster for that code, and set the start and end date to the ones in Google calendar. I happen to use keycode 8 for my cleaners that come every other week, so that’s my example. It does check that these is a state_attr of start_time and end_time before running, so if you aren’t using a calendar for a door code, it shouldn’t run.
It also assumes that you’ve set the PIN code in the lovelace interface. This is purely for setting the next start/end date. And of course, always open to improvements - I’m not the best YAML coder…

- alias: 'Set keypad 8 based on Google Calendar'
  id: ba64c7e3-8780-46d3-8431-508493be0298
  trigger:
    - platform: time_pattern
      hours: "/12"     
  condition:
    - condition: and
      conditions:
        - condition: template
          value_template: "{{ state_attr('calendar.lock_code_8_schedule','start_time') != None }}"
        - condition: template
          value_template: "{{ state_attr('calendar.lock_code_8_schedule','end_time') != None }} "
  action:
    - service: homeassistant.turn_on
      entity_id: input_boolean.daterange_frontdoor_8
    - service: input_datetime.set_datetime
      target:
        entity_id: input_datetime.start_date_frontdoor_8
      data:
        timestamp: "{{ as_timestamp(state_attr('calendar.lock_code_8_schedule','start_time')) }}"
    - service: input_datetime.set_datetime
      target:
        entity_id: input_datetime.end_date_frontdoor_8
      data:
        timestamp: " {{ as_timestamp(state_attr('calendar.lock_code_8_schedule','end_time')) }}"

Can’t wait til child locks are fully implemented - willing to help test if necessary - I have two Schlages (BE469 and FE599 - both ZW+)

2 Likes

For those who’ve been waiting on child locks, I have a very rough alpha version ready. If you’re interested, PM me and I’ll send you instructions on how to get started.

Once again, child locks are available for testing. There’s some manual setup that needs to be done however.

Ok, here’s the procedure for setting up child locks.

First upgrade to the latest beta, which is currently version 40. Assume your first lock is called frontdoor, and you want that to be the parent lock. Set it up like you normally would. The only difference is you have to set the parent dropdown to (none).

Now add a new integration and name it backdoor. Set this up using your 2nd zwave lock. Make sure the number of slots matches what you used for frontdoor. In the dropdown, set the parent to frontdoor.

Add the generated Lovelace file to your UI. You should now have a section for frontdoor and backdoor. Anytime you change anything in the frontdoor UI, that will get copied to the backdoor UI. Since the settings will be identical, backdoor will now mirror the behavior of frontdoor.

UI changes are coming, but this should get you started by only having to “program” one lock, and have those settings propagated across one or more child locks.

1 Like

Parent/Child locks have been introduced to the main project. You should update/add your Lovelace for each new lock.

2 Likes

Hi, I just installed and everything seems to be working fine but keep getting this message any ideas ?

  • Error calling script.frontdoor_copy_from_parent_1 service call: Unable to find service script.frontdoor_copy_from_parent_1

Either call the keymaster.generate_package service call OR hit the Configure button on the integration and Submit.

Configure the integration again ???

Yes this is used for editing the configuration, but once you hit submit it will generate the scripts on it’s own and reload them.

Did the configure one more time and still getting this errors

Error setting up entry FrontDoor for keymaster
Error setting up entry BackDoor 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 322, in async_setup_entry
await init_child_locks(
File “/config/custom_components/keymaster/services.py”, line 73, in init_child_locks
await call_service(hass, SCRIPT_DOMAIN, the_service)
File “/config/custom_components/keymaster/services.py”, line 87, in call_service
raise err
File “/config/custom_components/keymaster/services.py”, line 82, in call_service
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_copy_from_parent_1

  • Error calling script.frontdoor_copy_from_parent_1 service call: Unable to find service script.frontdoor_copy_from_parent_1
  • Error calling script.backdoor_copy_from_parent_1 service call: Unable to find service script.backdoor_copy_from_parent_1

Incidentally, there seems to bug if you include a space in the name of the door - e.g. Front Door. Keymaster doesn’t treat the space properly (i.e. it tries to create/interact with something_Front Door_something) Taking the space out of the name and regening the package fixed that.

Hi there is no white space on the names take a look

Screen Shot 2021-06-14 at 12.09.41 PM

Please report this on github for tracking, thanks!

Is your parent lock showing as (none) for both locks?

Any work being done to integrate zigbee locks yet?

Yes parent lock is showing as none in booth locks