Zwave Lock Manager

Z wave stuff is so expensive in Australia. Locks are 500. Motion sensors are 110 each! I makes it hard to move off

Iā€™m just asking if the zigbee lock even pairs with HA? If so what sort of sensors, locks, etc does it have?

If you try to generate a random code longer than 5 digits then range() flips outā€¦
Hereā€™s my fix.

      - service: lock.set_usercode
        data_template:
          usercode: >-
            {% set object_id = trigger.to_state.object_id %}
            {% set lock_name = "_".join(object_id.split("_")[3:-1]) %}
            {% set lock_id = 'lock_zwave_option_16_' ~ lock_name %}
            {%- set size = states['input_select'][lock_id].state|int -%}
            {%- if (size > 5) -%}
            {%- set size = size-5 -%}
            {%- set max = ("9" * size)|int -%}
            {%- set base = ("1" + ("0" * (size-1)))|int -%}
            {%- set usercode = range(base, max)|random -%}
            {%- set size = 5 -%}
            {%- endif -%}
            {%- set max = ("9" * size)|int -%}
            {%- set base = ("1" + ("0" * (size-1)))|int -%}
            {%- set usercode = usercode ~ range(base, max)|random -%}
            {{ usercode }}

Generate 2 smaller random numbers and string concat to get a 6, 7, or 8 digit code length.

Check this out Kwikset Zigbee Deadbolt

So where is the entry point of this thread to get started with the latest code?

Iā€™ve been a bit busy, so the one lock and two lock packages are a bit out of date.

This is where youā€™ll find the packages, though. The three lock package is up to date, and can pretty easily be modified for your configuration. I do have two different kinds of locks, so lock 3 has a couple custom automations/sensors, that might not apply to you. I tried to comment well enough to make it pretty easy to understand what is going on

1 Like

Maybe you can incorporate my auto lock code. Iā€™ll try and post it soon.

1 Like

@FutureTense please do that would be awesome.

Thank you for sharing your work with us. I wouldnā€™t be able to work this stuff out on my own, let alone have so many of the features of these locks integrated into HA without it.

That being said my setup isnā€™t exactly the same so Iā€™ve been stumbling my way through the code ironing it out to my setup (Single FE599GR at the front door) and the comments your put in the package file are a massive help! Thank you.

There is only one feature I had issues to get working, which is the sensor.garage_door_opened state. It never updated for me. I have a work around for it and I thought Iā€™d share it here incase any one else with this lock was having the same issue.

In:

      garage_door_code_entered:
        value_template: >-
          {% if ((as_timestamp(strptime(states.sensor.date_time.state, "%Y-%m-%d, %H:%M")) - as_timestamp(states.sensor.lock_garage_door_lock_alarm_level.last_changed)) < 1) %}
            {{ states.sensor.lock_garage_door_lock_alarm_level.state }}
          {% else %}
            0
          {% endif %}

Change to:

      garage_door_code_entered:
        value_template: >-
          {% if ((as_timestamp(states.lock.lock_garage_door_lock.last_changed) - as_timestamp(states.sensor.lock_garage_door_lock_alarm_level.last_changed)) < 1) %}
            {{ states.sensor.lock_garage_door_lock_alarm_level.state }}
          {% else %}
            0
          {% endif %}

Seems to work for me now

1 Like

Sorted it out.

Iā€™m using the single lock code and Iā€™m seeing the following errors in my log when I try and perform an action.

Any ideas?

home-assistant | 2019-06-26T19:32:24.451943017Z 2019-06-26 19:32:24 INFO (MainThread) [homeassistant.components.automation] Executing Keypad switch turned off
home-assistant | 2019-06-26T19:32:24.452074369Z 2019-06-26 19:32:24 INFO (MainThread) [homeassistant.helpers.script] Script Keypad switch turned off: Running script
home-assistant | 2019-06-26T19:32:24.452195185Z 2019-06-26 19:32:24 INFO (MainThread) [homeassistant.helpers.script] Script Keypad switch turned off: Executing step call service
home-assistant | 2019-06-26T19:32:24.454102668Z 2019-06-26 19:32:24 ERROR (MainThread) [homeassistant.helpers.service] Error rendering data template: UndefinedError: ā€˜Noneā€™ has no attribute ā€˜attributesā€™

Did you ever create a dockerfile for this? Am I correct in thinking this will not persist if the container is restarted?

Could you share your updated one lock file?

No, I unfortunately havenā€™t had the time. I should have time this weekend.
It should persist if the container is restarted, but not if the container is upgraded I believe.

I should probably pull my image out of Watchtower until I have a way to persist my changes.

In the github repo, whatā€™s the difference between door_locks.yaml and lock_package_for_one_deadbolt.txt? Are both needed?

Is there a simple explanation on installing this? For example, if you create a packages directory, you can do the following, but what would you include in the packages directory?

packages: !include_dir_named packages

Should this still work on .95.4? the Home Configuration Test says it isnā€™t compatible with the upgrade

Doesnā€™t seem like you have had a reply, I just installed this and this is what I have/finding out:
From the Github Repo, you only need to pick one of these files. If you have only one deadbolt, use the lock_package_for_one_deadbolt.yaml file. If you have 3 locks, pick the door_locks.yaml file. I only have 2 locks but picked the door_locks.yaml as it seems to be the most up to date. I just commented out anything related to back door lock.

Under your config directory, create a directory called ā€œpackagesā€. In that directory, place your door_locks.yaml file.

The entry in your configuration.yaml file - packages: !include_dir_named packages will read anything thatā€™s in that directory, so later on, if you find another package you like just throw it in that directory and it will be picked up automatically.

I just finished installing this package and I am on 0.95.4 and I am not seeing any issues so far, working great.

I canā€™t get temporary or recurring codes working. Is there a special order you have to enter stuff in?

The ā€œalwaysā€ range works, but not temp or recurring

@ptdalen . Thanks for sharing this with us, itā€™s working great and I love it !!
I took your newest version and commented out everything that I could find for back door as I only have a front door and garage door lock at this time. I also made changes to the Front Door Report as I have two FE599, so I took reference of your garage door lock and re-created a new report for my Front door.

Quick Question, Am I coorect to say that the Door Lock Configuration Options do not work with a FE599 type lock?