KeyMaster Z-Wave lock manager and scheduler

@FutureTense noticed a couple things

system_startup_cleanup:

ran with an error, cannot find homekit.start (I do not use homekit) removed:

- service: homekit.start

It will now run with no error

I have no sensor:

binary_sensor.ozw_network_status

So the system_startup_cleanup script will not run automatically.

Ran system_startup_cleanup script manually but still not adding codes.

Original error still on logs on system restart.

EDIT:

More errors in log after trying to add user code:

sidedoor Add Code: Error executing script. Service not found for call_service at pos 1: Unable to find service ozw/set_usercode

Running your version v0.0.11 (with regular zwave integration not OZW beta)

Services available for user codes are:
lock.set_usercode
lock.get_usercode
lock.clear_usercode

Here you go:

binary_sensor:
  - platform: mqtt
    name: ozw_network_status
    state_topic: OpenZWave/1/status/
    value_template: >
      {{ "ON" if value_json.Status in ["driverAwakeNodesQueried", "driverAllNodesQueriedSomeDead", "driverAllNodesQueried"] else "OFF" }}
    json_attributes_topic: OpenZWave/1/status/
    device_class: "connectivity"

Edit: nm you’re using the zwave integration.

Same problem here! Did you find any solution?

Not yet, no. I was going to try to completely remove and re-add my lock in zwave and hope that it comes up with the proper fields, but I haven’t given it a shot yet.

1 Like

That took away part of the error message. Now when I check the configuration I get this error.

Component error: input_booleans - Integration ‘input_booleans’ not found.

This is my new configuration.yaml

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

input_booleans:
  allow_automation_execution:
    name: 'Allow Automation'
    initial: off

  system_ready:
    name: 'System Ready'
    initial: off

binary_sensor:
  - platform: template
    sensors:
      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

Extra ‘s’ on there.

input_boolean:
  allow_automation_execution:
    name: 'Allow Automation'
    initial: off

  system_ready:
    name: 'System Ready'
    initial: off

I just found that. Thanks!

OK, hopefully one last question. How do I access where to enter the codes, how many times a code is used, etc…?

you need to copy/paste the frontdoor_lovelace file into your UI configuration.
It should be in /config/packages/lock-manager/frontdoor/

Im using native Zwave with a Schlage be469, repo version 0.11. All sensors seems to be enable, but I still get the error “User input malformed” ![2020-09-28 at 19|690x422](upload://zw

g9ub0FOjvqZZs8Ej0G4AkLkyk.png)

I found if you select a sensor for the door sensor it works (I don’t have a door sensor but just chose another randoms sensor.

1 Like

Nothing is showed in that box

I also had to select a door sensor for it to work. I dont have a sensor but a binary sensor just showed up.

1 Like

just create a “dummy” sensor in your configuration.yaml and use that. You’ll always get that error if all the fields aren’t filled in.

3 Likes

The door sensor part is getting a refactor, I haven’t gotten around to it yet.

I am trying to use zwave but I cant get around needing ozw missing services ozw.set_usercode, ozw.clear_usercode. log details on zwave but not on ozw

I try to uninstall zwave and install ozw and now no logs and lock dont set codes still. and no logs

I am getting this errors when trying to clear or add codes. after I changrd to master on the repostory. and as I said I am using zwave

Logger: homeassistant.components.automation.patiodoor_clear_code
Source: helpers/script.py:1056
Integration: Automation ([documentation](https://www.home-assistant.io/integrations/automation), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+automation%22))
First occurred: 2:12:48 AM (1 occurrences)
Last logged: 2:12:48 AM

patiodoor Clear Code: Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data['entity_id']
Logger: homeassistant.components.automation.patiodoor_clear_code
Source: core.py:1269
Integration: Automation ([documentation](https://www.home-assistant.io/integrations/automation), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+automation%22))
First occurred: 2:12:48 AM (1 occurrences)
Last logged: 2:12:48 AM

While executing automation automation.patiodoor_clear_code

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 426, in async_trigger await self.action_script.async_run( File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 944, in async_run await asyncio.shield(run.async_run()) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 198, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 206, in _async_step await getattr( File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 413, in _async_call_service_step await service_task File "/usr/src/homeassistant/homeassistant/core.py", line 1269, in async_call processed_data = handler.schema(service_data) File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__ return self._compiled([], data) File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict return base_validate(path, iteritems(data), out) File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: extra keys not allowed @ data['entity_id']
Logger: homeassistant.components.automation.patiodoor_add_code
Source: helpers/script.py:1056
Integration: Automation (documentation, issues)
First occurred: 2:13:05 AM (1 occurrences)
Last logged: 2:13:05 AM

patiodoor Add Code: Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data['entity_id']
Logger: homeassistant.components.automation.patiodoor_add_code
Source: core.py:1269
Integration: Automation (documentation, issues)
First occurred: 2:13:05 AM (1 occurrences)
Last logged: 2:13:05 AM

While executing automation automation.patiodoor_add_code
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 426, in async_trigger
    await self.action_script.async_run(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 944, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 198, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 206, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 413, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1269, in async_call
    processed_data = handler.schema(service_data)
  File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['entity_id']

Replace the lock_manager_common.txt in your /custom_components/lock-manager/ directory with the one from github:
https://raw.githubusercontent.com/FutureTense/lock-manager/master/custom_components/lock-manager/lock_manager_common.txt

Then call the service: lock-manager.generate_package
data: lockname: patiodoor

@firstof9. did this and get an error (my lock is sidedoor):

Add Code: Error executing script. Unexpected error for call_service at pos 1: Error rendering data template: str: Invalid entity ID 'lock.LOCKFACTORYNAMEPREFIX_sidedoor' 

Still getting errors:

TemplateError('str: Invalid domain name 'UC'') while processing template 'Template("{% set UC = 'sensor.schlage_allegion_fe599gr_wireless_door_lock_alarm_level_sidedoor' %} {% set AC = 'sensor.schlage_allegion_fe599gr_wireless_door_lock_alarm_type_sidedoor' %}...

Error while processing template: Template("{% set UC = 'sensor.schlage_allegion_fe599gr_wireless_door_lock_alarm_level_sidedoor' %} {% set AC = 'sensor.schlage_allegion_fe599gr_wireless_door_lock_alarm_type_sidedoor' %}...

This is what I get now when i try to clear

Logger: homeassistant.components.template.template_entity
Source: components/template/template_entity.py:71
Integration: template ([documentation](https://www.home-assistant.io/integrations/template), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+template%22))
First occurred: 1:09:20 PM (1 occurrences)
Last logged: 1:09:20 PM

TemplateError('str: Invalid domain name 'UC'') while processing template 'Template("{% set UC = 'sensor.kwikset_spectrum_brands_touchpad_electronic_deadbolt_alarm_level_patiodoor' %} {% set AC = 'sensor.kwikset_spectrum_brands_touchpad_electronic_deadbolt_alarm_type_patiodoor' %} {% 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) %} {% if 'alarm_type' in AC %} {% set alarm_type_general_actions = { '0':'No Status Reported', '9':'Lock Jammed', '17':'Keypad Lock Jammed', '21':'Manual Lock', '22':'Manual Unlock', '23':'HA Lock Jammed', '24':'HA Lock', '25':'HA Unlock', '26':'Auto Lock Jammed', '27':'Auto Lock', '32':'All Codes Deleted', '161':'Bad Code Entered', '167':'Battery Low', '168':'Battery Critical', '169':'Battery Too Low To Operate Lock' } %} {% set alarm_type_lock_actions = { '18':'Keypad Lock', '19':'Keypad Unlock', '162':'Lock Code Attempt Outside of Schedule' } %} {% set alarm_type_code_actions = { '33':'Code Deleted', '112':'Code Changed', '113':'Duplicate Code' } %} {% elif 'access_control' in AC %} {% set alarm_type_general_actions = { '1':'Manual Lock', '2':'Manual Unlock', '3':'RF Lock', '4':'RF Unlock', '7':'Manual not fully locked', '8':'RF not fully locked', '9':'Auto Lock locked', '10':'Auto Lock not fully locked', '11':'Lock Jammed', '16':'Keypad temporary disabled', '17':'Keypad busy' } %} {% set alarm_type_lock_actions = { '5':'Keypad Lock', '6':'Keypad Unlock' } %} {% set alarm_type_code_actions = { '12':'All User Codes Deleted', '13':'Single Code Deleted', '14':'New User Code Added', '15':'Duplicate Code' } %} {% endif %} {% if alarm_type_value in alarm_type_code_actions %} {{alarm_type_value}};{{ alarm_type_code_actions[alarm_type_value] }};{{usercode_value}} {% elif alarm_type_value in alarm_type_lock_actions %} {{alarm_type_value}};{{ alarm_type_lock_actions[alarm_type_value] }};{{usercode_value}} {% elif alarm_type_value in alarm_type_general_actions %} {{alarm_type_value}};{{ alarm_type_general_actions[alarm_type_value] }} {% else %} {{-1}};Unknown Alarm Type Value {{ states(AC) }} {% endif %} {% else %} {% endif %} ")' for attribute '_state' in entity 'sensor.patiodoor_statusreport'

This is what I get for when I add a user code

Logger: homeassistant.components.automation.patiodoor_add_code
Source: helpers/service.py:140
Integration: Automation (documentation, issues)
First occurred: 1:13:19 PM (2 occurrences)
Last logged: 1:13:19 PM

patiodoor Add Code: Error executing script. Unexpected error for call_service at pos 1: Error rendering data template: str: Invalid entity ID 'lock.LOCKFACTORYNAMEPREFIX_patiodoor'
While executing automation automation.patiodoor_add_code
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 138, in async_prepare_call_from_config
    service_data.update(template.render_complex(config[conf], variables))
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 81, in render_complex
    return {
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 82, in <dictcomp>
    render_complex(key, variables): render_complex(item, variables)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 86, in render_complex
    return value.async_render(variables)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 285, in async_render
    return compiled.render(kwargs).strip()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "<template>", line 1, in top-level template code
  File "/usr/local/lib/python3.8/site-packages/jinja2/sandbox.py", line 407, in getattr
    value = getattr(obj, attribute)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 461, in __getattr__
    raise TemplateError(f"Invalid entity ID '{entity_id}'")
homeassistant.exceptions.TemplateError: str: Invalid entity ID 'lock.LOCKFACTORYNAMEPREFIX_patiodoor'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 206, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 385, in _async_call_service_step
    domain, service, service_data = async_prepare_call_from_config(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 140, in async_prepare_call_from_config
    raise HomeAssistantError(f"Error rendering data template: {ex}") from ex
homeassistant.exceptions.HomeAssistantError: Error rendering data template: str: Invalid entity ID 'lock.LOCKFACTORYNAMEPREFIX_patiodoor'