KeyMaster Z-Wave lock manager and scheduler

Does the error still occur with the updated factoryname to schlage ?

yes

The first error message is the important one.

What OS are you using?

MacOS Catalina, To be precise 10.15.5

Mac OS doesnā€™t support the -g flag on itā€™s version of declare, so youā€™ll need to run this script in a Linux environment for it to spit out the files for you.

Is there anyway of adding the " Zwave configuration" card from ptdalen version?
image

I know we can go into the Z Wave section and adjust these manually, but it would be a nice thing to have. Thanks to everyone for all their work on this. I am new to Home Assistant and Linux and would not have been able to install this without everyone elseā€™s questions.

You could modify lock_manager_common.txt and add the UI elements and automations there, and modify lovelace to show the card somewhere. Follow the naming format for other elements and you should be good. Iā€™d first add everything manually, then cut and paste them over and apply the naming format. Thatā€™s how I add new UI pieces in the first place. If you get it working, I might integrate it into the repo.

1 Like

I have everything configured per the instructions but it wonā€™t set the codes. Upon trying to set or enable a code, I get the following error in the log. Notice the double underscore between pin and 1 (pin__1). I checked the input_text.diningroom_pin_1 entity and it only has a single underscore as expected.

homeassistant.exceptions.HomeAssistantError: Error rendering data template: str: Invalid entity ID 'input_text.diningroom_pin__1'

When I disable a code, I get the following:

2020-06-12 12:24:58 ERROR (MainThread) [homeassistant.components.automation] DiningRoom Clear Code: Error executing script. Invalid data for call_service at pos 1: expected int for dictionary value @ data['code_slot']

Iā€™ve been looking through the code for a couple hours now and Iā€™m not finding the issue. Iā€™m running the latest version of Home Assistant, 0.111.1. Is anyone experiencing this issue?

Nope.

Did you rename your lock as instructed?
The error yourā€™re getting is in lock_manager_common.yaml file around line 332.

After a bit of troubleshooting, I tracked this down to the index length in the common file.

In Add Code and Clear Code, anywhere I found the following:

{% set index = 17 %}

I changed it to:

{% set index = 18 %}

Position 17 would give me ā€˜_1ā€™ from ā€˜active_diningroom_1ā€™. Position 14 for example, would return ā€˜oom_1ā€™. We need the 1 only which is position 18.

I supposed you could also remove the underscore from pin_ and it would work as well but I havenā€™t tested that. Maybe do a split("_") and use the third list item, instead or regex_replace might be better?

Try pulling the lock-manager repo again. You are using out of date code. Iā€™m not a git guru, by any stretch of the imagination. It seems I was making my commits to a development branch instead of the master branch. It took a little google-fu to figure out what I was doing incorrectly. I hope I have it working correctly now. In any case the last commit on master should be 39d105a on/about June 8th.

I wish people would come to their senses and use mercurial instead of git. Itā€™s the Mary Poppins of distributed version control systems,

@firstof9, you may want to update yours as well.

1 Like

My package is working fine, Iā€™ll only update if youā€™ve put in new stuff :stuck_out_tongue:

The answer is, it works, why change? :stuck_out_tongue:

Thank you! Worked perfectly on the first try with the new code.

I thought something was up when I read above that you had fixed some things in the code but I wasnā€™t seeing the updates.

The index you listed was removed, but the changes werenā€™t merged into the master branch until today.

Which branch are you updated too?

Anyone having issues with the Name and Pin getting reset to unknown after stopping HomeAssistant and restarting it? Iā€™m trying to determine if itā€™s an HA issue or something else. donā€™t remember having this issue previously. It takes a while but eventually the show up in core.restore_state but after a restart, they get reset to unknown.

Hereā€™s what Iā€™ve been able to determine. core.restore_state appears to be updated in 15 minute increments while HA is running. If the state is updated in core.restore_state, upon restart, the values are properly loaded. After restart core.restore_state still shows the correct value for a short period of time. Itā€™s then updated to unknown for some reason. When the next update of core.restore_state occurs, it gets updated again with the correct value.

Soā€¦If you restart then restart again before the values are updated from unknown to the correct values, your values are lost and reset to unknown.

Iā€™m not sure if this is a new bug that was introduced with the new fast load feature in 0.111 or if itā€™s always been there. Iā€™ll open an issue and weā€™ll see what the HA team says.

EDIT: Iā€™m not sure this is a HA issue. The only values that are getting reset to unknown are the lock manager values. I noticed they were getting set to unknown again in core.restore_state a few seconds after showing the correct value.

After the 15 minutes, core.restore_state updates with the correct lock manager values, then a few seconds later, it updates again with unknown. Interestingly, the state in developer tools still shows the correct value and it doesnā€™t show any recent update. Iā€™ve enabled debug logging to see if I can track down whatā€™s causing this.

I donā€™t recall I just did the zip download and extracted.

Check your recorder settings. You need to include input_name and input_number domains or the sensors directly.

Iā€™m not excluding or including anything in recorder. Everything is being written. I can see past history for these values that are being lost.

As a test, I created an input_text in configuation.yaml and one in packages. I restarted a couple dozen times and there were no lost values with those or lock lanager until a few minutes ago. I restarted and I lost the lock manager values and the test input_text values.

Iā€™m going to open an issue with the HA project team.