KeyMaster Z-Wave lock manager and scheduler

I released a new update for those running ozw. Support for zwave is slowing down, but we won’t abandon it completely. There are a few issues with ozw, but for the most part it seems to be stable.

New as of 0.115, you can use input_datetime directly in automations, this could slim down some of the time based automation bits.

Just updated to the new v-0.0.112-ozw and generated the new files. Looks like there are a few lines in the lock_manager_common.txt file that aren’t automatically generated.

Lines 333-363 sensor info is static, entity id listed as binary_sensor.zd2105us_5_recessed_door_window_sensor_access_control_door_window_open for instance.

Also lines 174-180 (as well as line 377 and 450) has static lock.be469zp_connect_smart_deadbolt_locked listed for the locknames.

These had to be manually changed to my entity ids to function.

Also seem to be getting these errors in logs for my locks now.

Template sensor 'backdoor_ac_last_changed' has no entity ids configured to track nor were we able to extract the entities to track from the value template(s). This entity will only be able to be updated manually
Template sensor 'backdoor_uc_last_changed' has no entity ids configured to track nor were we able to extract the entities to track from the value template(s). This entity will only be able to be updated manually

Does anyone have a good walk-through on how to install ozw? I tried https://www.home-assistant.io/integrations/ozw/ and could never be sure it was working correctly. I had MQTT installed through supervisor, then openzwave, then integrations. I was able to add devices, but never get the ozw integration to connect and explore the menus.

I saw there is a way of making a MQTT docker, but no clear instructions.

Yes there is.

1 Like

That’s awesome firstof9. Exactly what I was looking for. Thanks again.

1 Like

You installed via HACS, correct? More to the point, did you open the integration and set your sensors from there?

After you close that, you should restart HA.

Yes. installed via HACS. I’m saying the actual lock_manager_common.txt file in custom_components/lock-manager doesn’t have the actual automatically generated variables listed.

lock_manager_common.txt

    - alias: CASE_LOCK_NAME Locked state changed
      trigger:
        platform: state
        entity_id: lock.be469zp_connect_smart_deadbolt_locked
      condition:
        - condition: state
          entity_id: 'binary_sensor.allow_automation'
          state: 'on' 
        - condition: template
          value_template: >-
            {% set report = states.input_text.LOCKNAME_status_report.state %}
            {% set a = report.split(';') %}
            {% set lockcmd = states.input_number.LOCKNAME_lock_command.state %}
            {% set lockuser = states.input_number.LOCKNAME_lock_user.state %}
            {% set lockcmd = a[0] %}
            {% set lockuser = a[2] %}
            {% set lockstate = states.lock.be469zp_connect_smart_deadbolt_locked.state %}
            {% if (lockstate=='locked') %}
            {%   set lockval=5          %}
            {% else                     %}
            {%   set lockval=6          %}
            {% endif                    %}
            {{ ((lockcmd | int) != (lockval | int)) and (lockuser | int ==0)}}
      action:
        - service: input_number.set_value
          data_template:
            entity_id: input_number.LOCKNAME_lock_command
            value: >-
              {% set lockstate = states.lock.be469zp_connect_smart_deadbolt_locked.state %}
              {% if (lockstate=='locked') %}
                {{ 66 }}
              {% else                     %}
                {{ 77 }}
              {% endif                    %}

Here is a snippet from lines 147-180. See how lock.be469zp_connect_smart_deadbolt_locked is filled for some of the states and entities rather than LOCKNAME variable?

It shouldn’t have any generated entities. You did find a bug, as I hardcoded some stuff in there. I’ll try and fix it in a bit.

1 Like

LOL, sorry I should have just said that it was a bug from the start :rofl: The correct generated entities don’t show up in the lock_manager_common.yaml file. Just letting you know!

Make sure to report bugs on the github way easier to track than on the forum.

1 Like

Did you find a solution to this? I have the same lock and also am not showing a user code sensor.

The Schlage lock? Are you using the integration? The lock should appear in the drop down.

Yes I am using the integration and when I get the the point of configuration, I don’t have a user code sensor to select. Same issue as described above by user tvo. I also tried to zwave exclude and re-include the lock and have the same exact entities.

Here is my entity list for the lock:Capture1

I’ve got most of this working but struggling with notifications. There is an error in my log Could not render template kahudoor Status Report: str: Invalid domain name ‘UC’

In my common.yaml file I’ve got

value_template: >
        {% set UC = 'sensor.schlage_allegion_be469_touchscreen_deadbolt_alarm_level_kahudoor' %}
        {% set AC = 'sensor.schlage_allegion_be469_touchscreen_deadbolt_access_control_kahudoor' %}

        {% if (((as_timestamp(now()) - as_timestamp(states.UC.last_changed)) < 15) and ((as_timestamp(now()) - as_timestamp(states.AC.last_changed)) < 15)) %}

          {% set usercode_value = states(UC) %}
          {% set alarm_type_value = states(AC) %}

any ideas…?

I’m not sure how you’re pulling those entities up, but are you sure there’s not another “page” set of results?

I say this because I too, even as the developer (along with @firstof9) have had issues with all lock entities not appearing. It took a lot of headaches to resolve this. I ended up bricking my lock in the process and had to buy a new one. What finally worked was getting a new USB Zwave stick.

I don’t know how many zwave devices are part of your network, but if you can stomach having to rebuild your zwave network (perhaps using the backup/restore utility) I suggest you remove all zwave devices from your HA network and then factory reset your USB z-wave stick using a paper clip. I had already spent so much time and money on my bricked lock that another $50 for a new stick didn’t phase me.

If you do start with a new z-wave network, make sure you keep things simple at first. Only add the lock and door sensors, if any.

Are you using zwave or ozw?

zwave. Tried with firstof9’s automated install and ended up with that error. Just started from scratch compiling the newest one from your repo and have ended up with the same error

Have also noticed the Status Report service is unavailable and can’t be started

Are you using v0.0.13-ozw? From the integration increase the number of Code slots by one, click submit. Then check the packages directory to see if your new value for code slots has a matching number of files, e.g. frontdoor_lock_manager_5.yaml If not, your files aren’t being generated properly and you should first restart Home Assistant (or even reboot your machine running it)