KeyMaster Z-Wave lock manager and scheduler

It was wrong for sure. I updated the entity ID and then restarted but am still getting the same error above.


Is there documentation on the auto lock feature? I went to the wiki but didn’t find much other than how to install things, not how they work.

What is the Day auto lock and Night auto lock value ? Is it the start and end time? Timer length during night and day? What is the definition of night and day for key master?

In general I like my locks to AUTO lock between 11:30pm and 7:00am and NOT during the day. And at night I like them to fairly quickly lock if they have been unlocked.

You might consider deleting the script you’ve created and create a new one with the correct name. Do that without adding any extra logic first. Test that it works, and then add your logic.

Day auto lock is the timer before the door is automatically locked during daytime (defined as from sunrise to sunset)

Night auto lock is the same for night time (sunset to sunrise).

If you’re looking to manage during what hours things are done and more fine grained timing, then I would suggest that you configure a custom automation.

I would trigger off of the following conditions:

The lock being unlocked as well as the door sensor going to open.

In the action section of the automation put logic in there to determine what time of day it is. If it is inside your times to no autolock, then your automation is done, if it is outside, then check that the lock has been unlocked for X amount of time and the door is closed if it has, then lock it.

Thanks for the clarification, almost wish I could take this integration and strip everything out other than the key code management, the clutter of automations and sensors it creates is significant.

I will just go back to a simple automation trigger unlocked for X with a condition of time of day… It has worked reliably for years on my previous config.

1 Like

Hi – continuing a discussion from the Keymaster repo.

For some users (codes) I’d like to conditionally unlock a second lock based on the first lock. To achieve that, I’ve been got working the following pattern pairing a naming convention (“BOTH-DOORS” in the code slot name) with the following automation:

trigger:
  - platform: event
    event_type: keymaster_lock_state_changed
    event_data:
      lockname: gate
      action_text: Keypad unlock operation
condition:
  - condition: template
    value_template: "{{ \"BOTH-DOORS\" in trigger.event.data.code_slot_name }}"
action:
  - service: lock.unlock
    data: {}
    target:
      device_id: d6dc8d424851db218bfe4fe64f910165

This works but

a) I’d prefer to match off structured data rather than use a naming convention. For instance, maybe we could add “slot group” to the slot config and then expose that w/in the trigger event? Or maybe there’s some alternative I’m not aware of?

and b) I’d ideally be able to mirror configuration between the locks for some slots but not all so that some users only have codes for the first door, but special users have codes for both (and the automation). I’m guessing this would be possible as a (substantial) generalization of the current parent-child relationship (i.e. having parent-child slots rather than just parent-child locks) but probably more complexity than is worth biting off if it’s just for me. Is there a way I could achieve something similar for just my use case?

Thanks!

Months ago, I got a message saying this uses the test.start timer.start duration parameter that is being deprecated.

The issue was reported, and I have not seen an update to this since January, so I have been waiting for one.

Yesterday I made the 2 minute changed to fix this on my instance.
Is this project no longer being worked on?

Rob

I know for a fact that this integration is actively maintained. But this test.start parameter that you’re mentioning isn’t in the source code that I can find. What version are you on?

Shoot I mistyped trying to post before having to take my daughter to school.

I meant timer.start as in lines begining with 110 of keymaster_common.yaml. There are r instances in that file and 2 instances in /keymaster_common_chiild.yaml

The issue at ISSUE: The timer start service duration parameter is being removed · Issue #339 · FutureTense/keymaster · GitHub was created a while ago, but there haven’t been any updates to the repository since January.

Did the repository move?

Ah, ok. Yes. I see the code now. The linked repository is the correct one. If you’ve got a fix for this already I would suggest you open a PR to get it in.

I’ll put in the PR after I give it a little more testing. I haven’t really done much with github, except downloaded code, since I design electronics and am not great at code. So this would be my first PR.

Rob

1 Like

This may be a feature request, I don’t see any options to handle timeouts. Every once in a while KeyMaster would get stuck on a lock command, i.e. deleting a code, no fault of Key Master, it is a ZwaveJS issue I’m trying to solve. Is there anyway if KeyMaster gets stuck in a command for more than, let’s say 5 minutes, can it resend the command?

keymasterdelete

In this picture KeyMaster is stuck on deleting for about 6 hours and 30 minutes. My fix is to manually turn off “Date Range”, then manually toggle “Enabled”, then problem gets fixed right away.

Would my only option be to write an automation for all my code slots to if state is “deleting” or “adding” for X amount of time? What would be my action?

Since updating to latest version I can’t clear the codes from the lock using developer tools. Am I missing something? I’m getting this error

Failed to call service keymaster.clear_code. A Z-Wave integration has not been configured for this Home Assistant instance

try reloading the integration

Is there a list of most compatible, least issues locks with KeyMaster?

Asking as I have been struggling to find a lock that works overall for me. :sob:

Thanks!

1 Like

No subfolders…
I did a clean in stall after seeing the issue of an update status getting stuck like @Rodrick mentioned, but the subfolder with all the assets for my lock was not created and there is no setup.sh script that I can run to force it.
I did get the following notification, so I am not sure what I am missing. When I set this up the first time everything worked like the wiki explained.

Keymaster - Package file generation complete!
Package generation for front_door complete!

All changes have been automatically applied, so no restart is needed.

I use the YRD-226ZW, it is fully compatible with Keymaster. I have several of them that work completely with HA & Keymaster. Also HA unlocks a lot of other neat features I didn’t know the lock could do remotely.

1 Like

I believe this is a ZWAVE-JS Issue not a Keymaster issue.

1 Like

I would always recommend a restart or even a reboot. With Keymaster before I rolled it out, I had it on a test machine. I had to install it and uninstall it a couple of times. A few times it didn;t complete uninstall or the uninstall froze, I had to delete the Keymaster directories on the HA drive.

1 Like

Thanks.I did this:

  • Removed integration, restarted
  • Removed from HACS restarted
  • Added to HACS restarted
  • Added integration and waited for keymaster notifications to appear then restarted

It isn’t working for me. The only entities I get are 10 entities for PIN status (I chose 10 codes when setting up integration). I never get a folder for my lock in the keymaster folder. I turned on debugging and after see the following. All lines except the ‘INFO’ line are repeating every 5 seconds. I’ll be opening an issue in github:

2023-12-23 04:53:10.405 INFO (MainThread) [custom_components.keymaster] Version v0.0.87 is starting, if you have any issues please report them here: https://github.com/FutureTense/keymaster
2023-12-23 04:53:10.475 DEBUG (MainThread) [custom_components.keymaster.binary_sensor] Connected to zwave_js network
2023-12-23 04:53:10.493 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 1 not enabled
2023-12-23 04:53:10.494 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 2 not enabled
2023-12-23 04:53:10.494 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value for code slot 3
2023-12-23 04:53:10.494 DEBUG (MainThread) [custom_components.keymaster] Work around code in use.
2023-12-23 04:53:10.494 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value for code slot 4
2023-12-23 04:53:10.494 DEBUG (MainThread) [custom_components.keymaster] Work around code in use.
2023-12-23 04:53:10.495 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value for code slot 5
2023-12-23 04:53:10.495 DEBUG (MainThread) [custom_components.keymaster] Work around code in use.
2023-12-23 04:53:10.495 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value for code slot 6
2023-12-23 04:53:10.495 DEBUG (MainThread) [custom_components.keymaster] Work around code in use.
2023-12-23 04:53:10.495 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value for code slot 7
2023-12-23 04:53:10.495 DEBUG (MainThread) [custom_components.keymaster] Work around code in use.
2023-12-23 04:53:10.495 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 8 not enabled
2023-12-23 04:53:10.496 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 9 not enabled
2023-12-23 04:53:10.496 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 10 not enabled
2023-12-23 04:53:10.496 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 11 not enabled
2023-12-23 04:53:10.496 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 12 not enabled
2023-12-23 04:53:10.496 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 13 not enabled
2023-12-23 04:53:10.496 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 14 not enabled
2023-12-23 04:53:10.496 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 15 not enabled
2023-12-23 04:53:10.496 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 16 not enabled
2023-12-23 04:53:10.497 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 17 not enabled
2023-12-23 04:53:10.497 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 18 not enabled
2023-12-23 04:53:10.497 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 19 not enabled
2023-12-23 04:53:10.497 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 20 not enabled
2023-12-23 04:53:10.497 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 21 not enabled
2023-12-23 04:53:10.497 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 22 not enabled
2023-12-23 04:53:10.497 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 23 not enabled
2023-12-23 04:53:10.498 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 24 not enabled
2023-12-23 04:53:10.498 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 25 not enabled
2023-12-23 04:53:10.499 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 26 not enabled
2023-12-23 04:53:10.509 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 27 not enabled
2023-12-23 04:53:10.509 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 28 not enabled
2023-12-23 04:53:10.509 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 29 not enabled
2023-12-23 04:53:10.509 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 30 not enabled
2023-12-23 04:53:10.509 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.017 seconds (success: True)```