Zwave Lock Manager

Thanks , that worked but I get an error when it trys to remove the temporary code …

Any idea ?

If you’re not using a custom zwave branch to change the clear codes you need to comment out the section for clearing codes and uncomment the other section. Check out the comments in the package

This is some great work. I briefly looked over the single lock yaml. Any reason you don’t think this would work with a Yale? Should I be the guinea pig to give it a shot?

Per the Zwave specs it should work with ALL Zwave locks, the only issue is some manufacturers implemented the code removal differently.

Everything other than setting zwave options should work. Please check it out and report back any issues

I will try to set some time aside this week to try and implement.

I will certainly report back once I see how it works for me.

Are there any specific lines we need to edit?

I changed references to front door to back door which is what my lock entity is. Changed zwave.lock_front_door_deadbolt to zwave.lock_back_door to match mine. Do I need to change and uncomment the entitiy IDs in the first few lines?

I’m using a Yale lock, went through and changed items that looked like they needed changing to match my entities. I can set a code, and turn on the “back door” switch, but the code doesn’t work on the lock.

If you don’t change your names to match the packgage, follow the comments, you’ll have to change the code in several places to match your name. for example

pulls the word FRONT from the name
and then uses that in the code
{% set lock_id = ‘lock_’ ~ lock_name ~ ‘_door_lock’ %}
to end up with

I’ve commented the places you’ll need to change to match your names.

Bottom line, there is no problem at all keeping names that you want, but you’ll have to make several changes in across the package.

Ah so I think my lock name doesn’t match up because it doesn’t end in “lock”.

I have zwave.back_door_lock and lock.back_door, so it won’t match up to lock_back_door_lock

1 Like

I’m looking at this and considering adding. I did have a thought. What if the battery level was in fact unknown, ie. dead battery?

My only concern is that a dead battery would show as 75%. I do hate errors on restart though.

I have not checked in a while, but I thought the else logic, was actually keeping me from getting an error during restart.

Basically, upon startup the value of the battery sensor should be

    {% else %}


@ptdalen you mentioned you wanted to add schedule based codes (i’ve just started the process of switching my automations to node-red - there is a contrib for dates (day, time, month etc) so could be an interesting combo to use a couple of flows when codes are used outside of expected times, plus also add code during certain times, and remove it after etc… just a thought

yeah i guess so - although you’ll need the if statement in state_attr

@ptdalen, any chance of a PR to the OpenZWave project so we could eventually all get your fix?
I am running on a rasp3 and can’t figure out how to update the OpenZWave code.
My lock (not a Schlage) seems to have the same issue with delete_usercode so I was hoping I could avoid having to set dummy code. Great work BTW!

1 Like

The fix is actually not mine, it’s another openzwave PR from a while ago that never got merged, apparently there is not a full agreement that the approach is the best way to handle the clearing. I’m no programer, but it worked for me. I suspect that the issue is that it has the potetial to cause other issues.

Shame… currently struggling to even get the dummy code to set correctly :frowning:

Right, it looks like my lock (a KeyWe) will not accept duplicate codes. Which means that it fails to overwrite a code if the the code I want to overwrite it with already exists in a different slot.
Looks like delete_usercode results in “0000” being a valid code (I can’t have that happen!) and since I don;t feel like having random codes enabled in random places, it looks like I am stuck at the moment. Shame. I really liked what you had done and was hoping I could use it for my needs (setting up weekly recurring code without asking the guests to install the BS propriatery app)
Anyone know if we might hope for OpenZWave to ever be fixed?

That is good info. Sorry that sucks. If you’re good at branching, you could pull down the current OWZ used by HA, and add the updated door lock code where 0000 works.

This is the code I’m using where 0000 works (at least with my schlages)

There is a lot of info on this post about how best to do that

Until the last version of HA, many of us (those with the linear garage door opener), had to do this to add cover support, and I just added the lock updates to my branch as well.

Of course now with the new fork of OWZ for HA being seperate, the soruce location, has changed.

I just ran across this after installing my smartcode 916 deadbolt. I am certainly going to be installing it asap as it adds the exact functionality I am looking for! Will report back soon.

1 Like

Here is some lovelace for the door codes UI. I’m using the swiper card at the moment. I’m still new to this so not sure if I need to remove the groups, etc from the package. For now I’ll leave them there to offer backwards compatability.

This uses the swiper card more info on how to set that up here

  - cards:
      - content: |
          ## Door Lock Info
          The first few cards show the door reports

          ## Code Management
          The next cards are for user code slot management
          Codes 1-10 are for Family Members
          Codes 11-15 are for Workers
          Codes 16-18 are one time use slots

          ##  The last few cards are for Z-Wave options
        type: markdown
      - entities:
          - lock.lock_front_door_lock
          - sensor.front_door_report
          - sensor.frontdoor_code
        title: Front Door Info
        type: entities
        show_header_toggle: false
      - entities:
          - lock.lock_back_door_lock
          - sensor.back_door_report
          - sensor.backdoor_code
        title: Back Door Info
        type: entities
        show_header_toggle: false
      - entities:
          - lock.lock_garage_door_lock
          - sensor.garage_door_report
          - sensor.garagedoor_code
        title: Garage Door Info
        type: entities
      - entities:
          - input_text.door_keypad_1_name
          - input_text.door_keypad_1_code
          - input_select.door_keypad_1_access_schedule
          - input_datetime.door_keypad_1_date_start
          - input_datetime.door_keypad_1_date_end
          - input_boolean.door_keypad_1_front_switch
          - input_boolean.door_keypad_1_back_switch
          - input_boolean.door_keypad_1_garage_switch
          - script.door_keypad_1_delete
        title: Entry Code 1
        type: entities
        show_header_toggle: false
      - entities:
          - input_text.door_keypad_2_name
          - input_text.door_keypad_2_code
          - input_select.door_keypad_2_access_schedule
          - input_datetime.door_keypad_2_date_start
          - input_datetime.door_keypad_2_date_end
          - input_boolean.door_keypad_2_front_switch
          - input_boolean.door_keypad_2_back_switch
          - input_boolean.door_keypad_2_garage_switch
          - script.door_keypad_2_delete
        title: Entry Code 2
        type: entities
        show_header_toggle: false
      - entities:
          - input_text.door_keypad_3_name
          - input_text.door_keypad_3_code
          - input_select.door_keypad_3_access_schedule
          - input_datetime.door_keypad_3_date_start
          - input_datetime.door_keypad_3_date_end
          - input_boolean.door_keypad_3_front_switch
          - input_boolean.door_keypad_3_back_switch
          - input_boolean.door_keypad_3_garage_switch
          - script.door_keypad_3_delete
        title: Entry Code 3
        type: entities
        show_header_toggle: false
      - entities:
          - input_text.door_keypad_4_name
          - input_text.door_keypad_4_code
          - input_select.door_keypad_4_access_schedule
          - input_datetime.door_keypad_4_date_start
          - input_datetime.door_keypad_4_date_end
          - input_boolean.door_keypad_4_front_switch
          - input_boolean.door_keypad_4_back_switch
          - input_boolean.door_keypad_4_garage_switch
          - script.door_keypad_4_delete
        title: Entry Code 4
        type: entities
        show_header_toggle: false
      - entities:
          - input_text.door_keypad_5_name
          - input_text.door_keypad_5_code
          - input_select.door_keypad_5_access_schedule
          - input_datetime.door_keypad_5_date_start
          - input_datetime.door_keypad_5_date_end
          - input_boolean.door_keypad_5_front_switch
          - input_boolean.door_keypad_5_back_switch
          - input_boolean.door_keypad_5_garage_switch
          - script.door_keypad_5_delete
        title: Entry Code 5
        type: entities
        show_header_toggle: false
      - entities:
          - input_text.door_keypad_6_name
          - input_text.door_keypad_6_code
          - input_select.door_keypad_6_access_schedule
          - input_datetime.door_keypad_6_date_start
          - input_datetime.door_keypad_6_date_end
          - input_boolean.door_keypad_6_front_switch
          - input_boolean.door_keypad_6_back_switch
          - input_boolean.door_keypad_6_garage_switch
          - script.door_keypad_6_delete
        title: Entry Code 6
        type: entities
        show_header_toggle: false
      - entities:
          - input_text.door_keypad_7_name
          - input_text.door_keypad_7_code
          - input_select.door_keypad_7_access_schedule
          - input_datetime.door_keypad_7_date_start
          - input_datetime.door_keypad_7_date_end
          - input_boolean.door_keypad_7_front_switch
          - input_boolean.door_keypad_7_back_switch
          - input_boolean.door_keypad_7_garage_switch
          - script.door_keypad_7_delete
        title: Entry Code 7
        type: entities
        show_header_toggle: false
      - entities:
          - input_text.door_keypad_8_name
          - input_text.door_keypad_8_code
          - input_select.door_keypad_8_access_schedule
          - input_datetime.door_keypad_8_date_start
          - input_datetime.door_keypad_8_date_end
          - input_boolean.door_keypad_8_front_switch
          - input_boolean.door_keypad_8_back_switch
          - input_boolean.door_keypad_8_garage_switch
          - script.door_keypad_8_delete
        title: Entry Code 8
        type: entities
        show_header_toggle: false
      - entities:
          - input_text.door_keypad_9_name
          - input_text.door_keypad_9_code
          - input_select.door_keypad_9_access_schedule
          - input_datetime.door_keypad_9_date_start
          - input_datetime.door_keypad_9_date_end
          - input_boolean.door_keypad_9_front_switch
          - input_boolean.door_keypad_9_back_switch
          - input_boolean.door_keypad_9_garage_switch
          - script.door_keypad_9_delete
        title: Entry Code 9
        type: entities
        show_header_toggle: false
      - entities:
          - input_text.door_keypad_10_name
          - input_text.door_keypad_10_code
          - input_select.door_keypad_10_access_schedule
          - input_datetime.door_keypad_10_date_start
          - input_datetime.door_keypad_10_date_end
          - input_boolean.door_keypad_10_front_switch
          - input_boolean.door_keypad_10_back_switch
          - input_boolean.door_keypad_10_garage_switch
          - script.door_keypad_10_delete
        title: Entry Code 10
        type: entities
        show_header_toggle: false
      - entities:
          - input_text.door_keypad_11_name
          - input_text.door_keypad_11_code
          - input_select.door_keypad_11_access_schedule
          - input_datetime.door_keypad_11_date_start
          - input_datetime.door_keypad_11_date_end
          - input_boolean.door_keypad_11_front_switch
          - input_boolean.door_keypad_11_back_switch
          - input_boolean.door_keypad_11_garage_switch
          - script.door_keypad_11_delete
        title: Entry Code 11
        type: entities
        show_header_toggle: false
      - entities:
          - input_text.door_keypad_12_name
          - input_text.door_keypad_12_code
          - input_select.door_keypad_12_access_schedule
          - input_datetime.door_keypad_12_date_start
          - input_datetime.door_keypad_12_date_end
          - input_boolean.door_keypad_12_front_switch
          - input_boolean.door_keypad_12_back_switch
          - input_boolean.door_keypad_12_garage_switch
          - script.door_keypad_12_delete
        title: Entry Code 12
        type: entities
        show_header_toggle: false
      - entities:
          - input_text.door_keypad_13_name
          - input_text.door_keypad_13_code
          - input_select.door_keypad_13_access_schedule
          - input_datetime.door_keypad_13_date_start
          - input_datetime.door_keypad_13_date_end
          - input_boolean.door_keypad_13_front_switch
          - input_boolean.door_keypad_13_back_switch
          - input_boolean.door_keypad_13_garage_switch
          - script.door_keypad_13_delete
        title: Entry Code 13
        type: entities
        show_header_toggle: false
      - entities:
          - input_text.door_keypad_14_name
          - input_text.door_keypad_14_code
          - input_select.door_keypad_14_access_schedule
          - input_datetime.door_keypad_14_date_start
          - input_datetime.door_keypad_14_date_end
          - input_boolean.door_keypad_14_front_switch
          - input_boolean.door_keypad_14_back_switch
          - input_boolean.door_keypad_14_garage_switch
          - script.door_keypad_14_delete
        title: Entry Code 14
        type: entities
        show_header_toggle: false
      - entities:
          - input_text.door_keypad_15_name
          - input_text.door_keypad_15_code
          - input_select.door_keypad_15_access_schedule
          - input_datetime.door_keypad_15_date_start
          - input_datetime.door_keypad_15_date_end
          - input_boolean.door_keypad_15_front_switch
          - input_boolean.door_keypad_15_back_switch
          - input_boolean.door_keypad_15_garage_switch
          - script.door_keypad_15_delete
        title: Entry Code 15
        type: entities
        show_header_toggle: false
      - entities:
          - input_select.door_keypad_16_access_schedule
          - input_text.door_keypad_16_name
          - input_text.door_keypad_16_code
          - input_boolean.door_keypad_16_front_switch
          - input_boolean.door_keypad_16_back_switch
          - input_boolean.door_keypad_16_garage_switch
          - script.door_keypad_16_delete
        title: One Time Use Code 1
        type: entities
        show_header_toggle: false
      - entities:
          - input_select.door_keypad_17_access_schedule
          - input_text.door_keypad_17_name
          - input_text.door_keypad_17_code
          - input_boolean.door_keypad_17_front_switch
          - input_boolean.door_keypad_17_back_switch
          - input_boolean.door_keypad_17_garage_switch
          - script.door_keypad_17_delete
        title: One Time Use Code 2
        type: entities
        show_header_toggle: false
      - entities:
          - input_select.door_keypad_18_access_schedule
          - input_text.door_keypad_18_name
          - input_text.door_keypad_18_code
          - input_boolean.door_keypad_18_front_switch
          - input_boolean.door_keypad_18_back_switch
          - input_boolean.door_keypad_18_garage_switch
          - script.door_keypad_18_delete
        title: One Time Use Code 3
        type: entities
        show_header_toggle: false
      - entities:
          - input_select.lock_zwave_option_3_front
          - input_select.lock_zwave_option_4_front
          - input_select.lock_zwave_option_5_front
          - input_select.lock_zwave_option_7_front
          - input_select.lock_zwave_option_8_front
          - input_select.lock_zwave_option_9_front
          - input_select.lock_zwave_option_10_front
          - input_select.lock_zwave_option_11_front
          - input_select.lock_zwave_option_15_front
          - input_select.lock_zwave_option_16_front
        title: Front Door Configuration Options
        type: entities
        show_header_toggle: false
      - entities:
          - input_select.lock_zwave_option_3_back
          - input_select.lock_zwave_option_4_back
          - input_select.lock_zwave_option_5_back
          - input_select.lock_zwave_option_7_back
          - input_select.lock_zwave_option_8_back
          - input_select.lock_zwave_option_9_back
          - input_select.lock_zwave_option_10_back
          - input_select.lock_zwave_option_11_back
          - input_select.lock_zwave_option_15_back
          - input_select.lock_zwave_option_16_back
        title: Back Door Configuration Options
        type: entities
        show_header_toggle: false
          spaceBetween: 8
            hide: false
            draggable: true
            snapOnRelease: true
    type: 'custom:swipe-card'
type: horizontal-stack
1 Like

How’d you update your openzwave? I saw you mentioned it in your delete comments.