KeyMaster Z-Wave lock manager and scheduler

Apparently there’s an issue already open regarding this. It doesn’t effect me so I didn’t know it existed until l caught up on the 0.111 release blog forum post. :man_shrugging:

Looks like there was an open issue for state history not loading when using certain databases but those didn’t apply to my situation. I ended up creating mqtt sensors to temporary store the states with the retain flag set. The retain flag is necessary, otherwise the mqtt sensor values will be unknown. These mqtt sensors are then updated when lock manager values are updated. Upon HA start, the new mqtt sensors get their values from the mqtt broker and the lock manager states are then set from from those mqtt sensors. Works perfectly every time.

This is not an issue with Lock Manager. This is an HA issue. Lock Manager is working perfectly.

Your core.restore_state file in .storage may be corrupted.

Steps you could try:

  1. Shut down Home Assistant
  2. Rename core.restore_state to core.restore_state.bak
  3. Start Home Assistant
  4. See if the values repopulated from your database.

Hi There, I’ve installed the lockmanager and the installation seems fine, but when I enable a code, I don’t see the status turn yellow, and the codes aren’t working in the lock.
I had originally defined codes manually through the zwave console, and those continue to work fine.
Am I missing something with the installation? When I install the lockmanager, does/should it overwrite existing codes that were defined?

To add to this since I’m also new to HA, the automation that adds a code doesn’t seem to be triggered after entering the code:
image

How could I go about troubleshooting this?

Check your home assistant log for errors.

Basic question, but where exactly? Developer Tools -> Logs?

That works, check for errors saying something about automation or specifically automation.frontdoor_add_code

I see these guys:


image

Did you create the binary_sensor.allow_automation entity as well?

I did not. Is it documented somewhere?

Sure is use this link

Thank you. I’ve added the input boolean and the binary sensor but when I check the configuration I get the error below. Do I need to add all the extra code (input_boolean, binary_sensor, automation and script) in order for the config to check out or am I doing something wrong?

image


Please post configuration as text, no pictures, it makes it harder to help.

Fix the input_boolean by removing input_boolean. from system_ready this should fix all those errors.

EDIT: I submitted a PR to fix the documentation to adjust that.

Sorry, will include the code. So I’m almost there. I’m still getting the error for the binary sensor. Here’s my code. I have a separate binary_sensor.yaml file which I’m including in the main config file.

Do I need to specify the platform for those binary sensors?

image

#wyze
  - platform: wyzesense
    device: auto
    
#Grouping of Windows
  - platform: template
    sensors:  
      window_status:
        friendly_name: 'Window Status'
        device_class: window
        value_template: >
          {% set sensors = [states.binary_sensor.wyzesense_basement_window,
                            states.binary_sensor.wyzesense_room1_window,
                            states.binary_sensor.wyzesense_room2_window,
                            states.binary_sensor.wyzesense_mudroom_window,
                            states.binary_sensor.wyzesense_office_window] %}
          {{ sensors | selectattr('state','eq','on') | list | count > 0 }}

#Grouping of Doors          
      door_status:
        friendly_name: 'Door Status'
        device_class: door
        value_template: >
          {% set sensors = [states.binary_sensor.wyzesense_garage_door,
                            states.binary_sensor.wyzesense_porch_door] %}
          {{ sensors | selectattr('state','eq','on') | list | count > 0 }}

#Lockmanager
    allow_automation:
      friendly_name: "Allow Automation"
      value_template: "{{ is_state('input_boolean.allow_automation_execution', 'on') }}"

    system_ready:
      friendly_name: "System ready"
      value_template: "{{ is_state('input_boolean.system_ready', 'on') }}"
      device_class: moving  

Your indentaiton is off slightly.

Try this:

#wyze
  - platform: wyzesense
    device: auto
    
#Grouping of Windows
  - platform: template
    sensors:  
      window_status:
        friendly_name: 'Window Status'
        device_class: window
        value_template: >
          {% set sensors = [states.binary_sensor.wyzesense_basement_window,
                            states.binary_sensor.wyzesense_room1_window,
                            states.binary_sensor.wyzesense_room2_window,
                            states.binary_sensor.wyzesense_mudroom_window,
                            states.binary_sensor.wyzesense_office_window] %}
          {{ sensors | selectattr('state','eq','on') | list | count > 0 }}

#Grouping of Doors          
      door_status:
        friendly_name: 'Door Status'
        device_class: door
        value_template: >
          {% set sensors = [states.binary_sensor.wyzesense_garage_door,
                            states.binary_sensor.wyzesense_porch_door] %}
          {{ sensors | selectattr('state','eq','on') | list | count > 0 }}

#Lockmanager
      allow_automation:
        friendly_name: "Allow Automation"
        value_template: "{{ is_state('input_boolean.allow_automation_execution', 'on') }}"

      system_ready:
        friendly_name: "System ready"
        value_template: "{{ is_state('input_boolean.system_ready', 'on') }}"
        device_class: moving  

EDIT: Highly recommend using VSCode to edit your YAML files.

Thank you again, I’ll look at getting VSCode.

Thanks for the indention. All the extra manual code now checks out, and I’ve added them all and restarted HA.

Unfortunately it doesn’t seem to be working still. I’m seeing the message below, and the status shows as connected, but not yellow.

image

They will never be yellow, unless your theme makes ‘on’ status yellow.

Could you post your frontdoor.ini that you edited? You might be missing the alarm_level sensor and alarm_type sensor.

Progress is being made. I had to create the two automations through the GUI as opposed to the YAML. I then restarted HA and I could see that they got triggered. Now when I disable and enable a code on the door, I can see the other automations being fired.

But when I test the code I just added, it’s still not working at the door.

#See README for more information.
[lockmanager]

#number of PINS to setup in lovelace
numcodes=6

#the name or location of the lock you are setting up (no spaces)
lockname="FrontDoor"

#the "lowest common denominator" of the factory lock name.  
lockfactoryname="schlage_bolt"

#The name of the (optional) door sensor.
sensorname="frontdoor"

#the "lowest common denominator" of the factory door sensor name.  
sensorfactoryname="vision_security_zd2105us_5_recessed_door_window_sensor"

#the Home Assistant EntityID of your (optional) garage door
garageentityid="cover.garage_door_opener"

Below are my door lock entities, just to ensure I have the lowest common denominator set correctly

That all looks good.

Any new errors in the log?