  However after adding a code and enabling it, the integration doesn't appear to even attempt to set the code, and the PIn Status stays 'Connecting'.  I dont see anything in the logs.

@raman325 shouldn't there be more debug messages?

@raman325 shouldn't there be more debug messages?

yes it should. @mcowger are you using ozw or zwave?

yes it should. @mcowger are you using ozw or zwave?

zwave.
I know the docs prefer ozw, but ozw is not stable for me, nor does it
support my devices.
On Mon, Jan 11, 2021 at 9:17 PM Raman Gupta<EMAIL_ADDRESS>wrote:

yes it should. @mcowger https://github.com/mcowger are you using ozw or
zwave?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/FutureTense/keymaster/issues/25#issuecomment-758408131,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOXCTHSLNYQ6MYY57M6F2DSZPLOZANCNFSM4V6QWG3Q
.

--
-- Matt

zwave.
I know the docs prefer ozw, but ozw is not stable for me, nor does it
support my devices.
On Mon, Jan 11, 2021 at 9:17 PM Raman Gupta<EMAIL_ADDRESS>wrote:

yes it should. @mcowger https://github.com/mcowger are you using ozw or
zwave?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/FutureTense/keymaster/issues/25#issuecomment-758408131,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOXCTHSLNYQ6MYY57M6F2DSZPLOZANCNFSM4V6QWG3Q
.

--
-- Matt

I'm confused by your statement.  The zwave integration doesn't require a separate OZW instance, so any logging would be done directly to the Home Assistant log. Is what what you are referring to?
The primary problem is that the integration is not picking up your user codes, so the automations won't do anything. The fact that you are only seeing the debug logs for fetching the data means that the integration is not able to query the lock entity. I have been primarily testing the OZW version of the integration because that's what I use, but I will try to switch to the zwave integration to see if I can reproduce. In the meantime, can you confirm that zwave is enabled and ozw is disabled?

I'm confused by your statement.  The zwave integration doesn't require a separate OZW instance, so any logging would be done directly to the Home Assistant log. Is what what you are referring to?
The primary problem is that the integration is not picking up your user codes, so the automations won't do anything. The fact that you are only seeing the debug logs for fetching the data means that the integration is not able to query the lock entity. I have been primarily testing the OZW version of the integration because that's what I use, but I will try to switch to the zwave integration to see if I can reproduce. In the meantime, can you confirm that zwave is enabled and ozw is disabled?

also can you try running the lock.clear_usercode service on the code slot before you attempt to set it? Or use a code slot that hasn't been set already.

also can you try running the lock.clear_usercode service on the code slot before you attempt to set it? Or use a code slot that hasn't been set already.

I am using the zwave integration, not the ozw/mqtt design. The zwave integration still uses OpenZwave under the hood (1.4), and still produces a OZW_Log.txt file, which is what I’m references.
I ran a quick test with a never before used code slot, and the behavior is not different.
As a hint, I am seeing some errors from the automation logs about not being able to Concat an int with a str, but it doesn’t narrow it down to a specific automation.  That being said I’ve never had that error on my own automations, and I know that some of the states in ozw are integers rather than strings.   Not sure if that helps.

I am using the zwave integration, not the ozw/mqtt design. The zwave integration still uses OpenZwave under the hood (1.4), and still produces a OZW_Log.txt file, which is what I’m references.
I ran a quick test with a never before used code slot, and the behavior is not different.
As a hint, I am seeing some errors from the automation logs about not being able to Concat an int with a str, but it doesn’t narrow it down to a specific automation.  That being said I’ve never had that error on my own automations, and I know that some of the states in ozw are integers rather than strings.   Not sure if that helps.

After a reboot, I now have better errors:
2021-01-12 18:24:22 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.005 seconds
2021-01-12 18:24:27 ERROR (MainThread) [custom_components.keymaster] Unexpected error fetching keymaster data: 'node_id'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 132, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/keymaster/__init__.py", line 416, in async_update_usercodes
    return await self.hass.async_add_executor_job(self.update_usercodes)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/keymaster/__init__.py", line 431, in update_usercodes
    node_id = get_node_id(self.hass, self._lock.lock_entity_id)
  File "/config/custom_components/keymaster/helpers.py", line 58, in get_node_id
    return state.attributes[ATTR_NODE_ID]
KeyError: 'node_id'
2021-01-12 18:24:27 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.005 seconds
2021-01-12 18:24:27 ERROR (MainThread) [custom_components.keymaster] Unexpected error fetching keymaster data: 'node_id'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 132, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/keymaster/__init__.py", line 416, in async_update_usercodes
    return await self.hass.async_add_executor_job(self.update_usercodes)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/keymaster/__init__.py", line 431, in update_usercodes
    node_id = get_node_id(self.hass, self._lock.lock_entity_id)
  File "/config/custom_components/keymaster/helpers.py", line 58, in get_node_id
    return state.attributes[ATTR_NODE_ID]
KeyError: 'node_id'

After a reboot, I now have better errors:
2021-01-12 18:24:22 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.005 seconds
2021-01-12 18:24:27 ERROR (MainThread) [custom_components.keymaster] Unexpected error fetching keymaster data: 'node_id'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 132, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/keymaster/__init__.py", line 416, in async_update_usercodes
    return await self.hass.async_add_executor_job(self.update_usercodes)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/keymaster/__init__.py", line 431, in update_usercodes
    node_id = get_node_id(self.hass, self._lock.lock_entity_id)
  File "/config/custom_components/keymaster/helpers.py", line 58, in get_node_id
    return state.attributes[ATTR_NODE_ID]
KeyError: 'node_id'
2021-01-12 18:24:27 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.005 seconds
2021-01-12 18:24:27 ERROR (MainThread) [custom_components.keymaster] Unexpected error fetching keymaster data: 'node_id'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 132, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/keymaster/__init__.py", line 416, in async_update_usercodes
    return await self.hass.async_add_executor_job(self.update_usercodes)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/keymaster/__init__.py", line 431, in update_usercodes
    node_id = get_node_id(self.hass, self._lock.lock_entity_id)
  File "/config/custom_components/keymaster/helpers.py", line 58, in get_node_id
    return state.attributes[ATTR_NODE_ID]
KeyError: 'node_id'

Thanks for the clarification.
That does help, I just pushed a fix for that (I hope) here: https://github.com/FutureTense/keymaster/pull/27. Try updating to the latest version of keymaster, regenerating your package files using the keymaster.generate_packages service, and then restarting your HA instance to pick up the change and see if that resolves things, although I don't think it's related to the primary issue you are having

Thanks for the clarification.
That does help, I just pushed a fix for that (I hope) here: https://github.com/FutureTense/keymaster/pull/27. Try updating to the latest version of keymaster, regenerating your package files using the keymaster.generate_packages service, and then restarting your HA instance to pick up the change and see if that resolves things, although I don't think it's related to the primary issue you are having

I updated last night - I dont think the concat issue is fixed, as I still have errors:
2021-01-13 08:35:55 ERROR (MainThread) [homeassistant.helpers.condition] Error during template condition: TypeError: can only concatenate str (not "int") to str

I updated last night - I dont think the concat issue is fixed, as I still have errors:
2021-01-13 08:35:55 ERROR (MainThread) [homeassistant.helpers.condition] Error during template condition: TypeError: can only concatenate str (not "int") to str

At some point you commented about a KeyError but it looks like it's deleted. Are you still seeing that error?
Regarding the string concatenation error, I can't see any other places where this error could occur. Can you confirm that you regenerated the package files and restarted HA to pick up the new package templates?

At some point you commented about a KeyError but it looks like it's deleted. Are you still seeing that error?
Regarding the string concatenation error, I can't see any other places where this error could occur. Can you confirm that you regenerated the package files and restarted HA to pick up the new package templates?

The KeyError was due to not having the zwave stick properly attached.
Disappeared when I put it back on the machine 🤪.
I did regen and restart.
On Wed, Jan 13, 2021 at 9:55 AM Raman Gupta<EMAIL_ADDRESS>wrote:

At some point you commented about a KeyError but it looks like it's
deleted. Are you still seeing that error?
Regarding the string concatenation error, I can't see any other places
where this error could occur. Can you confirm that you regenerated the
package files and restarted HA to pick up the new package templates?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/FutureTense/keymaster/issues/25#issuecomment-759616462,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOXCTDLKXNT3RHWB3OL7MTSZXNBZANCNFSM4V6QWG3Q
.

--
-- Matt

The KeyError was due to not having the zwave stick properly attached.
Disappeared when I put it back on the machine 🤪.
I did regen and restart.
On Wed, Jan 13, 2021 at 9:55 AM Raman Gupta<EMAIL_ADDRESS>wrote:

At some point you commented about a KeyError but it looks like it's
deleted. Are you still seeing that error?
Regarding the string concatenation error, I can't see any other places
where this error could occur. Can you confirm that you regenerated the
package files and restarted HA to pick up the new package templates?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/FutureTense/keymaster/issues/25#issuecomment-759616462,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOXCTDLKXNT3RHWB3OL7MTSZXNBZANCNFSM4V6QWG3Q
.

--
-- Matt

Yea, I passed in the lock name to the service call for both locks I have.
On Wed, Jan 13, 2021 at 10:04 AM Raman Gupta<EMAIL_ADDRESS>wrote:

Keep in mind that you need to pass lockname in as a parameter during the
service call, otherwise the service won't work.
I didn't have time to try getting the zwave integration up yesterday.
Will hopefully have time today so I can try to reproduce.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/FutureTense/keymaster/issues/25#issuecomment-759621656,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOXCTGDJXDB235MFQRO57DSZXOB7ANCNFSM4V6QWG3Q
.

--
-- Matt

Yea, I passed in the lock name to the service call for both locks I have.
On Wed, Jan 13, 2021 at 10:04 AM Raman Gupta<EMAIL_ADDRESS>wrote:

Keep in mind that you need to pass lockname in as a parameter during the
service call, otherwise the service won't work.
I didn't have time to try getting the zwave integration up yesterday.
Will hopefully have time today so I can try to reproduce.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/FutureTense/keymaster/issues/25#issuecomment-759621656,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOXCTGDJXDB235MFQRO57DSZXOB7ANCNFSM4V6QWG3Q
.

--
-- Matt

damn, I was hoping I'd find an easy fix that would get us past this. Will let you know what I find when I've had time to try to test this myself

damn, I was hoping I'd find an easy fix that would get us past this. Will let you know what I find when I've had time to try to test this myself

try the latest update. It looks like the service logic was wrong

try the latest update. It looks like the service logic was wrong

Does not appear to have corrected the issue.
I'm still seeing concatenation errors (after rerunning generate packages and restarting HA)

and it still isn't setting lock codes.  I clicked the 'enable' button on a net new code/untouched code slot where it says "HERE" in the logs:

Does not appear to have corrected the issue.
I'm still seeing concatenation errors (after rerunning generate packages and restarting HA)

and it still isn't setting lock codes.  I clicked the 'enable' button on a net new code/untouched code slot where it says "HERE" in the logs:

What lock brand/model are you using?

What lock brand/model are you using?

https://shopyalehome.com/collections/keypad-locks/products/yale-assure-lock-touchscreen?variant=28400473079908
^^ That lock (the Zwave Plus Variant).  Setting user codes via the standard method (Integrations Panel|Configure Zwave) works fine, and results in a flurry of messages about setting the code (as expected).
Upon enabling or disabling a code via keymaster (through the Enabled check in lovelace), no messages are generated in OZW_Log.txt, nor any indication in home_assistant.log that anything is being attempted even.

https://shopyalehome.com/collections/keypad-locks/products/yale-assure-lock-touchscreen?variant=28400473079908
^^ That lock (the Zwave Plus Variant).  Setting user codes via the standard method (Integrations Panel|Configure Zwave) works fine, and results in a flurry of messages about setting the code (as expected).
Upon enabling or disabling a code via keymaster (through the Enabled check in lovelace), no messages are generated in OZW_Log.txt, nor any indication in home_assistant.log that anything is being attempted even.

When you have debugging enabled do you see a entry: Attempting to call set_usercode... ?

When you have debugging enabled do you see a entry: Attempting to call set_usercode... ?

I do not:
config $ grep -c "Attempting to call" home-assistant.log
0
config $ grep -c "keymaster" home-assistant.log
67688
config $

I do not:
config $ grep -c "Attempting to call" home-assistant.log
0
config $ grep -c "keymaster" home-assistant.log
67688
config $

Thank you.

Thank you.

Some additional information:
If I manually run the syncronize_codeslot automation, the errors show up:
2021-01-18 08:56:43 INFO (MainThread) [homeassistant.components.automation.synchronize_codeslot_frontdoor_1] synchronize_codeslot_frontdoor_1: Running automation actions
2021-01-18 08:56:43 INFO (MainThread) [homeassistant.components.automation.synchronize_codeslot_frontdoor_1] synchronize_codeslot_frontdoor_1: Choose at step 1: choice 1: Running automation actions
2021-01-18 08:56:43 INFO (MainThread) [homeassistant.components.automation.synchronize_codeslot_frontdoor_1] synchronize_codeslot_frontdoor_1: Choose at step 1: choice 1: Executing step call service
2021-01-18 08:56:43 DEBUG (MainThread) [custom_components.keymaster] Add Code service: <ServiceCall keymaster.add_code (c:e8b77b437967ab2e0ae5fe8508123bb1): entity_id=lock.front_door_lock_new_frontdoor, code_slot=1, usercode=9116>
2021-01-18 08:56:43 DEBUG (MainThread) [custom_components.keymaster.services] Attempting to call set_usercode...
2021-01-18 08:56:43 ERROR (MainThread) [homeassistant.components.automation.synchronize_codeslot_frontdoor_1] synchronize_codeslot_frontdoor_1: Choose at step 1: choice 1: Error executing script. Unexpected error for call_service at pos 1: A Z-Wave integration has not been configured for this Home Assistant instance
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 250, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 457, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1445, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1480, in _execute_service
    await handler.job.target(service_call)
  File "/config/custom_components/keymaster/__init__.py", line 157, in _add_code
    await add_code(hass, entity_id, code_slot, usercode)
  File "/config/custom_components/keymaster/services.py", line 99, in add_code
    raise ZWaveIntegrationNotConfiguredError
custom_components.keymaster.exceptions.ZWaveIntegrationNotConfiguredError: A Z-Wave integration has not been configured for this Home Assistant instance
2021-01-18 08:56:43 ERROR (MainThread) [homeassistant.components.automation.synchronize_codeslot_frontdoor_1] synchronize_codeslot_frontdoor_1: Error executing script. Unexpected error for choose at pos 1: A Z-Wave integration has not been configured for this Home Assistant instance
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 250, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 596, in _async_choose_step
    await self._async_run_script(script)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 670, in _async_run_script
    await self._async_run_long_action(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 419, in _async_run_long_action
    long_task.result()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1026, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 242, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 250, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 457, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1445, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1480, in _execute_service
    await handler.job.target(service_call)
  File "/config/custom_components/keymaster/__init__.py", line 157, in _add_code
    await add_code(hass, entity_id, code_slot, usercode)
  File "/config/custom_components/keymaster/services.py", line 99, in add_code
    raise ZWaveIntegrationNotConfiguredError
custom_components.keymaster.exceptions.ZWaveIntegrationNotConfiguredError: A Z-Wave integration has not been configured for this Home Assistant instance
2021-01-18 08:56:43 ERROR (MainThread) [homeassistant.components.automation.synchronize_codeslot_frontdoor_1] While executing automation automation.synchronize_codeslot_frontdoor_1
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 404, in async_trigger
    await self.action_script.async_run(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1026, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 242, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 250, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 596, in _async_choose_step
    await self._async_run_script(script)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 670, in _async_run_script
    await self._async_run_long_action(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 419, in _async_run_long_action
    long_task.result()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1026, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 242, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 250, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 457, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1445, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1480, in _execute_service
    await handler.job.target(service_call)
  File "/config/custom_components/keymaster/__init__.py", line 157, in _add_code
    await add_code(hass, entity_id, code_slot, usercode)
  File "/config/custom_components/keymaster/services.py", line 99, in add_code
    raise ZWaveIntegrationNotConfiguredError
custom_components.keymaster.exceptions.ZWaveIntegrationNotConfiguredError: A Z-Wave integration has not been configured for this Home Assistant instance

Some additional information:
If I manually run the syncronize_codeslot automation, the errors show up:
2021-01-18 08:56:43 INFO (MainThread) [homeassistant.components.automation.synchronize_codeslot_frontdoor_1] synchronize_codeslot_frontdoor_1: Running automation actions
2021-01-18 08:56:43 INFO (MainThread) [homeassistant.components.automation.synchronize_codeslot_frontdoor_1] synchronize_codeslot_frontdoor_1: Choose at step 1: choice 1: Running automation actions
2021-01-18 08:56:43 INFO (MainThread) [homeassistant.components.automation.synchronize_codeslot_frontdoor_1] synchronize_codeslot_frontdoor_1: Choose at step 1: choice 1: Executing step call service
2021-01-18 08:56:43 DEBUG (MainThread) [custom_components.keymaster] Add Code service: <ServiceCall keymaster.add_code (c:e8b77b437967ab2e0ae5fe8508123bb1): entity_id=lock.front_door_lock_new_frontdoor, code_slot=1, usercode=9116>
2021-01-18 08:56:43 DEBUG (MainThread) [custom_components.keymaster.services] Attempting to call set_usercode...
2021-01-18 08:56:43 ERROR (MainThread) [homeassistant.components.automation.synchronize_codeslot_frontdoor_1] synchronize_codeslot_frontdoor_1: Choose at step 1: choice 1: Error executing script. Unexpected error for call_service at pos 1: A Z-Wave integration has not been configured for this Home Assistant instance
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 250, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 457, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1445, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1480, in _execute_service
    await handler.job.target(service_call)
  File "/config/custom_components/keymaster/__init__.py", line 157, in _add_code
    await add_code(hass, entity_id, code_slot, usercode)
  File "/config/custom_components/keymaster/services.py", line 99, in add_code
    raise ZWaveIntegrationNotConfiguredError
custom_components.keymaster.exceptions.ZWaveIntegrationNotConfiguredError: A Z-Wave integration has not been configured for this Home Assistant instance
2021-01-18 08:56:43 ERROR (MainThread) [homeassistant.components.automation.synchronize_codeslot_frontdoor_1] synchronize_codeslot_frontdoor_1: Error executing script. Unexpected error for choose at pos 1: A Z-Wave integration has not been configured for this Home Assistant instance
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 250, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 596, in _async_choose_step
    await self._async_run_script(script)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 670, in _async_run_script
    await self._async_run_long_action(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 419, in _async_run_long_action
    long_task.result()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1026, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 242, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 250, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 457, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1445, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1480, in _execute_service
    await handler.job.target(service_call)
  File "/config/custom_components/keymaster/__init__.py", line 157, in _add_code
    await add_code(hass, entity_id, code_slot, usercode)
  File "/config/custom_components/keymaster/services.py", line 99, in add_code
    raise ZWaveIntegrationNotConfiguredError
custom_components.keymaster.exceptions.ZWaveIntegrationNotConfiguredError: A Z-Wave integration has not been configured for this Home Assistant instance
2021-01-18 08:56:43 ERROR (MainThread) [homeassistant.components.automation.synchronize_codeslot_frontdoor_1] While executing automation automation.synchronize_codeslot_frontdoor_1
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 404, in async_trigger
    await self.action_script.async_run(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1026, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 242, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 250, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 596, in _async_choose_step
    await self._async_run_script(script)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 670, in _async_run_script
    await self._async_run_long_action(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 419, in _async_run_long_action
    long_task.result()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1026, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 242, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 250, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 457, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1445, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1480, in _execute_service
    await handler.job.target(service_call)
  File "/config/custom_components/keymaster/__init__.py", line 157, in _add_code
    await add_code(hass, entity_id, code_slot, usercode)
  File "/config/custom_components/keymaster/services.py", line 99, in add_code
    raise ZWaveIntegrationNotConfiguredError
custom_components.keymaster.exceptions.ZWaveIntegrationNotConfiguredError: A Z-Wave integration has not been configured for this Home Assistant instance

Chiming in to say I am getting the same exceptions as the OP.  Using the OG zwave integration as well

Chiming in to say I am getting the same exceptions as the OP.  Using the OG zwave integration as well

So you both are getting A Z-Wave integration has not been configured for this Home Assistant instance ?

So you both are getting A Z-Wave integration has not been configured for this Home Assistant instance ?

Yes. To add to that, I just did a restart, and saw this in my log:
2021-01-18 10:45:44 ERROR (MainThread) [custom_components.keymaster] Unexpected error fetching keymaster data: 'node_id' Traceback (most recent call last):   File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh     self.data = await self._async_update_data()   File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 132, in _async_update_data     return await self.update_method()   File "/config/custom_components/keymaster/__init__.py", line 420, in async_update_usercodes     return await self.hass.async_add_executor_job(self.update_usercodes)   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run     result = self.fn(*self.args, **self.kwargs)   File "/config/custom_components/keymaster/__init__.py", line 435, in update_usercodes     node_id = get_node_id(self.hass, self._lock.lock_entity_id)   File "/config/custom_components/keymaster/helpers.py", line 58, in get_node_id     return state.attributes[ATTR_NODE_ID] KeyError: 'node_id' 2021-01-18 10:45:44 ERROR (MainThread) [custom_components.keymaster] Unexpected error fetching keymaster data: 'node_id' Traceback (most recent call last):   File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh     self.data = await self._async_update_data()   File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 132, in _async_update_data     return await self.update_method()   File "/config/custom_components/keymaster/__init__.py", line 420, in async_update_usercodes     return await self.hass.async_add_executor_job(self.update_usercodes)   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run     result = self.fn(*self.args, **self.kwargs)   File "/config/custom_components/keymaster/__init__.py", line 435, in update_usercodes     node_id = get_node_id(self.hass, self._lock.lock_entity_id)   File "/config/custom_components/keymaster/helpers.py", line 58, in get_node_id     return state.attributes[ATTR_NODE_ID] KeyError: 'node_id'
Based on the timestamp it seems like zwave hadn't fully started yet. The allow_automation input boolean was not set until nearly 5 minutes afterwards

Yes. To add to that, I just did a restart, and saw this in my log:
2021-01-18 10:45:44 ERROR (MainThread) [custom_components.keymaster] Unexpected error fetching keymaster data: 'node_id' Traceback (most recent call last):   File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh     self.data = await self._async_update_data()   File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 132, in _async_update_data     return await self.update_method()   File "/config/custom_components/keymaster/__init__.py", line 420, in async_update_usercodes     return await self.hass.async_add_executor_job(self.update_usercodes)   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run     result = self.fn(*self.args, **self.kwargs)   File "/config/custom_components/keymaster/__init__.py", line 435, in update_usercodes     node_id = get_node_id(self.hass, self._lock.lock_entity_id)   File "/config/custom_components/keymaster/helpers.py", line 58, in get_node_id     return state.attributes[ATTR_NODE_ID] KeyError: 'node_id' 2021-01-18 10:45:44 ERROR (MainThread) [custom_components.keymaster] Unexpected error fetching keymaster data: 'node_id' Traceback (most recent call last):   File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh     self.data = await self._async_update_data()   File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 132, in _async_update_data     return await self.update_method()   File "/config/custom_components/keymaster/__init__.py", line 420, in async_update_usercodes     return await self.hass.async_add_executor_job(self.update_usercodes)   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run     result = self.fn(*self.args, **self.kwargs)   File "/config/custom_components/keymaster/__init__.py", line 435, in update_usercodes     node_id = get_node_id(self.hass, self._lock.lock_entity_id)   File "/config/custom_components/keymaster/helpers.py", line 58, in get_node_id     return state.attributes[ATTR_NODE_ID] KeyError: 'node_id'
Based on the timestamp it seems like zwave hadn't fully started yet. The allow_automation input boolean was not set until nearly 5 minutes afterwards

I get those same errors until zwave starts up.
On Mon, Jan 18, 2021 at 11:11 AM tankdeer<EMAIL_ADDRESS>wrote:

Yes. To add to that, I just did a restart, and saw this in my log:
2021-01-18 10:45:44 ERROR (MainThread) [custom_components.keymaster]
Unexpected error fetching keymaster data: 'node_id' Traceback (most recent
call last): File
"/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line
144, in async_refresh self.data = await self._async_update_data() File
"/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line
132, in _async_update_data return await self.update_method() File
"/config/custom_components/keymaster/init.py", line 420, in
async_update_usercodes return await
self.hass.async_add_executor_job(self.update_usercodes) File
"/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs) File
"/config/custom_components/keymaster/init.py", line 435, in
update_usercodes node_id = get_node_id(self.hass,
self._lock.lock_entity_id) File
"/config/custom_components/keymaster/helpers.py", line 58, in get_node_id
return state.attributes[ATTR_NODE_ID] KeyError: 'node_id' 2021-01-18
10:45:44 ERROR (MainThread) [custom_components.keymaster] Unexpected error
fetching keymaster data: 'node_id' Traceback (most recent call last): File
"/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line
144, in async_refresh self.data = await self._async_update_data() File
"/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line
132, in _async_update_data return await self.update_method() File
"/config/custom_components/keymaster/init.py", line 420, in
async_update_usercodes return await
self.hass.async_add_executor_job(self.update_usercodes) File
"/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs) File
"/config/custom_components/keymaster/init.py", line 435, in
update_usercodes node_id = get_node_id(self.hass,
self._lock.lock_entity_id) File
"/config/custom_components/keymaster/helpers.py", line 58, in get_node_id
return state.attributes[ATTR_NODE_ID] KeyError: 'node_id'
Based on the timestamp it seems like zwave hadn't fully started yet. The
allow_automation input boolean was not set until nearly 5 minutes
afterwards
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/FutureTense/keymaster/issues/25#issuecomment-762426897,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOXCTAVUSJKER2LZWPLTYLS2SBU3ANCNFSM4V6QWG3Q
.

--
-- Matt

I get those same errors until zwave starts up.
On Mon, Jan 18, 2021 at 11:11 AM tankdeer<EMAIL_ADDRESS>wrote:

Yes. To add to that, I just did a restart, and saw this in my log:
2021-01-18 10:45:44 ERROR (MainThread) [custom_components.keymaster]
Unexpected error fetching keymaster data: 'node_id' Traceback (most recent
call last): File
"/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line
144, in async_refresh self.data = await self._async_update_data() File
"/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line
132, in _async_update_data return await self.update_method() File
"/config/custom_components/keymaster/init.py", line 420, in
async_update_usercodes return await
self.hass.async_add_executor_job(self.update_usercodes) File
"/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs) File
"/config/custom_components/keymaster/init.py", line 435, in
update_usercodes node_id = get_node_id(self.hass,
self._lock.lock_entity_id) File
"/config/custom_components/keymaster/helpers.py", line 58, in get_node_id
return state.attributes[ATTR_NODE_ID] KeyError: 'node_id' 2021-01-18
10:45:44 ERROR (MainThread) [custom_components.keymaster] Unexpected error
fetching keymaster data: 'node_id' Traceback (most recent call last): File
"/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line
144, in async_refresh self.data = await self._async_update_data() File
"/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line
132, in _async_update_data return await self.update_method() File
"/config/custom_components/keymaster/init.py", line 420, in
async_update_usercodes return await
self.hass.async_add_executor_job(self.update_usercodes) File
"/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs) File
"/config/custom_components/keymaster/init.py", line 435, in
update_usercodes node_id = get_node_id(self.hass,
self._lock.lock_entity_id) File
"/config/custom_components/keymaster/helpers.py", line 58, in get_node_id
return state.attributes[ATTR_NODE_ID] KeyError: 'node_id'
Based on the timestamp it seems like zwave hadn't fully started yet. The
allow_automation input boolean was not set until nearly 5 minutes
afterwards
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/FutureTense/keymaster/issues/25#issuecomment-762426897,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOXCTAVUSJKER2LZWPLTYLS2SBU3ANCNFSM4V6QWG3Q
.

--
-- Matt

Does the problem persist after zwave has fully loaded?

Does the problem persist after zwave has fully loaded?

The node_id errors disappear after the zwave integration becomes ready.
On Tue, Jan 19, 2021 at 1:53 PM Chris<EMAIL_ADDRESS>wrote:

Does the problem persist after zwave has fully loaded?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/FutureTense/keymaster/issues/25#issuecomment-763165813,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOXCTFRCPAUKLAKQ2H7SR3S2X5O7ANCNFSM4V6QWG3Q
.

--
-- Matt

The node_id errors disappear after the zwave integration becomes ready.
On Tue, Jan 19, 2021 at 1:53 PM Chris<EMAIL_ADDRESS>wrote:

Does the problem persist after zwave has fully loaded?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/FutureTense/keymaster/issues/25#issuecomment-763165813,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOXCTFRCPAUKLAKQ2H7SR3S2X5O7ANCNFSM4V6QWG3Q
.

--
-- Matt

And after zwave has become ready are you able to add/remove codes?

And after zwave has become ready are you able to add/remove codes?

In my case, no.
The node_id errors appear during startup.
The ZWaveIntegrationNotConfiguredError errors appear when trying to synchronize the code slots (after zwave has started).
I've only  had it installed a few days but at no point have I ever been able to add/remove/sync codes.

In my case, no.
The node_id errors appear during startup.
The ZWaveIntegrationNotConfiguredError errors appear when trying to synchronize the code slots (after zwave has started).
I've only  had it installed a few days but at no point have I ever been able to add/remove/sync codes.

The node_id errors appear during startup.
The ZWaveIntegrationNotConfiguredError errors appear when trying to synchronize the code slots (after zwave has started).

Your issue is different, please create a separate issue. Thanks.

The node_id errors appear during startup.
The ZWaveIntegrationNotConfiguredError errors appear when trying to synchronize the code slots (after zwave has started).

Your issue is different, please create a separate issue. Thanks.

The node_id errors appear during startup.
The ZWaveIntegrationNotConfiguredError errors appear when trying to synchronize the code slots (after zwave has started).

Your issue is different, please create a separate issue. Thanks.

You sure? I am receiving the same exceptions that the OP is, and I can't set any codes

The node_id errors appear during startup.
The ZWaveIntegrationNotConfiguredError errors appear when trying to synchronize the code slots (after zwave has started).

Your issue is different, please create a separate issue. Thanks.

You sure? I am receiving the same exceptions that the OP is, and I can't set any codes

I'm in this boat, too. I have a Schlage, and I'm getting the same errors:
Unexpected error fetching keymaster data:

In my case, it's just blank after data:; the node_id part isn't there for me. After zwave starts up, it appears to not print that warning for me anymore (I get the regular Finished fetching keymaster data in 0.001 seconds messages.)
If I try a manual code synchronization, I also get the instance error:
Choose at step 1: choice 1: Error executing script. Unexpected error for call_service at pos 1: A Z-Wave integration has not been configured for this Home Assistant instance

Doesn't look like I can set or reset any codes. The state of each code is always in either a "Connecting" or "Disconnecting" status.

I'm in this boat, too. I have a Schlage, and I'm getting the same errors:
Unexpected error fetching keymaster data:

In my case, it's just blank after data:; the node_id part isn't there for me. After zwave starts up, it appears to not print that warning for me anymore (I get the regular Finished fetching keymaster data in 0.001 seconds messages.)
If I try a manual code synchronization, I also get the instance error:
Choose at step 1: choice 1: Error executing script. Unexpected error for call_service at pos 1: A Z-Wave integration has not been configured for this Home Assistant instance

Doesn't look like I can set or reset any codes. The state of each code is always in either a "Connecting" or "Disconnecting" status.

@raman325 perhaps there's a status in zwave we could monitor to assure the network's ready as well?
I'll have a look in the morning myself as well.

@raman325 perhaps there's a status in zwave we could monitor to assure the network's ready as well?
I'll have a look in the morning myself as well.

we can watch this event: https://github.com/home-assistant/core/blob/dev/homeassistant/components/zwave/init.py#L588

we can watch this event: https://github.com/home-assistant/core/blob/dev/homeassistant/components/zwave/init.py#L588

For what it's worth, I updated to the latest changes and regenerated everything and I'm still getting the same errors and not able to set a usercode.

For what it's worth, I updated to the latest changes and regenerated everything and I'm still getting the same errors and not able to set a usercode.

I think I figured out the issue. We check for if the zwave domain is in hass.data but I don't see any logic in the zwave integration that sets that. We can check for another key to figure out if zwave is set

I think I figured out the issue. We check for if the zwave domain is in hass.data but I don't see any logic in the zwave integration that sets that. We can check for another key to figure out if zwave is set

Please note when you update to the latest version of keymaster that some things have changed. In addition to regenerating your package files, you will need to re-add the pre-installation file from here: https://github.com/FutureTense/keymaster/wiki/Pre-Installation-Steps-(IMPORTANT) since the automation names have changed.

can you check the user code sensors? are you getting any data for them?

can you check the user code sensors? are you getting any data for them?

Doesn't look like it:
2021-01-21 01:26:15 DEBUG (MainThread) [custom_components.keymaster] Add Code service: <ServiceCall keymaster.add_code (c:efdbc9f35346f22e742857278f78d76b): entity_id=lock.front_door, code_slot=1, usercode=1234>
2021-01-21 01:26:15 DEBUG (MainThread) [custom_components.keymaster.services] Attempting to call set_usercode...

...then it seems to retrieve what the current code in that slot is:
2021-01-21 01:26:23 DEBUG (SyncWorker_5) [custom_components.keymaster] DEBUG: Code slot 1 value: <CURRENT_CODE>

Doesn't look like it:
2021-01-21 01:26:15 DEBUG (MainThread) [custom_components.keymaster] Add Code service: <ServiceCall keymaster.add_code (c:efdbc9f35346f22e742857278f78d76b): entity_id=lock.front_door, code_slot=1, usercode=1234>
2021-01-21 01:26:15 DEBUG (MainThread) [custom_components.keymaster.services] Attempting to call set_usercode...

...then it seems to retrieve what the current code in that slot is:
2021-01-21 01:26:23 DEBUG (SyncWorker_5) [custom_components.keymaster] DEBUG: Code slot 1 value: <CURRENT_CODE>

(And when I try to set it I still get the error:)
2021-01-21 01:29:23 ERROR (MainThread) [homeassistant.helpers.condition] Error during template condition: TypeError: can only concatenate str (not "list") to str

(And when I try to set it I still get the error:)
2021-01-21 01:29:23 ERROR (MainThread) [homeassistant.helpers.condition] Error during template condition: TypeError: can only concatenate str (not "list") to str

sorry, so are you saying that sensor.<lock_name>_code_slot_1 does have a value set for it? Or does it not? The debug statement that logs the current code implies that its set, but if you aren't seeing it in the sensor then perhaps there is an issue with the data being passed to the sensor.

sorry, so are you saying that sensor.<lock_name>_code_slot_1 does have a value set for it? Or does it not? The debug statement that logs the current code implies that its set, but if you aren't seeing it in the sensor then perhaps there is an issue with the data being passed to the sensor.

I made progress on the template error. Pushing a fix.

I made progress on the template error. Pushing a fix.

Oooh, I see what you mean now. Yes, since the recent changes it does have a value now.

Oooh, I see what you mean now. Yes, since the recent changes it does have a value now.

OK try clicking on "Update Information" on the keymaster card in HACS so it grabs the latest update, then try pulling it down and regenerating, it should eliminate the template error. Then try disabling the slot so it gets cleared, then re-enabling it, and see if it will connect.

OK try clicking on "Update Information" on the keymaster card in HACS so it grabs the latest update, then try pulling it down and regenerating, it should eliminate the template error. Then try disabling the slot so it gets cleared, then re-enabling it, and see if it will connect.

the action I am referring to:

the action I am referring to:

Yes! It basically works!
The code gets reset, set, changed, and everything correctly. The only reason I include "basically" is because when I initially set the code it correctly sets the "PIN synchronized" bool to on, and I think that does everything correctly (and is in the Disconnected state). When I flip the toggle to enable the new code, it stays in the Connecting state. But again, it seems to be updating the code correctly, so that's all good- just the UI confusion now.
(Also thanks to you and everyone who works on this- all the smart locks are really complicated, and trying to shoehorn all the support in one plugin is a big feat; much appreciated!)

Yes! It basically works!
The code gets reset, set, changed, and everything correctly. The only reason I include "basically" is because when I initially set the code it correctly sets the "PIN synchronized" bool to on, and I think that does everything correctly (and is in the Disconnected state). When I flip the toggle to enable the new code, it stays in the Connecting state. But again, it seems to be updating the code correctly, so that's all good- just the UI confusion now.
(Also thanks to you and everyone who works on this- all the smart locks are really complicated, and trying to shoehorn all the support in one plugin is a big feat; much appreciated!)

Ok. I think I am in the same boat. Re: basically working. Same UI issues as @holman, and it did actually set the PIN
I did have some issues with the generation though. I am not sure if they are related to the most recent submissions or not. I have two locks. One appeared to generate fine, the other didn't. None of the yaml for the second was generated at all. In fact, it hasn't changed since installation. No errors or debug in the log when doing so
Upon restarting, I still seem to get one error regarding node_id. I can only assume it's for the lock that I can't regenerate code for:
2021-01-20 18:11:28 ERROR (MainThread) [custom_components.keymaster] Unexpected error fetching keymaster data: 'node_id'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 132, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/keymaster/__init__.py", line 427, in async_update_usercodes
    return await self.hass.async_add_executor_job(self.update_usercodes)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/keymaster/__init__.py", line 442, in update_usercodes
    node_id = get_node_id(self.hass, self._lock.lock_entity_id)
  File "/config/custom_components/keymaster/helpers.py", line 58, in get_node_id
    return state.attributes[ATTR_NODE_ID]
KeyError: 'node_id'

Right after, I receive these errors, which are definitely new
2021-01-20 18:14:57 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/keymaster/__init__.py", line 221, in async_entity_state_listener
    handle_state_change(hass, config_entry, changed_entity, old_state, new_state)
  File "/config/custom_components/keymaster/helpers.py", line 201, in handle_state_change
    and dt.utcnow() - alarm_type_state.last_changed.replace(tzinfo=None)
TypeError: can't subtract offset-naive and offset-aware datetimes
2021-01-20 18:15:19 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/keymaster/__init__.py", line 221, in async_entity_state_listener
    handle_state_change(hass, config_entry, changed_entity, old_state, new_state)
  File "/config/custom_components/keymaster/helpers.py", line 201, in handle_state_change
    and dt.utcnow() - alarm_type_state.last_changed.replace(tzinfo=None)
TypeError: can't subtract offset-naive and offset-aware datetimes
2021-01-20 18:15:20 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/keymaster/__init__.py", line 221, in async_entity_state_listener
    handle_state_change(hass, config_entry, changed_entity, old_state, new_state)
  File "/config/custom_components/keymaster/helpers.py", line 201, in handle_state_change
    and dt.utcnow() - alarm_type_state.last_changed.replace(tzinfo=None)
TypeError: can't subtract offset-naive and offset-aware datetimes
2021-01-20 18:15:54 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/keymaster/__init__.py", line 221, in async_entity_state_listener
    handle_state_change(hass, config_entry, changed_entity, old_state, new_state)
  File "/config/custom_components/keymaster/helpers.py", line 201, in handle_state_change
    and dt.utcnow() - alarm_type_state.last_changed.replace(tzinfo=None)
TypeError: can't subtract offset-naive and offset-aware datetimes
2021-01-20 18:15:55 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/keymaster/__init__.py", line 221, in async_entity_state_listener
    handle_state_change(hass, config_entry, changed_entity, old_state, new_state)
  File "/config/custom_components/keymaster/helpers.py", line 201, in handle_state_change
    and dt.utcnow() - alarm_type_state.last_changed.replace(tzinfo=None)
TypeError: can't subtract offset-naive and offset-aware datetimes

Lastly, I was testing the lock that does work, and figured I would test the notifications. Looks like maybe the codegen for that one didn't fully work either, as the script is in fact missing:
2021-01-20 18:35:38 ERROR (MainThread) [homeassistant.components.automation.garage_side_door_user_notifications] garage_side_door User Notifications: Error executing script. Service not found for call_service at pos 1: Unable to find service script.garage_side_door_manual_notify
2021-01-20 18:35:38 ERROR (MainThread) [homeassistant.components.automation.garage_side_door_user_notifications] While executing automation automation.garage_side_door_user_notifications
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 404, in async_trigger
    await self.action_script.async_run(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1026None, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 242, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 250, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 460, in _async_call_service_step
    await self._async_run_long_action(service_task)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 419, in _async_run_long_action
    long_task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1395, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Unable to find service script.garage_side_door_manual_notify

Good progress though, and as mentioned, it's definitely appreciated.

Ok. I think I am in the same boat. Re: basically working. Same UI issues as @holman, and it did actually set the PIN
I did have some issues with the generation though. I am not sure if they are related to the most recent submissions or not. I have two locks. One appeared to generate fine, the other didn't. None of the yaml for the second was generated at all. In fact, it hasn't changed since installation. No errors or debug in the log when doing so
Upon restarting, I still seem to get one error regarding node_id. I can only assume it's for the lock that I can't regenerate code for:
2021-01-20 18:11:28 ERROR (MainThread) [custom_components.keymaster] Unexpected error fetching keymaster data: 'node_id'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 144, in async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 132, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/keymaster/__init__.py", line 427, in async_update_usercodes
    return await self.hass.async_add_executor_job(self.update_usercodes)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/keymaster/__init__.py", line 442, in update_usercodes
    node_id = get_node_id(self.hass, self._lock.lock_entity_id)
  File "/config/custom_components/keymaster/helpers.py", line 58, in get_node_id
    return state.attributes[ATTR_NODE_ID]
KeyError: 'node_id'

Right after, I receive these errors, which are definitely new
2021-01-20 18:14:57 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/keymaster/__init__.py", line 221, in async_entity_state_listener
    handle_state_change(hass, config_entry, changed_entity, old_state, new_state)
  File "/config/custom_components/keymaster/helpers.py", line 201, in handle_state_change
    and dt.utcnow() - alarm_type_state.last_changed.replace(tzinfo=None)
TypeError: can't subtract offset-naive and offset-aware datetimes
2021-01-20 18:15:19 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/keymaster/__init__.py", line 221, in async_entity_state_listener
    handle_state_change(hass, config_entry, changed_entity, old_state, new_state)
  File "/config/custom_components/keymaster/helpers.py", line 201, in handle_state_change
    and dt.utcnow() - alarm_type_state.last_changed.replace(tzinfo=None)
TypeError: can't subtract offset-naive and offset-aware datetimes
2021-01-20 18:15:20 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/keymaster/__init__.py", line 221, in async_entity_state_listener
    handle_state_change(hass, config_entry, changed_entity, old_state, new_state)
  File "/config/custom_components/keymaster/helpers.py", line 201, in handle_state_change
    and dt.utcnow() - alarm_type_state.last_changed.replace(tzinfo=None)
TypeError: can't subtract offset-naive and offset-aware datetimes
2021-01-20 18:15:54 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/keymaster/__init__.py", line 221, in async_entity_state_listener
    handle_state_change(hass, config_entry, changed_entity, old_state, new_state)
  File "/config/custom_components/keymaster/helpers.py", line 201, in handle_state_change
    and dt.utcnow() - alarm_type_state.last_changed.replace(tzinfo=None)
TypeError: can't subtract offset-naive and offset-aware datetimes
2021-01-20 18:15:55 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/keymaster/__init__.py", line 221, in async_entity_state_listener
    handle_state_change(hass, config_entry, changed_entity, old_state, new_state)
  File "/config/custom_components/keymaster/helpers.py", line 201, in handle_state_change
    and dt.utcnow() - alarm_type_state.last_changed.replace(tzinfo=None)
TypeError: can't subtract offset-naive and offset-aware datetimes

Lastly, I was testing the lock that does work, and figured I would test the notifications. Looks like maybe the codegen for that one didn't fully work either, as the script is in fact missing:
2021-01-20 18:35:38 ERROR (MainThread) [homeassistant.components.automation.garage_side_door_user_notifications] garage_side_door User Notifications: Error executing script. Service not found for call_service at pos 1: Unable to find service script.garage_side_door_manual_notify
2021-01-20 18:35:38 ERROR (MainThread) [homeassistant.components.automation.garage_side_door_user_notifications] While executing automation automation.garage_side_door_user_notifications
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 404, in async_trigger
    await self.action_script.async_run(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1026None, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 242, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 250, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 460, in _async_call_service_step
    await self._async_run_long_action(service_task)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 419, in _async_run_long_action
    long_task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1395, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Unable to find service script.garage_side_door_manual_notify

Good progress though, and as mentioned, it's definitely appreciated.

I need to look more into why your sensor never gets to the "Connected" state like mine does. The good news it appears that everything is functional except the status which is just there for your peace of mind.
@tankdeer -
Issue 1 - do you see this error over and over or just at the beginning? There appears to be a timing issue with when we attempt to get data and when the zwave data becomes available, but that should be OK and it should recover quickly and stop failing once HA has started.
Issue 2 - I think I have a fix for this which i am pushing shortly. Let me know if it helps because I don't have this error on my system so it must be a difference in our configs.
Issue 3 - this is expected, see here for an example of how to create the manual_notify script for your needs: https://github.com/FutureTense/keymaster/wiki/Notification-Example-Script. The crux of the problem with notify is that you need to specify the notify service and payload since they differ depending on what you use.
Finally, regarding the file generation, you will need to trigger the generation manually using the keymaster.generate_packages service as the integration isn't smart enough to know when it needs to regenerate them. When you call that service, be sure to pass the lock name (all lowercase and with underscores instead of spaces, basically what you see in the entity names). Let me know if that helps or if you are still having issues with this and we can try to troubleshoot further

I need to look more into why your sensor never gets to the "Connected" state like mine does. The good news it appears that everything is functional except the status which is just there for your peace of mind.
@tankdeer -
Issue 1 - do you see this error over and over or just at the beginning? There appears to be a timing issue with when we attempt to get data and when the zwave data becomes available, but that should be OK and it should recover quickly and stop failing once HA has started.
Issue 2 - I think I have a fix for this which i am pushing shortly. Let me know if it helps because I don't have this error on my system so it must be a difference in our configs.
Issue 3 - this is expected, see here for an example of how to create the manual_notify script for your needs: https://github.com/FutureTense/keymaster/wiki/Notification-Example-Script. The crux of the problem with notify is that you need to specify the notify service and payload since they differ depending on what you use.
Finally, regarding the file generation, you will need to trigger the generation manually using the keymaster.generate_packages service as the integration isn't smart enough to know when it needs to regenerate them. When you call that service, be sure to pass the lock name (all lowercase and with underscores instead of spaces, basically what you see in the entity names). Let me know if that helps or if you are still having issues with this and we can try to troubleshoot further

Thanks.
Issue 1 is just at the beginning
Issue 2. Great, thanks. I'll grab that most likely in the morning and test with it.
Issue 3. Duh, I should have seen that. For some reason I expected it to generate with a basic notify.notify that I would change or something, but didn't look in depth. My bad for reporting it.
I should have been more clear regarding the generation - I was manually triggering it for both locks, and passing the names. For one (garage_side_door), it generated fine. For the other (basement_door), it didn't do anything. The files are all still timestamped from 3 days ago. I tried moving them out of the way, and opening permissions all the way, just in case, and no change.

Thanks.
Issue 1 is just at the beginning
Issue 2. Great, thanks. I'll grab that most likely in the morning and test with it.
Issue 3. Duh, I should have seen that. For some reason I expected it to generate with a basic notify.notify that I would change or something, but didn't look in depth. My bad for reporting it.
I should have been more clear regarding the generation - I was manually triggering it for both locks, and passing the names. For one (garage_side_door), it generated fine. For the other (basement_door), it didn't do anything. The files are all still timestamped from 3 days ago. I tried moving them out of the way, and opening permissions all the way, just in case, and no change.

Issue 3. Duh, I should have seen that. For some reason I expected it to generate with a basic notify.notify that I would change or something

It was decided that this should be left out as the package files get overwritten, and who wants to keep re-writing their notification scripts every update right? 😛

Issue 3. Duh, I should have seen that. For some reason I expected it to generate with a basic notify.notify that I would change or something

It was decided that this should be left out as the package files get overwritten, and who wants to keep re-writing their notification scripts every update right? 😛

Issue 3. Duh, I should have seen that. For some reason I expected it to generate with a basic notify.notify that I would change or something

It was decided that this should be left out as the package files get overwritten, and who wants to keep re-writing their notification scripts every update right? 😛

Extremely good point, lol

Issue 3. Duh, I should have seen that. For some reason I expected it to generate with a basic notify.notify that I would change or something

It was decided that this should be left out as the package files get overwritten, and who wants to keep re-writing their notification scripts every update right? 😛

Extremely good point, lol

I should have been more clear regarding the generation - I was manually triggering it for both locks, and passing the names. For one (garage_side_door), it generated fine. For the other (basement_door), it didn't do anything. The files are all still timestamped from 3 days ago. I tried moving them out of the way, and opening permissions all the way, just in case, and no change.

You're good, I was just hoping that something wasn't broken. But I think I found the issue, another fix getting pushed shortly.

I should have been more clear regarding the generation - I was manually triggering it for both locks, and passing the names. For one (garage_side_door), it generated fine. For the other (basement_door), it didn't do anything. The files are all still timestamped from 3 days ago. I tried moving them out of the way, and opening permissions all the way, just in case, and no change.

You're good, I was just hoping that something wasn't broken. But I think I found the issue, another fix getting pushed shortly.

Yes! It basically works!
The code gets reset, set, changed, and everything correctly. The only reason I include "basically" is because when I initially set the code it correctly sets the "PIN synchronized" bool to on, and I think that does everything correctly (and is in the Disconnected state). When I flip the toggle to enable the new code, it stays in the Connecting state. But again, it seems to be updating the code correctly, so that's all good- just the UI confusion now.
(Also thanks to you and everyone who works on this- all the smart locks are really complicated, and trying to shoehorn all the support in one plugin is a big feat; much appreciated!)

so you see the PIN synchronized is on but Status still shows as Connecting?

Yes! It basically works!
The code gets reset, set, changed, and everything correctly. The only reason I include "basically" is because when I initially set the code it correctly sets the "PIN synchronized" bool to on, and I think that does everything correctly (and is in the Disconnected state). When I flip the toggle to enable the new code, it stays in the Connecting state. But again, it seems to be updating the code correctly, so that's all good- just the UI confusion now.
(Also thanks to you and everyone who works on this- all the smart locks are really complicated, and trying to shoehorn all the support in one plugin is a big feat; much appreciated!)

so you see the PIN synchronized is on but Status still shows as Connecting?

The “PIN is synchronized” only shows as on when I initially set the code.  And status stays “Connecting”.

The “PIN is synchronized” only shows as on when I initially set the code.  And status stays “Connecting”.

Got it, so the PIN is synchronized binary sensor is derived from the state of three other sensors:

sensor.<lock_name>_code_slot_<#> (the sensor that tracks the current value of the PIN on the lock)
input_text.<lock_name>_pin_<#> (the input text that you use to enter the PIN)
binary_sensor.<lock_name>_active_<#>
What we want to see is that the sensor and input_text entities have matching values for the PIN, and that the binary_sensor is on. Which one of these statements is not true in your case?

Got it, so the PIN is synchronized binary sensor is derived from the state of three other sensors:

sensor.<lock_name>_code_slot_<#> (the sensor that tracks the current value of the PIN on the lock)
input_text.<lock_name>_pin_<#> (the input text that you use to enter the PIN)
binary_sensor.<lock_name>_active_<#>
What we want to see is that the sensor and input_text entities have matching values for the PIN, and that the binary_sensor is on. Which one of these statements is not true in your case?

Ok. So I updated this morning, and regenerated everything. So much better. The UI seems to be accurate for me now, and I can set and change codes. However, it doesn't look like I can clear them. Not via the UI, or by calling keymaster.clear_code directly. The UI implies it's cleared, PIN is synchronized is set to true, and sensor.<lock_name>_code_slot_<#>'s state is blank. However, I can still lock and unlock the lock with that code I expect to be deleted.
Here is the log from calling the service
2021-01-21 10:32:22 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.026 seconds
2021-01-21 10:32:22 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.026 seconds
2021-01-21 10:32:22 DEBUG (MainThread) [custom_components.keymaster] Clear Code service: <ServiceCall keymaster.clear_code (c:35e4fd4fa4a61e4f5918e1d2cc2c89a3): entity_id=lock.garage_side_door, code_slot=5>
2021-01-21 10:32:22 DEBUG (MainThread) [custom_components.keymaster.services] Attempting to call clear_usercode...
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 255 value: 30
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 254 value: False
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 0 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 1 value: **********
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] Work around code in use.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] Utilizing BE469 work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 2 value: **********
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] Work around code in use.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] Utilizing FE599 work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 3 value: **********
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] Work around code in use.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] Utilizing BE469 work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 4 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 5 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 6 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 7 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 8 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 9 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 255 value: 30
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 254 value: False
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 0 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 1 value: **********
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Work around code in use.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Utilizing FE599 work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 2 value: **********
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Work around code in use.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Utilizing FE599 work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 3 value: **********
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Work around code in use.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Utilizing FE599 work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 4 value: **********
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Work around code in use.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Utilizing FE599 work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 5 value: **********
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Work around code in use.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 10 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 11 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 12 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 13 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 14 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 15 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 16 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 17 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 18 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 19 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 20 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 21 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 22 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 23 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 24 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 25 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 26 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 27 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 28 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 29 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 30 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Utilizing FE599 work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 6 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 7 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 8 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 9 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 10 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 11 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 12 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 13 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 14 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 15 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 16 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 17 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 18 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 19 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 20 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 21 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 22 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 23 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 24 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 25 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 26 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 27 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 28 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 29 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 30 value:
2021-01-21 10:32:27 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.021 seconds
2021-01-21 10:32:27 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.022 seconds

This brings up two semi-related follow up questions.

Should keymaster be trying to sync code slots that are not defined in the integration? I know the lock technically has 30 slots, but I only have the integration defined at 6, as that's plenty for my needs right now.
It's nice that PINs appear to be masked in the logs. But should they be in the UI? I played with the Hide PINs in UI? setting, and it didn't seem to have an effect. Maybe that's still a WiP?

Overall things are looking great. And again, all the hard work is appreciated.

Ok. So I updated this morning, and regenerated everything. So much better. The UI seems to be accurate for me now, and I can set and change codes. However, it doesn't look like I can clear them. Not via the UI, or by calling keymaster.clear_code directly. The UI implies it's cleared, PIN is synchronized is set to true, and sensor.<lock_name>_code_slot_<#>'s state is blank. However, I can still lock and unlock the lock with that code I expect to be deleted.
Here is the log from calling the service
2021-01-21 10:32:22 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.026 seconds
2021-01-21 10:32:22 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.026 seconds
2021-01-21 10:32:22 DEBUG (MainThread) [custom_components.keymaster] Clear Code service: <ServiceCall keymaster.clear_code (c:35e4fd4fa4a61e4f5918e1d2cc2c89a3): entity_id=lock.garage_side_door, code_slot=5>
2021-01-21 10:32:22 DEBUG (MainThread) [custom_components.keymaster.services] Attempting to call clear_usercode...
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 255 value: 30
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 254 value: False
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 0 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 1 value: **********
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] Work around code in use.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] Utilizing BE469 work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 2 value: **********
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] Work around code in use.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] Utilizing FE599 work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 3 value: **********
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] Work around code in use.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] Utilizing BE469 work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 4 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 5 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 6 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 7 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 8 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 9 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 255 value: 30
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 254 value: False
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 0 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 1 value: **********
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Work around code in use.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Utilizing FE599 work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 2 value: **********
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Work around code in use.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Utilizing FE599 work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 3 value: **********
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Work around code in use.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Utilizing FE599 work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 4 value: **********
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Work around code in use.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Utilizing FE599 work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 5 value: **********
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Ignoring code slot with * in value.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Work around code in use.
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 10 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 11 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 12 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 13 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 14 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 15 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 16 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 17 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 18 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 19 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 20 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 21 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 22 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 23 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 24 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 25 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 26 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 27 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 28 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 29 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_2) [custom_components.keymaster] DEBUG: Code slot 30 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] Utilizing FE599 work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 6 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Utilizing Zwave clear_usercode work around code.
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 7 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 8 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 9 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 10 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 11 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 12 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 13 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 14 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 15 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 16 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 17 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 18 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 19 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 20 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 21 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 22 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 23 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 24 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 25 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 26 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 27 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 28 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 29 value:
2021-01-21 10:32:27 DEBUG (SyncWorker_12) [custom_components.keymaster] DEBUG: Code slot 30 value:
2021-01-21 10:32:27 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.021 seconds
2021-01-21 10:32:27 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.022 seconds

This brings up two semi-related follow up questions.

Should keymaster be trying to sync code slots that are not defined in the integration? I know the lock technically has 30 slots, but I only have the integration defined at 6, as that's plenty for my needs right now.
It's nice that PINs appear to be masked in the logs. But should they be in the UI? I played with the Hide PINs in UI? setting, and it didn't seem to have an effect. Maybe that's still a WiP?

Overall things are looking great. And again, all the hard work is appreciated.

What we want to see is that the sensor and input_text entities have matching values for the PIN, and that the binary_sensor is on. Which one of these statements is not true in your case?

binary_sensor.front_door_active_1 is on.
input_text.front_door_pin_1 state is the correct code.
sensor.front_door_code_slot_1 has the correct code.
So... yeah not sure, hah.

What we want to see is that the sensor and input_text entities have matching values for the PIN, and that the binary_sensor is on. Which one of these statements is not true in your case?

binary_sensor.front_door_active_1 is on.
input_text.front_door_pin_1 state is the correct code.
sensor.front_door_code_slot_1 has the correct code.
So... yeah not sure, hah.

After updating to the latest release and regenerating everything, I can confirm that I'm also now able to read codes, set codes, etc.
I do see the same UI behavior others are seeing, but thats cosmetic.

After updating to the latest release and regenerating everything, I can confirm that I'm also now able to read codes, set codes, etc.
I do see the same UI behavior others are seeing, but thats cosmetic.

2. It's nice that PINs appear to be masked in the logs. But should they be in the UI? I played with the Hide PINs in UI? setting, and it didn't seem to have an effect. Maybe that's still a WiP?

No, this is why your lock will never have a true status, the PINs are completely masked and all states are assumed because of this. This is why you see the "work around" notes in the log.

2. It's nice that PINs appear to be masked in the logs. But should they be in the UI? I played with the Hide PINs in UI? setting, and it didn't seem to have an effect. Maybe that's still a WiP?

No, this is why your lock will never have a true status, the PINs are completely masked and all states are assumed because of this. This is why you see the "work around" notes in the log.

It's nice that PINs appear to be masked in the logs. But should they be in the UI? I played with the Hide PINs in UI? setting, and it didn't seem to have an effect. Maybe that's still a WiP?

No, this is why your lock will never have a true status, the PINs are completely masked and all states are assumed because of this. This is why you see the "work around" notes in the log.

I assume you mean that the masked PINs are coming from the lock itself. Is this why I can't clear codes as well? Because it doesn't know the old PIN?

It's nice that PINs appear to be masked in the logs. But should they be in the UI? I played with the Hide PINs in UI? setting, and it didn't seem to have an effect. Maybe that's still a WiP?

No, this is why your lock will never have a true status, the PINs are completely masked and all states are assumed because of this. This is why you see the "work around" notes in the log.

I assume you mean that the masked PINs are coming from the lock itself. Is this why I can't clear codes as well? Because it doesn't know the old PIN?

Is this why I can't clear codes as well? Because it doesn't know the old PIN?

No, they should clear. If you have a FE599 Schlage lock you're slot will always show *s in it.
I'm not 100% sure, but this might be from the Anti-Theif CC being enabled.
I know no way currently of disabling this via OZW.

Is this why I can't clear codes as well? Because it doesn't know the old PIN?

No, they should clear. If you have a FE599 Schlage lock you're slot will always show *s in it.
I'm not 100% sure, but this might be from the Anti-Theif CC being enabled.
I know no way currently of disabling this via OZW.

Is this why I can't clear codes as well? Because it doesn't know the old PIN?

No, they should clear. If you have a FE599 Schlage lock you're slot will always show *s in it.
I'm not 100% sure, but this might be from the Anti-Theif CC being enabled.
I know no way currently of disabling this via OZW.

It's actually a BE469. Not sure why it shows both models in the logs. Maybe the underlying architecture is the same, I dunno.
Being able to clear the codes seems to be the only issue outstanding

Is this why I can't clear codes as well? Because it doesn't know the old PIN?

No, they should clear. If you have a FE599 Schlage lock you're slot will always show *s in it.
I'm not 100% sure, but this might be from the Anti-Theif CC being enabled.
I know no way currently of disabling this via OZW.

It's actually a BE469. Not sure why it shows both models in the logs. Maybe the underlying architecture is the same, I dunno.
Being able to clear the codes seems to be the only issue outstanding

Sometimes OZW doesn't update the slot in a timely fashion either, that's another issue we've tried to guard against as well.

Sometimes OZW doesn't update the slot in a timely fashion either, that's another issue we've tried to guard against as well.

Is this why I can't clear codes as well? Because it doesn't know the old PIN?

No, they should clear. If you have a FE599 Schlage lock you're slot will always show *s in it.
I'm not 100% sure, but this might be from the Anti-Theif CC being enabled.
I know no way currently of disabling this via OZW.

It's actually a BE469. Not sure why it shows both models in the logs. Maybe the underlying architecture is the same, I dunno.
Being able to clear the codes seems to be the only issue outstanding

My BE469 also only shows *'s so I also use the workaround.

Should keymaster be trying to sync code slots that are not defined in the integration? I know the lock technically has 30 slots, but I only have the integration defined at 6, as that's plenty for my needs right now.

Didn't really see value in not querying for all of them, the data is all there and it has no impact on your lock battery.

Is this why I can't clear codes as well? Because it doesn't know the old PIN?

No, they should clear. If you have a FE599 Schlage lock you're slot will always show *s in it.
I'm not 100% sure, but this might be from the Anti-Theif CC being enabled.
I know no way currently of disabling this via OZW.

It's actually a BE469. Not sure why it shows both models in the logs. Maybe the underlying architecture is the same, I dunno.
Being able to clear the codes seems to be the only issue outstanding

My BE469 also only shows *'s so I also use the workaround.

Should keymaster be trying to sync code slots that are not defined in the integration? I know the lock technically has 30 slots, but I only have the integration defined at 6, as that's plenty for my needs right now.

Didn't really see value in not querying for all of them, the data is all there and it has no impact on your lock battery.

What we want to see is that the sensor and input_text entities have matching values for the PIN, and that the binary_sensor is on. Which one of these statements is not true in your case?

binary_sensor.front_door_active_1 is on.
input_text.front_door_pin_1 state is the correct code.
sensor.front_door_code_slot_1 has the correct code.
So... yeah not sure, hah.

OK so then the state update must not be triggering correctly. I will take a look and see if I can figure it out

What we want to see is that the sensor and input_text entities have matching values for the PIN, and that the binary_sensor is on. Which one of these statements is not true in your case?

binary_sensor.front_door_active_1 is on.
input_text.front_door_pin_1 state is the correct code.
sensor.front_door_code_slot_1 has the correct code.
So... yeah not sure, hah.

OK so then the state update must not be triggering correctly. I will take a look and see if I can figure it out

@holman @mcowger since you guys are both seeing the UI issue, please update to the latest and enable debug logs for keymaster. Then try switching a code slot from disabled to enabled. You should see a bunch of logs like follows:
Updating state for <entity>...
`

@holman @mcowger since you guys are both seeing the UI issue, please update to the latest and enable debug logs for keymaster. Then try switching a code slot from disabled to enabled. You should see a bunch of logs like follows:
Updating state for <entity>...
`

@tankdeer - please update to latest and try again. Usercodes can't be cleared from some locks in the zwave integration. Older versions of the code here had a workaround that just set the code to a random PIN to invalidate the existing code, but that workaround got missed in a refactor. Just added it back

@tankdeer - please update to latest and try again. Usercodes can't be cleared from some locks in the zwave integration. Older versions of the code here had a workaround that just set the code to a random PIN to invalidate the existing code, but that workaround got missed in a refactor. Just added it back

@raman325:
2021-01-22 18:57:56 DEBUG (SyncWorker_1) [custom_components.keymaster.sensor] State change for sensor.garage_door_connected_1 triggered by state change for binary_sensor.garage_door_active_1
2021-01-22 18:57:56 DEBUG (SyncWorker_1) [custom_components.keymaster.sensor] Updating state for sensor.garage_door_connected_1...
2021-01-22 18:57:56 DEBUG (SyncWorker_1) [custom_components.keymaster.sensor] Input state to output entity sensor.garage_door_connected_1 from input entity binary_sensor.garage_door_active_1 is True
2021-01-22 18:57:56 DEBUG (SyncWorker_1) [custom_components.keymaster.sensor] Input state to output entity sensor.garage_door_connected_1 from input entity binary_sensor.garage_door_pin_synched_1 is False
2021-01-22 18:57:56 DEBUG (SyncWorker_1) [custom_components.keymaster.sensor] Output state for sensor.garage_door_connected_1 is Connecting

There's a lot of other logs too- looks like it's maybe repeating a bunch of times? Not sure.  Since they're 4 digits I'm assuming they're programming codes maybe? A little surprising to see that there.

@raman325:
2021-01-22 18:57:56 DEBUG (SyncWorker_1) [custom_components.keymaster.sensor] State change for sensor.garage_door_connected_1 triggered by state change for binary_sensor.garage_door_active_1
2021-01-22 18:57:56 DEBUG (SyncWorker_1) [custom_components.keymaster.sensor] Updating state for sensor.garage_door_connected_1...
2021-01-22 18:57:56 DEBUG (SyncWorker_1) [custom_components.keymaster.sensor] Input state to output entity sensor.garage_door_connected_1 from input entity binary_sensor.garage_door_active_1 is True
2021-01-22 18:57:56 DEBUG (SyncWorker_1) [custom_components.keymaster.sensor] Input state to output entity sensor.garage_door_connected_1 from input entity binary_sensor.garage_door_pin_synched_1 is False
2021-01-22 18:57:56 DEBUG (SyncWorker_1) [custom_components.keymaster.sensor] Output state for sensor.garage_door_connected_1 is Connecting

There's a lot of other logs too- looks like it's maybe repeating a bunch of times? Not sure.  Since they're 4 digits I'm assuming they're programming codes maybe? A little surprising to see that there.

@holman around the same time as first set of logs there, did you see the following statement:
State change for sensor.garage_door_pin_synched_1 triggered by state change for binary_sensor.garage_door_active_1
My worry is that there is some sort of race conflict going on for you guys that I am not seeing myself.
@tankdeer are you sure you updated to the latest before testing? You should see the following debug statement:
Setting code slot value to random PIN as workaround in case clearing code doesn't work

@holman around the same time as first set of logs there, did you see the following statement:
State change for sensor.garage_door_pin_synched_1 triggered by state change for binary_sensor.garage_door_active_1
My worry is that there is some sort of race conflict going on for you guys that I am not seeing myself.
@tankdeer are you sure you updated to the latest before testing? You should see the following debug statement:
Setting code slot value to random PIN as workaround in case clearing code doesn't work

I updated through HACS this morning, then restarted. Just checked again, clicked Update Information just in case. No additional updates available

I updated through HACS this morning, then restarted. Just checked again, clicked Update Information just in case. No additional updates available

are you using the latest zwave asset file? https://github.com/FutureTense/keymaster/blob/main/assets/additional_yaml/zwave.yaml
This has changed along with the rest of the things but it is not automatically updated so you will need to manually update it if you haven't done so already.
You should see the garage_side_door_synchronize_codeslot_5 automation run at some point, and if you aren't seeing that but your asset file is updated, that means something is broken with the automation

are you using the latest zwave asset file? https://github.com/FutureTense/keymaster/blob/main/assets/additional_yaml/zwave.yaml
This has changed along with the rest of the things but it is not automatically updated so you will need to manually update it if you haven't done so already.
You should see the garage_side_door_synchronize_codeslot_5 automation run at some point, and if you aren't seeing that but your asset file is updated, that means something is broken with the automation

Yeah, I have the latest file installed.
I confirmed that garage_side_door_synchronize_codeslot_5 runs when I enable the code slot, but not when I disable it.

Yeah, I have the latest file installed.
I confirmed that garage_side_door_synchronize_codeslot_5 runs when I enable the code slot, but not when I disable it.

@holman around the same time as first set of logs there, did you see the following statement:
State change for sensor.garage_door_pin_synched_1 triggered by state change for binary_sensor.garage_door_active_1
My worry is that there is some sort of race conflict going on for you guys that I am not seeing on my install.

Yup:
2021-01-23 00:59:35 DEBUG (SyncWorker_13) [custom_components.keymaster.binary_sensor] State change for binary_sensor.garage_door_active_1 triggered by state change for input_boolean.garage_door_enabled_1
2021-01-23 00:59:35 DEBUG (SyncWorker_13) [custom_components.keymaster.binary_sensor] Updating state for binary_sensor.garage_door_active_1...
2021-01-23 00:59:35 DEBUG (SyncWorker_13) [custom_components.keymaster.binary_sensor] Input state to output entity binary_sensor.garage_door_active_1 from input entity `is slot active?` is True
2021-01-23 00:59:35 DEBUG (SyncWorker_13) [custom_components.keymaster.binary_sensor] Input state to output entity binary_sensor.garage_door_active_1 from input entity `is current day active?` is True
2021-01-23 00:59:35 DEBUG (SyncWorker_13) [custom_components.keymaster.binary_sensor] Input state to output entity binary_sensor.garage_door_active_1 from input entity `is current day within date range?` is True
2021-01-23 00:59:35 DEBUG (SyncWorker_13) [custom_components.keymaster.binary_sensor] Input state to output entity binary_sensor.garage_door_active_1 from input entity `is current time within time range?` is True
2021-01-23 00:59:35 DEBUG (SyncWorker_13) [custom_components.keymaster.binary_sensor] Input state to output entity binary_sensor.garage_door_active_1 from input entity `is access limit OK?` is True
2021-01-23 00:59:35 DEBUG (SyncWorker_13) [custom_components.keymaster.binary_sensor] Output state for binary_sensor.garage_door_active_1 is on
2021-01-23 00:59:35 DEBUG (SyncWorker_6) [custom_components.keymaster.binary_sensor] State change for binary_sensor.garage_door_pin_synched_1 triggered by state change for binary_sensor.garage_door_active_1
2021-01-23 00:59:35 DEBUG (SyncWorker_6) [custom_components.keymaster.binary_sensor] Updating state for binary_sensor.garage_door_pin_synched_1...
2021-01-23 00:59:35 DEBUG (SyncWorker_6) [custom_components.keymaster.binary_sensor] Input state to output entity binary_sensor.garage_door_pin_synched_1 from input entity input_text.garage_door_pin_1 is XXXXXXXX
2021-01-23 00:59:35 DEBUG (SyncWorker_6) [custom_components.keymaster.binary_sensor] Input state to output entity binary_sensor.garage_door_pin_synched_1 from input entity sensor.garage_door_code_slot_1 is AAAA

2021-01-23 00:59:35 DEBUG (SyncWorker_6) [custom_components.keymaster.binary_sensor] Input state to output entity binary_sensor.garage_door_pin_synched_1 from input entity binary_sensor.garage_door_active_1 is True
2021-01-23 00:59:35 DEBUG (SyncWorker_6) [custom_components.keymaster.binary_sensor] Output state for binary_sensor.garage_door_pin_synched_1 is off
2021-01-23 00:59:35 DEBUG (SyncWorker_10) [custom_components.keymaster.sensor] State change for sensor.garage_door_connected_1 triggered by state change for binary_sensor.garage_door_active_1
2021-01-23 00:59:35 DEBUG (SyncWorker_10) [custom_components.keymaster.sensor] Updating state for sensor.garage_door_connected_1...
2021-01-23 00:59:35 DEBUG (SyncWorker_10) [custom_components.keymaster.sensor] Input state to output entity sensor.garage_door_connected_1 from input entity binary_sensor.garage_door_active_1 is True
2021-01-23 00:59:35 DEBUG (SyncWorker_10) [custom_components.keymaster.sensor] Input state to output entity sensor.garage_door_connected_1 from input entity binary_sensor.garage_door_pin_synched_1 is False
2021-01-23 00:59:35 DEBUG (SyncWorker_10) [custom_components.keymaster.sensor] Output state for sensor.garage_door_connected_1 is Connecting

@holman around the same time as first set of logs there, did you see the following statement:
State change for sensor.garage_door_pin_synched_1 triggered by state change for binary_sensor.garage_door_active_1
My worry is that there is some sort of race conflict going on for you guys that I am not seeing on my install.

Yup:
2021-01-23 00:59:35 DEBUG (SyncWorker_13) [custom_components.keymaster.binary_sensor] State change for binary_sensor.garage_door_active_1 triggered by state change for input_boolean.garage_door_enabled_1
2021-01-23 00:59:35 DEBUG (SyncWorker_13) [custom_components.keymaster.binary_sensor] Updating state for binary_sensor.garage_door_active_1...
2021-01-23 00:59:35 DEBUG (SyncWorker_13) [custom_components.keymaster.binary_sensor] Input state to output entity binary_sensor.garage_door_active_1 from input entity `is slot active?` is True
2021-01-23 00:59:35 DEBUG (SyncWorker_13) [custom_components.keymaster.binary_sensor] Input state to output entity binary_sensor.garage_door_active_1 from input entity `is current day active?` is True
2021-01-23 00:59:35 DEBUG (SyncWorker_13) [custom_components.keymaster.binary_sensor] Input state to output entity binary_sensor.garage_door_active_1 from input entity `is current day within date range?` is True
2021-01-23 00:59:35 DEBUG (SyncWorker_13) [custom_components.keymaster.binary_sensor] Input state to output entity binary_sensor.garage_door_active_1 from input entity `is current time within time range?` is True
2021-01-23 00:59:35 DEBUG (SyncWorker_13) [custom_components.keymaster.binary_sensor] Input state to output entity binary_sensor.garage_door_active_1 from input entity `is access limit OK?` is True
2021-01-23 00:59:35 DEBUG (SyncWorker_13) [custom_components.keymaster.binary_sensor] Output state for binary_sensor.garage_door_active_1 is on
2021-01-23 00:59:35 DEBUG (SyncWorker_6) [custom_components.keymaster.binary_sensor] State change for binary_sensor.garage_door_pin_synched_1 triggered by state change for binary_sensor.garage_door_active_1
2021-01-23 00:59:35 DEBUG (SyncWorker_6) [custom_components.keymaster.binary_sensor] Updating state for binary_sensor.garage_door_pin_synched_1...
2021-01-23 00:59:35 DEBUG (SyncWorker_6) [custom_components.keymaster.binary_sensor] Input state to output entity binary_sensor.garage_door_pin_synched_1 from input entity input_text.garage_door_pin_1 is XXXXXXXX
2021-01-23 00:59:35 DEBUG (SyncWorker_6) [custom_components.keymaster.binary_sensor] Input state to output entity binary_sensor.garage_door_pin_synched_1 from input entity sensor.garage_door_code_slot_1 is AAAA

2021-01-23 00:59:35 DEBUG (SyncWorker_6) [custom_components.keymaster.binary_sensor] Input state to output entity binary_sensor.garage_door_pin_synched_1 from input entity binary_sensor.garage_door_active_1 is True
2021-01-23 00:59:35 DEBUG (SyncWorker_6) [custom_components.keymaster.binary_sensor] Output state for binary_sensor.garage_door_pin_synched_1 is off
2021-01-23 00:59:35 DEBUG (SyncWorker_10) [custom_components.keymaster.sensor] State change for sensor.garage_door_connected_1 triggered by state change for binary_sensor.garage_door_active_1
2021-01-23 00:59:35 DEBUG (SyncWorker_10) [custom_components.keymaster.sensor] Updating state for sensor.garage_door_connected_1...
2021-01-23 00:59:35 DEBUG (SyncWorker_10) [custom_components.keymaster.sensor] Input state to output entity sensor.garage_door_connected_1 from input entity binary_sensor.garage_door_active_1 is True
2021-01-23 00:59:35 DEBUG (SyncWorker_10) [custom_components.keymaster.sensor] Input state to output entity sensor.garage_door_connected_1 from input entity binary_sensor.garage_door_pin_synched_1 is False
2021-01-23 00:59:35 DEBUG (SyncWorker_10) [custom_components.keymaster.sensor] Output state for sensor.garage_door_connected_1 is Connecting

@tankdeer are you comfortable manually copying the integration into your custom components folder? If so, try this branch https://github.com/raman325/keymaster/tree/code_slot_auto_in_code (make sure you pull this branch in particular) and regenerate your package files, see if that resolves the issue

@tankdeer are you comfortable manually copying the integration into your custom components folder? If so, try this branch https://github.com/raman325/keymaster/tree/code_slot_auto_in_code (make sure you pull this branch in particular) and regenerate your package files, see if that resolves the issue

Sorry for the late reply. Looks like that fixed it. Installed that code this morning, and that code slot appears to be cleared now. The UI issues still persist, but I expected that.
Follow up question: Reset Code Slot under advanced options. Is that simply to clear the input fields?
Thanks

Sorry for the late reply. Looks like that fixed it. Installed that code this morning, and that code slot appears to be cleared now. The UI issues still persist, but I expected that.
Follow up question: Reset Code Slot under advanced options. Is that simply to clear the input fields?
Thanks

Great! Yes it is

Great! Yes it is

OK guys, this thread has gotten very long. I appreciate all of the help in testing and resolving some of these bugs. There's one bug left, namely the status never going to Connected. I am going to start a new thread with links to the key comments from this one and we can take it from there. Would appreciate your guys help in further testing as we try to troubleshoot

OK guys, this thread has gotten very long. I appreciate all of the help in testing and resolving some of these bugs. There's one bug left, namely the status never going to Connected. I am going to start a new thread with links to the key comments from this one and we can take it from there. Would appreciate your guys help in further testing as we try to troubleshoot