KeyMaster Z-Wave lock manager and scheduler

Glad I could help.

That specific issue is addressed earlier in this thread.

I spent a bit of time getting this running and appear to have tripped at the finish line. (I think it might be a good idea to update the docs/readme/1st post now that the HACS install is recommended! I started backwards)

Lovelace is generated just fine, but codes I input arenā€™t being sent to the lock. The system_ready binary sensor is turned off and wonā€™t come on. Automations are also turned off and turning them on manually donā€™t seem to do anything. Setting codes manually using ozw.set_usercode works fine.

  • Is there a really obvious startup procedure I need to be following to get things going? If so, is it a procedure Iā€™d need to follow after every restart? (since the automations, etc are all initial: off ?
  • Iā€™m using the latest OZW version in HACS, and am of course running OZW.

Furthermore, I get the same Could not render template frontdoor Status Report: str: Invalid domain name 'UC' others have reported here. I have read back over the last several weeks of troubleshooting, but Iā€™ll hold on that problem for now - Iā€™d like to get the codes working first!

ps Hi @firstof9 I got my Zwave network working again finally! Required a complete rebuild of my system but it was a good excuse to move to the new ozw beta.

The templates are getting a re-work as well as the Readme.

1 Like

@joe_blow again I do thank you for the help and also @firstof9 and @ptdalen. I would have never received this much help as I have here in the ST community. Iā€™m glad I made the switch to HA!

5 Likes

Thanks for your reply. Great to see the readme is being updated!

Do you happen to know of any potential troubleshooting steps to my problem with the lock not receiving codes and system_ready never turning on?

Itā€™s also highly likely Iā€™m missing an obvious step to get things running fully.

if allow_automations isnā€™t turning on thatā€™ll block codes from being sent to your lock.

0.115 should fix the weirdness with the User Code sensor now.

For those of you that were as confused as I was, the repository to install in HACS is here: https://github.com/FutureTense/lock-manager

You add the repository above via custom repositories, then click Install this Repository in HACS. Then you can either install the latest version or toggle to beta versions if you want to install the OpenZwave version.

It sounds simple now and maybe someone already covered all of this but it was hard to piece together in a 750 comment thread.

1 Like

I should also add to that - if you install via HACS and youā€™re running the newer OZW Beta, you need to select that version of the install. After you do so, you need to change the automations and scrips youā€™re using a bit. Those are all set up for the older zwave implementation. Presumably all of this will be captured in the readme once the forthcoming template sensor fix is finished.

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!