KeyMaster Z-Wave lock manager and scheduler

So, I have everything running nice and smoothly now, however my auto-lock timers seem to be reverting back to 15 minutes during the day and 5 at night. I keep changing them and a few hours later they seem to have gone back to default. When I’m changing the values, I’m doing so from the dashboard. Should I be doing this somewhere else?

2 Likes

I am seeing the same issue as Travis

Ive found that it seems to reset when I reboot HA Core. When I was seeing it quite frequently, it was when I was first getting everything setup and doing a lot of reboots. Now that I’m more settled in, the settings seem to stick for awhile until I update something and have to restart.

I am having a little bit of trouble tracking down this information, can someone assist?

I have Hass.io installed in a VM on vmWare in my basement. As such, I did not want my Z-Wave USB dongle running down there, so I setup a RPi which hosts the dongle upstairs. this is running Z-Wave JS.

I then run MQTT Broker inside of HA. Everything communicates just fine, and I can unlock and unlock my BE469ZP.

Running Keymaster, everything works except for setting lock codes, and my logger complains about [custom_components.keymaster.binary_sensor] Z-Wave integration not found.

Is my setup supported, and should I keep trying to troubleshoot the lock code set function? Or do I need to scrap this setup, change to Open Z-Wave, and get that running on the RPi? Alternatively, do I need to get Z-Wave running locally on the Hass.io instead of on the seperate RPi?

MQTT is not supported. Use the websockets and the zwavejs integration.

I had this same problem, went into my ZwaveJS control panel and looked at user codes. Set ‘User ID Status’ to ‘Available’. Then toggled the code in home assistant and problem solved.

kagetaro99 - were you able to get this working? If so was it along the lines of FutureTense suggestion? I just got keymaster working last night and this is my next project. Thanks in advance.

I found the problem, but the solution eludes me as of the moment.

I’ve finally taken the plunge and migrated to zwave_js from the OG zwave integration ( I guess I was one of the rare users that had fast and reliable performance, from what I’ve seen in the community, but wanted to get up to date with what’s “the future”). However, it seems like keymaster doesn’t want to sync anymore.

I first tried the simple, just rename the lock and my door sensor exactly as they were, but that doesn’t seem to have worked.

I then removed the integration and removed it from HACS and restarted hass. then did the reinstall process. things seem to work, however, the codes just sit in a state of “adding” when i enable it or “deleting” when disabling the codes. no codes actually get pushed to the lock.

I have a Schlage touchscreen deadbolt for those that are curious.
i tried adding the custom_components.keymaster: debug to my logger config but i am not seeing any logs.

edit: yes i updated the additional_yaml to not include the OG zwave network ready and updated it to reflect what is needed for zwave_js which just looks to enable the automation execution input boolean after hass starts.

edit 2: Looks like I fixed it and codes are functioning as expected. list of steps in case it helps someone else

  • wipe relevant parts
    • uninstalled the zwave js integration
    • uninstalled official zwave js addon
    • uninstalled keymaster integration
    • uninstalled keymaster hacs addon
  • rebooted entire machine
  • installed zwave_js_mqtt addon
    • in the configuration tab, I opened port 3000 (not just for default ingress)
    • verified all zwave devices online in web UI (inlcluding lock)
    • unplugged battery from lock and waited a few minutes.
  • added zwave_js integration
    • unchecked box, to not use official addon
    • used docker IP to connect to the zwave_js_mqtt addon (docker name and ingress name didn’t resolve. got the docker IP using portainer)
    • renamed devices accordingly ( i was able to grab all of my devices prior to the migration by running the code by nfh in the developer tools > template section and creating a csv from the results. Switching from Zwave 1.4 (Deprecated) to Zwave JS - #62 by nfh super helpful for the renaming process)
  • went to zwave_js integration and removed the failed (offline) lock. wait for this to complete
  • performed factory reset procedure on door lock. verified at the lock it was reset per lock instructions
  • re-enroll lock
    • in zwave_js integration add new device.
    • followed enrollment process on the lock. lock enrolled.
    • used the default codes a couple of times while the lock was finishing interviewing in zwave_js_mqtt
    • once lock properly showed the name via the zwave_js integration in hass, i renamed the lock for sanity
  • setup keymaster
  • test lock codes.
    • here i realized that it seemed that there were still code slots that were left in hass that i didn’t remove. fortunately after a few minutes, they came online in the entity view in the configuration panel
    • after i saw the code_slots seemed to be active, i went to lovelace
      • old names and codes persisted. so turned off the enabled boolean and waited ~10-20 seconds
      • re-enabled the code and waited ~10-15 seconds and the code reported it synced with the lock. tested the lock and all works.
      • rinse and repeat for the other codes I had

I went into the keymaster_common.yaml file (under the packages folder) and changed the defaults for the timeout (last six lines of the file) to what I want so they don’t get overwritten on start up.

I keep thinking I need to try to create those input text variables under the GUI and delete them from keymaster_common.yaml so they don’t get overwritten, but I haven’t yet.

I have a perfectly functioning keymaster install with 5 locks at a small motel.
However, this error is filling my core logs, with a new entry added every three minutes:

2021-11-21 07:15:55 ERROR (MainThread) [custom_components.keymaster.binary_sensor] Z-Wave integration not found
2021-11-21 07:18:55 ERROR (MainThread) [custom_components.keymaster.binary_sensor] Z-Wave integration not found
2021-11-21 07:21:55 ERROR (MainThread) [custom_components.keymaster.binary_sensor] Z-Wave integration not found

Adding and removing door codes is working so the zwave network is functioning and keymaster doesn’t seem to have a problem talking to it.

I don’t use zwavejs2mqtt which I see referenced as the problem in other places. (Although I do have the MQTT addon installed)

Environment:
hassio on rpi4
Core: core-2021.11.5
ZwaveJS Addon: : 0.1.48

Any ideas?

Problem solved.
Found the line that was throwing the error in the source, and its clear in there that this is not a “general” connection error to zwavejs. This error will happen whenever km can’t find any single lock even if you have multiple integrations like me. I had 5 locks, but 6 integrations because I have a test lock that isn’t always in use. Once that integration was removed the error went away.

On that note, an enhancement request for the devs:
If its possible, it would be nice for the log to note the instance name of the integration throwing the error, or even the device it couldn’t connect to. Would help narrow down issues for people like me that use multiple instances of km. When the superset “keymaster” throws an error its a little more disconcerting than “broom closet” threw an error.

1 Like

Stevie - I was not as shortly after I changed my install to SSD and ran into issue with my lock connecting/staying connected. I am not able to get it to connect with S2 - will be moving my pi and dongle closer to the lock to see if it will pair. Thinking it is the distance that is causing issues. Once I am able to get it paired again, I will see about working on this again.

In the meantime if you are able to get yours working I would love to see how you went about it.

Question about best practices for automating KeyMaster:

I tried calling some of the keymaster services, and although I can see codes reset in the zwavejs logs, it appears they might be getting overwritten. At a minimum the correct values aren’t displayed in the UI.

My goal is to be able to programatically control the locks as well as through the UI.

The method that seems to works is manipulating the input_text.<lockname>_pin_1 and input_boolean.enabled_<lockname>_1 entites through scripts.

The lock code appears to update and the UI stays in sync.

Is this the correct/sustainable/supported approach?

I tried doing this as well, but the changes don’t seem to persist after a reboot.

Interesting. I just did some quick tests and the changes at least appear to persist on reboot, but I’m remote at the moment and can’t physically test the locks. I’m rebooting within ten seconds of changing a code.

My webhook takes the following steps:

  1. Set label text
  2. Set PIN
  3. Sets the enabled input_boolean to false
  4. Wait five seconds
  5. Sets the enabled input_boolean to true

edit: oops, looks like that comment wasn’t meant for my question

1 Like

Did you change the one in packages/lockname? If you change the one under custom_components it will only change after you create a new integration.

That seems to have done it!! Changing the settings under the packages/lockname was the trick. Thanks for helping to point me in the right direction. I’m quite new to HA, so poking around in the .yaml files isn’t exactly my comfort zone yet.

Would love to see an integration to disarm the alarm panel by unlocking the door via the code. Gonna see if I can sort through the code to figure out where I could find this.

Do this via an automation.