KeyMaster Z-Wave lock manager and scheduler

Do you have any errors in the Home Assistant log?

okay i looked in the logs just tried clicking the clear codes button and heres what i get

TypeError: 'NoneType' object is not iterable
20-11-11 21:41:16 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/integrations/aiohttp.py", line 123, in sentry_app_handle
    reraise(*_capture_exception(hub))
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/_compat.py", line 55, in reraise
    raise value
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/integrations/aiohttp.py", line 113, in sentry_app_handle
    response = await old_handle(self, request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 118, in impl
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/security.py", line 132, in system_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/security.py", line 194, in token_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/utils.py", line 60, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/api/homeassistant.py", line 122, in stats
    stats = await self.sys_homeassistant.core.stats()
  File "/usr/src/supervisor/supervisor/homeassistant/core.py", line 295, in stats
    return await self.instance.stats()
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/supervisor/supervisor/docker/interface.py", line 436, in _stats
    return DockerStats(stats)
  File "/usr/src/supervisor/supervisor/docker/stats.py", line 36, in __init__
    self._calc_block_io(stats["blkio_stats"])
  File "/usr/src/supervisor/supervisor/docker/stats.py", line 62, in _calc_block_io
    for stats in blkio["io_service_bytes_recursive"]:
TypeError: 'NoneType' object is not iterable
20-11-11 21:41:35 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/integrations/aiohttp.py", line 123, in sentry_app_handle
    reraise(*_capture_exception(hub))
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/_compat.py", line 55, in reraise
    raise value
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/integrations/aiohttp.py", line 113, in sentry_app_handle
    response = await old_handle(self, request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 118, in impl
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/security.py", line 132, in system_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/security.py", line 194, in token_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/utils.py", line 60, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/api/supervisor.py", line 157, in stats
    stats = await self.sys_supervisor.stats()
  File "/usr/src/supervisor/supervisor/supervisor.py", line 155, in stats
    return await self.instance.stats()
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/supervisor/supervisor/docker/interface.py", line 436, in _stats
    return DockerStats(stats)
  File "/usr/src/supervisor/supervisor/docker/stats.py", line 36, in __init__
    self._calc_block_io(stats["blkio_stats"])
  File "/usr/src/supervisor/supervisor/docker/stats.py", line 62, in _calc_block_io
    for stats in blkio["io_service_bytes_recursive"]:
TypeError: 'NoneType' object is not iterable
20-11-11 21:41:36 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/integrations/aiohttp.py", line 123, in sentry_app_handle
    reraise(*_capture_exception(hub))
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/_compat.py", line 55, in reraise
    raise value
  File "/usr/local/lib/python3.8/site-packages/sentry_sdk/integrations/aiohttp.py", line 113, in sentry_app_handle
    response = await old_handle(self, request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 118, in impl
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/security.py", line 132, in system_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/security.py", line 194, in token_validation
    return await handler(request)
  File "/usr/src/supervisor/supervisor/api/utils.py", line 60, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/src/supervisor/supervisor/api/homeassistant.py", line 122, in stats
    stats = await self.sys_homeassistant.core.stats()
  File "/usr/src/supervisor/supervisor/homeassistant/core.py", line 295, in stats
    return await self.instance.stats()
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/supervisor/supervisor/docker/interface.py", line 436, in _stats
    return DockerStats(stats)
  File "/usr/src/supervisor/supervisor/docker/stats.py", line 36, in __init__
    self._calc_block_io(stats["blkio_stats"])
  File "/usr/src/supervisor/supervisor/docker/stats.py", line 62, in _calc_block_io
    for stats in blkio["io_service_bytes_recursive"]:
TypeError: 'NoneType' object is not iterable

None of that has anything to do with lock-manager.

Did you follow the additional steps that need to be completed as well?

I thought I had but for some reason I noticed allow_automation and system_ready was always off after reboot. so for some reason my automation isnā€™t working to turn them on. Ill try the easy method instead on the wiki in case what I followed was old data and doesnā€™t workā€¦ either way I have the those switches in my system I tried manually tuning them both on and still nothing worksā€¦ I found the right logs now there are a few errors in the logsā€¦

2020-11-11 15:57:48 WARNING (SyncWorker_54) [custom_components.lock-manager.sensor] Code slot code_slot_3 had no value: 'code_slot_3'
2020-11-11 15:57:48 WARNING (SyncWorker_35) [custom_components.lock-manager.sensor] Code slot code_slot_2 had no value: 'code_slot_2'
2020-11-11 15:57:48 WARNING (SyncWorker_25) [custom_components.lock-manager.sensor] Code slot code_slot_1 had no value: 'code_slot_1'

I very much do have some codes in heres what my lovelace looks like

What brand and model of lock?
Are you using ozw or zwave?

nevermind found it from your image you posted, thereā€™s a bug for the BE469 thatā€™s being worked on with zwave, hold tight for an update.

1 Like

sweet glad Iā€™m not just dumb haha Iā€™m normally good at this stuff so this one was getting to meā€¦ is it an update on your end? Should I just watch here for the news or is it a home assistant update I should be looking for elsewhere?

Iā€™ll likely post release notes here, but youā€™ll see it pop up in HACS when itā€™s released.

1 Like

So i did have the frontdoor_manual_notify section already there, though it was directly calling notify.notify as opposed to calling the script.manual_notify. I did change it so it now looks like this:

frontdoor_manual_notify:
  alias: frontdoor_manual_notify
  sequence:
  - service: script.manual_notify
    data:
      title: '{{ title }}'
      message: '{{ message }}'
  mode: parallel
  max: 10

I have triggered it manually and it works; however, nothing is triggering the automation. I confirmed that it is set to notify. Is this something that will not work if binary_sensor.allow_automation: off due to the workaround endless loop issue Iā€™ve encountered? If not, what is supposed to trigger the frontdoor_manual_notify script? I do see an automation called ā€œfrontdoor Lock Notificationsā€ but it has never been triggered, even though the lock is indeed being used regularly.

Thanks for the help!

OK, so I do see that all of the automations do indeed rely on that flag being set. So if binary_sensor.allow_automation is off, this integration is effectively neutered.

I modified the frontdoor_lock_manager_common.yaml file to instead use a binary_sensor created called allow_notifications and set that to true. This way notifications can still happen while disabling zwave function automation.

If anyoneā€™s feeling up to it and using the zwave integration not ozw feel free to give this sensor.py a shot and let me know how it works out for you.

is that to fix an issue? Iā€™ll be glad to try it out. Just let me know what ā€œim trying onā€ and what i should look for.

Sorry, itā€™s for BE469 users who are using zwave, I forgot to mention that.

1 Like

Is there a way to use this integration without the default Lovelace screen getting laggy from all the new entities?

cool Iā€™ll try it! Where do I put it?

You download the file and place it in custom_components/lock-manager/ you can overwrite the file as you can issue a ā€˜Reinstallā€™ via HACS to go back.

nevermind found it! Ill let you know how it works

1 Like

okay sounds like I did it right. However it still isnā€™t working. I may not be the best tester cause mine has never worked yetā€¦ I made sure my allow automation and system ready input booleans are on and tried to delete and add a code and Iā€™m still getting the same behavior. I dondt need to restart home assistant do I? It says pin status connecting code slot 1 unavalable

Yes when you overwrite the file, you have to restart HA.

1 Like

Well its still behaving the same for meā€¦

Still getting stuck with the loop then I take it?