FutureTense / lock-manager

Home Assistant Lock Manager
55 stars 19 forks source link

ISSUE: Missing code_slot_X sensors #46

Closed organicveggie closed 3 years ago

organicveggie commented 3 years ago

Describe the bug

None of the code slot entities appear to be defined.

Fresh install of lock-manager through HACS. Setup integration for my frontdoor, which is a "Schlage (Allegion) BE469ZP Connect Smart Deadbolt". Added LoveLace snippet to new dashboard view. Every single code slot displays:

Entity not available: sensor.frontdoor_code_slot_1

Environment (please complete the following information):

Logs Nothing in the logs.

Screenshots

Screen Shot 2020-10-28 at 4 43 44 PM Screen Shot 2020-10-28 at 5 56 10 PM

Additional context

Most of my config is checked in and visible at https://github.com/organicveggie/hass-config.

firstof9 commented 3 years ago

Are you running zwave or ozw ?

organicveggie commented 3 years ago

Native zwave. Planning on eventually migrating to ozwdaemon and mqtt, but not ready for it.

organicveggie commented 3 years ago

I'm not writing off user-error on my part. Worst case, I figure that If I missed something obvious, maybe it's an opportunity to add to the docs. 👍

colemamd commented 3 years ago

I'm seeing the same thing. Running ozw. I've had the package installed for a while and been updating it via HACS. Yesterday I ran generate_package and refreshed my Lovelace view and noticed those sensors were missing. Also seeing this:

Logger: custom_components.lock-manager.sensor
Source: custom_components/lock-manager/sensor.py:177
Integration: lock-manager (documentation, issues)
First occurred: October 28, 2020, 8:08:05 PM (4005 occurrences)
Last logged: 7:15:06 AM

    Code slot code_slot_3 had no value: 'code_slot_3'
    Code slot code_slot_2 had no value: 'code_slot_2'
    Code slot code_slot_1 had no value: 'code_slot_1'

Here's my Info tab:

arch | armv7l
-- | --
dev | false
docker | true
hassio | false
installation_type | Home Assistant Container
os_name | Linux
os_version | 5.4.51-v7l+
python_version | 3.8.6
timezone | America/New_York
version | 0.117.0
virtualenv | false
firstof9 commented 3 years ago
Code slot code_slot_3 had no value: 'code_slot_3'
Code slot code_slot_2 had no value: 'code_slot_2'
Code slot code_slot_1 had no value: 'code_slot_1'

Please enable debugging these errors don't have enough details to help with troubleshooting.

organicveggie commented 3 years ago

Enabled debugging and ran generate_package:

home-assistant   | 2020-10-29 10:12:37 INFO (MainThread) [custom_components.lock-manager] Version 0.0.32 is starting, if you have any issues please report them here: https://github.com/FutureTense/lock-manager
home-assistant   | 2020-10-29 10:14:02 DEBUG (MainThread) [custom_components.lock-manager] DEBUG: <ServiceCall lock-manager.generate_package (c:242e391e1a0a11eb89199bf6dea49de9): lockname=frontdoor>
home-assistant   | 2020-10-29 10:14:02 DEBUG (MainThread) [custom_components.lock-manager] Starting file generation...
home-assistant   | 2020-10-29 10:14:02 DEBUG (MainThread) [custom_components.lock-manager] DEBUG conf_lock: frontdoor name: frontdoor
home-assistant   | 2020-10-29 10:14:02 DEBUG (MainThread) [custom_components.lock-manager] Cleaning up directory: /config/includes/lock-manager/frontdoor/
home-assistant   | 2020-10-29 10:14:02 DEBUG (MainThread) [custom_components.lock-manager] Created packages directory
home-assistant   | 2020-10-29 10:14:02 DEBUG (MainThread) [custom_components.lock-manager] Creating common YAML file...
home-assistant   | 2020-10-29 10:14:02 DEBUG (MainThread) [custom_components.lock-manager] Common YAML file created
home-assistant   | 2020-10-29 10:14:02 DEBUG (MainThread) [custom_components.lock-manager] Creating lovelace header...
home-assistant   | 2020-10-29 10:14:02 DEBUG (MainThread) [custom_components.lock-manager] Lovelace header created
home-assistant   | 2020-10-29 10:14:02 DEBUG (MainThread) [custom_components.lock-manager] Creating per slot YAML and lovelace cards...
home-assistant   | 2020-10-29 10:14:02 DEBUG (MainThread) [custom_components.lock-manager] Package generation complete

generate_package touched all of the files, but the new versions are identical to the previous versions (according to git). Restarted to be certain, but nothing else new in the logs. No changes in the UI.

firstof9 commented 3 years ago

Upgrade to 0.0.34 and try again please.

colemamd commented 3 years ago

Updated to 0.0.34, ran generate_package:

2020-10-29 18:46:44 INFO (MainThread) [custom_components.lock-manager] Version 0.0.34 is starting, if you have any issues please report them here: https://github.com/FutureTense/lock-manager
2020-10-29 18:46:51 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.lock-manager
2020-10-29 18:48:01 DEBUG (MainThread) [custom_components.lock-manager] DEBUG: <ServiceCall lock-manager.generate_package (c:c0ce8b67affd3e1c5de956b2af0883ba): lockname=frontdoor>
2020-10-29 18:48:01 DEBUG (MainThread) [custom_components.lock-manager] Starting file generation...
2020-10-29 18:48:01 DEBUG (MainThread) [custom_components.lock-manager] DEBUG conf_lock: frontdoor name: frontdoor
2020-10-29 18:48:01 DEBUG (MainThread) [custom_components.lock-manager] Cleaning up directory: /config/packages/lockmanager/frontdoor/
2020-10-29 18:48:01 DEBUG (MainThread) [custom_components.lock-manager] Created packages directory
2020-10-29 18:48:01 DEBUG (MainThread) [custom_components.lock-manager] Creating common YAML file...
2020-10-29 18:48:01 DEBUG (MainThread) [custom_components.lock-manager] Common YAML file created
2020-10-29 18:48:01 DEBUG (MainThread) [custom_components.lock-manager] Creating lovelace header...
2020-10-29 18:48:01 DEBUG (MainThread) [custom_components.lock-manager] Lovelace header created
2020-10-29 18:48:01 DEBUG (MainThread) [custom_components.lock-manager] Creating per slot YAML and lovelace cards...
2020-10-29 18:48:01 DEBUG (MainThread) [custom_components.lock-manager] Package generation complete

No changes

firstof9 commented 3 years ago

Potential fix PR in the pipe. Going to need some testers.

colemamd commented 3 years ago

dang that was quick. As soon as it finishes I'll update

colemamd commented 3 years ago

Updated to 0.0.35, reran generate_package, restarted a couple of times, same indications.

2020-10-29 19:15:21 DEBUG (SyncWorker_44) [custom_components.lock-manager.sensor] DEBUG: Ignoring code slot with * in value.
2020-10-29 19:15:21 DEBUG (SyncWorker_44) [custom_components.lock-manager.sensor] DEBUG: code_slot_ValueIndex.SENSOR_MULTILEVEL_POWER value: **********
2020-10-29 19:15:21 DEBUG (SyncWorker_44) [custom_components.lock-manager.sensor] DEBUG: Ignoring code slot with * in value.
2020-10-29 19:15:21 DEBUG (SyncWorker_44) [custom_components.lock-manager.sensor] DEBUG: code_slot_ValueIndex.SENSOR_MULTILEVEL_HUMIDITY value: 
2020-10-29 19:15:21 DEBUG (SyncWorker_44) [custom_components.lock-manager.sensor] DEBUG: code_slot_ValueIndex.SENSOR_MULTILEVEL_VELOCITY value: 
2020-10-29 19:15:21 DEBUG (SyncWorker_44) [custom_components.lock-manager.sensor] DEBUG: code_slot_ValueIndex.SENSOR_MULTILEVEL_DIRECTION value: **********
2020-10-29 19:15:21 DEBUG (SyncWorker_44) [custom_components.lock-manager.sensor] DEBUG: Ignoring code slot with * in value.
2020-10-29 19:15:21 DEBUG (SyncWorker_44) [custom_components.lock-manager.sensor] DEBUG: code_slot_ValueIndex.SENSOR_MULTILEVEL_ELECTRICAL_RESISTIVITY value: 
2020-10-29 19:15:21 DEBUG (SyncWorker_44) [custom_components.lock-manager.sensor] DEBUG: code_slot_ValueIndex.SENSOR_MULTILEVEL_ELECTRICAL_CONDUCTIVITY value: 
2020-10-29 19:15:21 DEBUG (SyncWorker_44) [custom_components.lock-manager.sensor] DEBUG: code_slot_ValueIndex.SENSOR_MULTILEVEL_LOUDNESS value: 
2020-10-29 19:15:21 DEBUG (SyncWorker_44) [custom_components.lock-manager.sensor] DEBUG: code_slot_ValueIndex.UNKNOWN value: False
2020-10-29 19:15:21 DEBUG (SyncWorker_44) [custom_components.lock-manager.sensor] DEBUG: code_slot_ValueIndex.CLEAR_USER_CODE value: 0
2020-10-29 19:15:21 DEBUG (SyncWorker_44) [custom_components.lock-manager.sensor] DEBUG: code_slot_ValueIndex.NUM_USER_CODES value: 30

A lot of repeating messages, these are some of them, nothing jumps out at me though.

firstof9 commented 3 years ago

Do you have the code_slot sensors now?

colemamd commented 3 years ago

I do not.

colemamd commented 3 years ago

I removed the integration, restarted, installed the integration, ran generate_package, restarted. Same indications

nweave03 commented 3 years ago

Responding in here as requested. I attempted to follow instructions here: https://github.com/FutureTense/lock-manager/wiki/Troubleshooting#enable-debugging . There is no logger.set_level service in the dev-tools service tab. I attempted to call it anyways an it failed.

I am also not at all convinced this is the same issue. I see these entities:

image

I would also point out that it is literally crashing for me on a debug statement while it is attempting to access a key in the object that doesn't exist.

colemamd commented 3 years ago

That's what my lock view looks like as well. Unknown status for those sensors. I did just delete all the entries in the entity registry under .storage, resubmitted the integration, and restarted with no change

organicveggie commented 3 years ago

Updated to 0.0.35, restarted, and re-ran generate_package:

home-assistant   | 2020-10-29 13:39:01 INFO (MainThread) [custom_components.lock-manager] Version 0.0.35 is starting, if you have any issues please report them here: https://github.com/FutureTense/lock-manager
home-assistant   | 2020-10-29 13:39:03 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.2932597928] Error handling message: Unknown error
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
home-assistant   |     handler(self.hass, self, schema(msg))
home-assistant   |   File "/config/custom_components/browser_mod/connection.py", line 36, in handle_update
home-assistant   |     devices[deviceID].update(msg.get("data", None))
home-assistant   |   File "/config/custom_components/browser_mod/connection.py", line 72, in update
home-assistant   |     self.sensor = self.sensor or create_entity(
home-assistant   |   File "/config/custom_components/browser_mod/helpers.py", line 30, in create_entity
home-assistant   |     adder = hass.data[DOMAIN][DATA_ADDERS][platform]
home-assistant   | KeyError: 'sensor'home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] DEBUG: <ServiceCall lock-manager.generate_package (c:f25fcb2e1a2611eb9905539792b19bf1): lockname=frontdoor>
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Starting file generation...
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] DEBUG conf_lock: frontdoor name: frontdoor
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Cleaning up directory: /config/includes/lock-manager/frontdoor/
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Created packages directory
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Creating common YAML file...
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Common YAML file created
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Creating lovelace header...
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Lovelace header created
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Creating per slot YAML and lovelace cards...
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Package generation complete

This time, all of the generated files were different:

git status
On branch main
Your branch is up to date with 'origin/main'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_1.yaml
    modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_10.yaml
    modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_2.yaml
    modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_3.yaml
    modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_4.yaml
    modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_5.yaml
    modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_6.yaml
    modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_7.yaml
    modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_8.yaml
    modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_9.yaml
    modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_common.yaml
    modified:   includes/lock-manager/frontdoor/frontdoor_lovelace

Merged the Lovelace changes into my own dashboard. Still no luck. No sensors.

Screen Shot 2020-10-29 at 1 47 19 PM Screen Shot 2020-10-29 at 1 48 19 PM
organicveggie commented 3 years ago

There is no logger.set_level service in the dev-tools service tab. I attempted to call it anyways an it failed.

Ah. You need to enable the logger integration. See https://www.home-assistant.io/integrations/logger/ for details.

nweave03 commented 3 years ago

There is no logger.set_level service in the dev-tools service tab. I attempted to call it anyways an it failed.

Ah. You need to enable the logger integration. See https://www.home-assistant.io/integrations/logger/ for details.

got it. I updated to 0.35, but there don't appear to be any calls to it anymore at all.

nweave03 commented 3 years ago

So I fell back to 0.34, then I can see the log showing lock-manager is starting, but nothing else

2020-10-29 16:06:40 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for lock-manager which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-10-29 16:06:40 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. 2020-10-29 16:06:42 INFO (MainThread) [custom_components.lock-manager] Version 0.0.34 is starting, if you have any issues please report them here: https://github.com/FutureTense/lock-manager

firstof9 commented 3 years ago
home-assistant   | 2020-10-29 13:39:01 INFO (MainThread) [custom_components.lock-manager] Version 0.0.35 is starting, if you have any issues please report them here: https://github.com/FutureTense/lock-manager
home-assistant   | 2020-10-29 13:39:03 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.2932597928] Error handling message: Unknown error
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/components/websocket_api/connection.py", line 95, in async_handle
home-assistant   |     handler(self.hass, self, schema(msg))
home-assistant   |   File "/config/custom_components/browser_mod/connection.py", line 36, in handle_update
home-assistant   |     devices[deviceID].update(msg.get("data", None))
home-assistant   |   File "/config/custom_components/browser_mod/connection.py", line 72, in update
home-assistant   |     self.sensor = self.sensor or create_entity(
home-assistant   |   File "/config/custom_components/browser_mod/helpers.py", line 30, in create_entity
home-assistant   |     adder = hass.data[DOMAIN][DATA_ADDERS][platform]
home-assistant   | KeyError: 'sensor'home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] DEBUG: <ServiceCall lock-manager.generate_package (c:f25fcb2e1a2611eb9905539792b19bf1): lockname=frontdoor>
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Starting file generation...
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] DEBUG conf_lock: frontdoor name: frontdoor
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Cleaning up directory: /config/includes/lock-manager/frontdoor/
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Created packages directory
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Creating common YAML file...
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Common YAML file created
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Creating lovelace header...
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Lovelace header created
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Creating per slot YAML and lovelace cards...
home-assistant   | 2020-10-29 13:40:14 DEBUG (MainThread) [custom_components.lock-manager] Package generation complete

I see no lock-manager errors in your log, but give this a shot hit reload on the integration: image

nweave03 commented 3 years ago

So I can tell you at least part of this. If I generate the entities for ozw, then I see the sensors, if I don't then they are unknown entities.

In the case that I generate the ozw configuration i get crashes in sensor.py:

2020-10-29 16:16:19 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.detached_garage_door_code_slot_1 fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update await self.hass.async_add_executor_job(self.update) # type: ignore 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/lock-manager/sensor.py", line 170, in update self.data.update() File "/usr/src/homeassistant/homeassistant/util/init.py", line 239, in wrapper result = method(args, **kwargs) File "/config/custom_components/lock-manager/sensor.py", line 98, in update str(value.value), AttributeError: 'ZWaveValue' object has no attribute 'value'

Since I am not using ozw, that would be part of the issue. The other part is that the code is not expecting the format for value objects I am receiving.

2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596031848433] parent_id: [118] label: [Code Count] data: [30] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596031848424] parent_id: [118] label: [Refresh All UserCodes] data: [False] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023455753] parent_id: [118] label: [Enrollment Code] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023455769] parent_id: [118] label: [Code 1:] data: [**] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023455785] parent_id: [118] label: [Code 2:] data: [**] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023455801] parent_id: [118] label: [Code 3:] data: [**] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023455817] parent_id: [118] label: [Code 4:] data: [**] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023455833] parent_id: [118] label: [Code 5:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023455849] parent_id: [118] label: [Code 6:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023455865] parent_id: [118] label: [Code 7:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023455881] parent_id: [118] label: [Code 8:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023455897] parent_id: [118] label: [Code 9:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023455913] parent_id: [118] label: [Code 10:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023455929] parent_id: [118] label: [Code 11:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023455945] parent_id: [118] label: [Code 12:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023455961] parent_id: [118] label: [Code 13:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023455977] parent_id: [118] label: [Code 14:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023455993] parent_id: [118] label: [Code 15:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023456009] parent_id: [118] label: [Code 16:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023456025] parent_id: [118] label: [Code 17:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023456041] parent_id: [118] label: [Code 18:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023456057] parent_id: [118] label: [Code 19:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023456073] parent_id: [118] label: [Code 20:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023456089] parent_id: [118] label: [Code 21:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023456105] parent_id: [118] label: [Code 22:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023456121] parent_id: [118] label: [Code 23:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023456137] parent_id: [118] label: [Code 24:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023456153] parent_id: [118] label: [Code 25:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023456169] parent_id: [118] label: [Code 26:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023456185] parent_id: [118] label: [Code 27:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023456201] parent_id: [118] label: [Code 28:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023456217] parent_id: [118] label: [Code 29:] data: [] 2020-10-29 16:18:11 DEBUG (SyncWorker_8) [custom_components.lock-manager.sensor] value is home_id: [0xf74077b2] id: [72057596023456233] parent_id: [118] label: [Code 30:] data: []

I added a simple for loop to loop through the values before it crashes for value in lock_values: _LOGGER.debug( "value is %s", str(value) )

nweave03 commented 3 years ago

If I then go back and remove ozw, it will no longer even attempt to query the lock for information. It appears permanently stuck. I can turn it back on and start to see the logs again.

firstof9 commented 3 years ago

You reminded me to check something... I had blocked zwave from the sensor code because it wasn't tested 🤦 incoming PR to fix that.

organicveggie commented 3 years ago

I see no lock-manager errors in your log, but give this a shot hit reload on the integration:

No luck. Still no sensor entities. Only one logging message:

home-assistant   | 2020-10-29 14:44:57 INFO (MainThread) [custom_components.lock-manager] Version 0.0.35 is starting, if you have any issues please report them here: https://github.com/FutureTense/lock-manager
Screen Shot 2020-10-29 at 2 49 13 PM
firstof9 commented 3 years ago

Ya I have a PR in to fix it, stand by.

firstof9 commented 3 years ago

Now just wait for the next release 👍

nweave03 commented 3 years ago

just installed master and am now seeing the crashes with ozw off. progress!

2020-10-30 00:14:49 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.detached_garage_door_code_slot_1 fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update await self.hass.async_add_executor_job(self.update) # type: ignore 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/lock-manager/sensor.py", line 179, in update self.data.update() File "/usr/src/homeassistant/homeassistant/util/init.py", line 239, in wrapper result = method(args, **kwargs) File "/config/custom_components/lock-manager/sensor.py", line 99, in update str(value.value), AttributeError: 'ZWaveValue' object has no attribute 'value'

firstof9 commented 3 years ago

ok @nweave03 give me a couple mins and I'll link you to a branch to test.

firstof9 commented 3 years ago

Give this sensor.py a shot.

organicveggie commented 3 years ago

Updated to 0.0.36. Restarted. Lots of errors related to Update for sensor.frontdoor_code_slot_X fails.

home-assistant   | 2020-10-29 16:24:23 INFO (MainThread) [custom_components.lock-manager] Version 0.0.36 is starting, if you have any issues please report them here: https://github.com/FutureTense/lock-manager
home-assistant   | 2020-10-29 16:25:16 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_10 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:16 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_9 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:16 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_8 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:16 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_7 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:16 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_6 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:16 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_5 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:16 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_4 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:16 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_3 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:16 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_2 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:16 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_1 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:46 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_10 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:46 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_9 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:46 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_8 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:46 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_7 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:46 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_6 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:46 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_5 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:46 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_4 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:46 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_3 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:46 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_2 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'
home-assistant   | 2020-10-29 16:25:46 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.frontdoor_code_slot_1 fails
home-assistant   | Traceback (most recent call last):
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
home-assistant   |     await self.async_device_update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
home-assistant   |     await self.hass.async_add_executor_job(self.update)  # type: ignore
home-assistant   |   File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
home-assistant   |     result = self.fn(*self.args, **self.kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 179, in update
home-assistant   |     self.data.update()
home-assistant   |   File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
home-assistant   |     result = method(*args, **kwargs)
home-assistant   |   File "/config/custom_components/lock-manager/sensor.py", line 99, in update
home-assistant   |     str(value.value),
home-assistant   | AttributeError: 'ZWaveValue' object has no attribute 'value'

Looks like we may have made some progress. Sensors now exist, but aren't working:

Screen Shot 2020-10-29 at 4 27 44 PM Screen Shot 2020-10-29 at 4 28 20 PM Screen Shot 2020-10-29 at 4 28 39 PM
nweave03 commented 3 years ago

Give this sensor.py a shot.

Okay i tried it outright and saw

2020-10-30 01:33:08 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.detached_garage_door_code_slot_1 fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update await self.hass.async_add_executor_job(self.update) # type: ignore 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/lock-manager/sensor.py", line 181, in update self.data.update() File "/usr/src/homeassistant/homeassistant/util/init.py", line 239, in wrapper result = method(args, **kwargs) File "/config/custom_components/lock-manager/sensor.py", line 96, in update if value not in value.keys(): AttributeError: 'ZWaveValue' object has no attribute 'keys'

taking a look i think you mean value as a string not as the object itself so i tried:

        elif ZWAVE_NETWORK in self._hass.data:
            if data[ATTR_NODE_ID] is not None:
                network = self._hass.data[ZWAVE_NETWORK]
                lock_values = (
                    network.nodes[data[ATTR_NODE_ID]]
                    .get_values(class_id=COMMAND_CLASS_USER_CODE)
                    .values()
                )
                for value in lock_values:
                    if 'value' not in value.keys():
                        continue
                    _LOGGER.debug(
                        "DEBUG: code_slot_%s value: %s",
                        str(value.index),
                        str(value.value),
                    )
                    # do not update if the code contains *s
                    code = value.value
                    if "*" in str(value.value):
                        _LOGGER.debug("DEBUG: Ignoring code slot with * in value.")
                        code = "Unknown"
                    sensor_name = f"code_slot_{value.index}"
                    data[sensor_name] = code

                self._data = data

with that i got

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update await self.hass.async_add_executor_job(self.update) # type: ignore 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/lock-manager/sensor.py", line 181, in update self.data.update() File "/usr/src/homeassistant/homeassistant/util/init.py", line 239, in wrapper result = method(args, **kwargs) File "/config/custom_components/lock-manager/sensor.py", line 96, in update if "value" not in value.keys(): AttributeError: 'ZWaveValue' object has no attribute 'keys'

so i tried

        elif ZWAVE_NETWORK in self._hass.data:
            if data[ATTR_NODE_ID] is not None:
                network = self._hass.data[ZWAVE_NETWORK]
                lock_values = (
                    network.nodes[data[ATTR_NODE_ID]]
                    .get_values(class_id=COMMAND_CLASS_USER_CODE)
                    .values()
                )
                for value in lock_values:
                    if "value" not in value:
                        continue
                    _LOGGER.debug(
                        "DEBUG: code_slot_%s value: %s",
                        str(value.index),
                        str(value.value),
                    )
                    # do not update if the code contains *s
                    code = value.value
                    if "*" in str(value.value):
                        _LOGGER.debug("DEBUG: Ignoring code slot with * in value.")
                        code = "Unknown"
                    sensor_name = f"code_slot_{value.index}"
                    data[sensor_name] = code

                self._data = data

and got

2020-10-30 01:38:24 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.detached_garage_door_code_slot_1 fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update await self.hass.async_add_executor_job(self.update) # type: ignore 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/lock-manager/sensor.py", line 181, in update self.data.update() File "/usr/src/homeassistant/homeassistant/util/init.py", line 239, in wrapper result = method(args, **kwargs) File "/config/custom_components/lock-manager/sensor.py", line 96, in update if "value" not in value: TypeError: argument of type 'ZWaveValue' is not iterable

so i hit it with the hammer

        elif ZWAVE_NETWORK in self._hass.data:
            if data[ATTR_NODE_ID] is not None:
                network = self._hass.data[ZWAVE_NETWORK]
                lock_values = (
                    network.nodes[data[ATTR_NODE_ID]]
                    .get_values(class_id=COMMAND_CLASS_USER_CODE)
                    .values()
                )
                for value in lock_values:
                    try:
                        _LOGGER.debug(
                            "DEBUG: code_slot_%s value: %s",
                            str(value.index),
                            str(value.value),
                        )
                        # do not update if the code contains *s
                        code = value.value
                        if "*" in str(value.value):
                            _LOGGER.debug("DEBUG: Ignoring code slot with * in value.")
                            code = "Unknown"
                        sensor_name = f"code_slot_{value.index}"
                        data[sensor_name] = code
                    except:
                        continue

                self._data = data

and its no longer crashing but i'm getting

2020-10-30 01:40:57 WARNING (SyncWorker_33) [custom_components.lock-manager.sensor] Code slot code_slot_5 had no value: 'code_slot_5' 2020-10-30 01:40:57 WARNING (SyncWorker_22) [custom_components.lock-manager.sensor] Code slot code_slot_4 had no value: 'code_slot_4' 2020-10-30 01:40:57 WARNING (SyncWorker_38) [custom_components.lock-manager.sensor] Code slot code_slot_3 had no value: 'code_slot_3' 2020-10-30 01:40:57 WARNING (SyncWorker_16) [custom_components.lock-manager.sensor] Code slot code_slot_2 had no value: 'code_slot_2' 2020-10-30 01:40:57 WARNING (SyncWorker_4) [custom_components.lock-manager.sensor] Code slot code_slot_1 had no value: 'code_slot_1'

not sure what to do from here

organicveggie commented 3 years ago

Ran generate_package again:

home-assistant   | 2020-10-29 16:29:55 DEBUG (MainThread) [custom_components.lock-manager] DEBUG: <ServiceCall lock-manager.generate_package (c:a6f42c111a3e11eb89ade18728f869ca): lockname=frontdoor>
home-assistant   | 2020-10-29 16:29:55 DEBUG (MainThread) [custom_components.lock-manager] Starting file generation...
home-assistant   | 2020-10-29 16:29:55 DEBUG (MainThread) [custom_components.lock-manager] DEBUG conf_lock: frontdoor name: frontdoor
home-assistant   | 2020-10-29 16:29:55 DEBUG (MainThread) [custom_components.lock-manager] Cleaning up directory: /config/includes/lock-manager/frontdoor/
home-assistant   | 2020-10-29 16:29:55 DEBUG (MainThread) [custom_components.lock-manager] Created packages directory
home-assistant   | 2020-10-29 16:29:55 DEBUG (MainThread) [custom_components.lock-manager] Creating common YAML file...
home-assistant   | 2020-10-29 16:29:55 DEBUG (MainThread) [custom_components.lock-manager] Common YAML file created
home-assistant   | 2020-10-29 16:29:55 DEBUG (MainThread) [custom_components.lock-manager] Creating lovelace header...
home-assistant   | 2020-10-29 16:29:55 DEBUG (MainThread) [custom_components.lock-manager] Lovelace header created
home-assistant   | 2020-10-29 16:29:55 DEBUG (MainThread) [custom_components.lock-manager] Creating per slot YAML and lovelace cards...
home-assistant   | 2020-10-29 16:29:55 DEBUG (MainThread) [custom_components.lock-manager] Package generation complete

All of the yaml files appeared to be modified:

modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_1.yaml
modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_10.yaml
modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_2.yaml
modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_3.yaml
modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_4.yaml
modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_5.yaml
modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_6.yaml
modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_7.yaml
modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_8.yaml
modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_9.yaml
modified:   includes/lock-manager/frontdoor/frontdoor_lock_manager_common.yaml

Restarted, but same issues as previous comment.

firstof9 commented 3 years ago

@nweave03 I've updated it once more give the sensor.py another go

organicveggie commented 3 years ago

I think the changes to sensor.py worked for me! I now have 10 entities, one for each code. And looking at the dashboard, it's clear that we successfully read the user codes from the lock. Haven't tried updating any user codes yet, but was excited to see this!

firstof9 commented 3 years ago

3rd time's the charm right?

nweave03 commented 3 years ago

so I tried the new sensor.py. It stopped crashing. but it doesn't seem to actually set any codes.

2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_255 value: 30 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_254 value: False 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_0 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_1 value: ** 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: Ignoring code slot with * in value. 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_2 value: ** 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: Ignoring code slot with * in value. 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_3 value: ** 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: Ignoring code slot with * in value. 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_4 value: ** 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: Ignoring code slot with * in value. 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_5 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_6 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_7 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_8 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_9 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_10 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_11 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_12 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_13 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_14 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_15 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_16 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_17 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_18 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_19 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_20 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_21 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_22 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_23 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_24 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_25 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_26 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_27 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_28 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_29 value: 2020-10-30 06:40:46 DEBUG (SyncWorker_48) [custom_components.lock-manager.sensor] DEBUG: code_slot_30 value:

But looking at the zwave logs it never sends a lock code set command.

image

it should be trying to set code 5, since I have a value there and it is clearly blank.

I'm not sure what is different here than for organicveggie. I will try a complete reinstall tomorrow and see if there is something weird in the state here.

organicveggie commented 3 years ago

I reverted my local changes to sensor.py, updated to 0.0.38, regenerated packages, and restarted HA. Everything still works and looks good.

organicveggie commented 3 years ago

@nweave03 I know you tried a variety of things. At this point, are you running zwave or ozw? Going back through the messages I wasn't sure.

nweave03 commented 3 years ago

@nweave03 I know you tried a variety of things. At this point, are you running zwave or ozw? Going back through the messages I wasn't sure.

I'm using zwave. Everything I've read suggests ozw needs a little more seasoning

firstof9 commented 3 years ago

@nweave03 do the sensors say Unavailable ?

colemamd commented 3 years ago

I've updated to 0.0.38 and the sensors still say Unavailable. I did notice that I had two packages, one named lock-manager and another named lockmanager. I removed the integration, removed from HACS, deleted both package folders, restarted and reinstalled from scratch. Still have the same indications. I'm using ozw with a BE469.

firstof9 commented 3 years ago

@colemamd They are not switching to Unknown status at all?

firstof9 commented 3 years ago

Lets continue this in https://github.com/FutureTense/lock-manager/issues/55