KeyMaster Z-Wave lock manager and scheduler

A second related question I have is, does anyone know if there will be support for zigbee locks at some point in the future and can anyone possibly point me to a current working solution if keymaster is not one at the moment?

The first post is outdated. You should be following the wiki related to any setup :wink:

As for the allow_automation_execution that’s not needed anymore

I know that there has been some work to get zigbee working. I saw a bunch of back and forth on code related to it at some point. I don’t know if it’s actually been merged in though.

And found it. Looks like last movement on zigbee support was back in February.

Ahh, I thought so. I just got to reading and got all messed up.

I follow you on the wiki.

Thank you for your response Andrew.

I see this now. I use zwave but had a few zigbee modules lying around for the Yale Assure locks and was just curious.

Btw, everything you helped me with there a while back is working flawlessly. Thank you so much again!!

Zigbee support would likely be limited to ZHA setups, zigbee2mqtt support may be far easier depending on how the topics look.

Is there any way to get the notifications over to Node Red or something so there can be more customization and control?

For example, I don’t want notifications of my kid unlocking the door when I’m at work and my wife is at home.

I want a way to apply some logic to the notifications so I can customize what they look like, when I get them, what they sound like, etc. I don’t really want to install another app (Pushover) as the Home Assistant companion app notifications work just fine right now.

Keymaster emits the keymaster_lock_state_changed event whenever the lock changes state. If it was caused by a code managed by Keymaster the event data will include the slot name that caused the state change. Node Red should be able to capture the event and allow you to process with it.

There is discussion further up in this thread about using this including some example HA Automations themselves which just log to the logbook.

1 Like

I had manually entered user codes (via the lock keypad) previously and was unable to clear these slots in Keymaster. Manually calling the keymaster.clear_code service under Developer Tools is what finally worked for me.

1 Like

So I am not sure where to post this but since I have been using this thread a ton getting my yale lock notifications working, using the various mentions of notify with messages, and logging service I figured maybe this is the right place.
Im am pretty much a copy/paste kinda guy, but will look over and try to understand how the code works, but Im not sure how I can create an entity that uses just the code slot name of the person who unlocked the door last. I think its possible since the log is now showing me the name who unlocked the door. On my dashboard I have a simple card showing the door status, lock status, and wanted to add the last person to open it.

edit…
I looked up and saw that this would be a part of it I think.
{{ trigger.event.data.code_slot_name }}
I just have no clue how to create a template to create the entity.

Thanks to all!

If you want something that’s going to track the last unlock you’re going to need a new text helper here: Open your Home Assistant instance and show your helper entities.. Then during your automation related to the door unlock event you’ll want to capture the name and set the helper to that name.

Thanks for the feedback. Im sorry but Im not sure how the code would look.I have the helper setup as a text input yale_user and I have the notify script working and tried adding the following to it. I think its close?

service: input_text.set_value
data:
  value: "{{ trigger.event.data.code_slot_name }}"
target:
  entity_id: input_text.yale_user

Thanks again!

Are you using the built in notify or are you triggering off of the event that keymaster raises? In any case, you’re not currently doing any testing for if there is a code slot that was actually the trigger with this. Manual lock / unlock events are not going to have a code_slot_name at all.

Sorry about that. I am using the built in manual_notify script. So maybe add it to the automation lock_notifcation instead?

Hmm… I haven’t checked, but I don’t think that the trigger data for the manual_notify is going to contain what you’re expecting. I may be wrong on that.

Check this post earlier in the thread about setting up an automation to capture the keymaster_lock_state_changed event and do interesting things with the data. In the linked post you’ll find a script that is logging the event to the event log as well as disarming a security system as long as it is a named slot.

You would basically add your data save off into the section dealing with the alarm disarming instead.

I will give that a shot.
Thanks

After looking through the post you referred to Im a bit lost and admittingly out of my league with understanding what to do. The action section with the alarm info to change to mine was confusing for me. Any more info or examples you can help mw through with?
Thank You much!

Here’s a working version with the alarm management bits changed to modifying an input_text.yale_user helper. I’ve also added another datetime helper of type datetime called last_user that stores the last time a named slot unlocked the door.

Please note that this a generic automation. So if you have more than one lock they are all going to share the same input helpers.

alias: 0 - Lock Logging
description: ""
trigger:
  - platform: event
    event_type: keymaster_lock_state_changed
    event_data:
      state: unlocked
    variables:
      sn: |-
        {%- if trigger.event.data.code_slot_name == "" -%}
          Manual
        {%- else -%}
          {{ trigger.event.data.code_slot_name }}
        {%- endif -%}
      verb: |-
        {%- if trigger.event.data.code_slot_name == "" -%}
          unlock of
        {%- else -%}
          unlocked
        {%- endif -%}
condition: []
action:
  - service: logbook.log
    data:
      name: "{{ trigger.event.data.lockname }}"
      entity_id: "{{ trigger.event.data.entity_id }}"
      message: "{{ sn }} {{ verb }} the {{ trigger.event.data.lockname }}"
  - choose:
      - conditions:
          - "{{ sn != 'Manual' }}"
        sequence:
          - service: input_text.set_value
            data:
              value: "{{ sn }}"
            target:
              entity_id: input_text.yale_user
          - service: input_datetime.set_datetime
            data:
              datetime: "{{ now() }}"
            target:
              entity_id: input_datetime.last_user
mode: single
1 Like

Having setup issues with Keymaster. Who should I contact for help? I have two entities not available. I’m using zwavejs 9.6.2, server 1.21.0 and HA 2022.8.6. the two sensors are: sensor.connected.lockname_1 and binary_sensor_active_lockname_1. they are missing for each code.

You my friend are a great helper to this community! Its working like I wanted.
Thank you very much!