FutureTense / keymaster

Home Assistant integration for managing Z-Wave enabled locks
MIT License
218 stars 44 forks source link

ISSUE: Error fetching keymaster data: #345

Closed Vartkat closed 7 months ago

Vartkat commented 7 months ago

Describe the bug Entities

Environment (please complete the following information):

Logs

Logger: custom_components.keymaster
Source: helpers/update_coordinator.py:322
Integration: keymaster (documentation, issues)
First occurred: 07:42:04 (2 occurrences)
Last logged: 07:42:04

Error fetching keymaster data:

If Keymaster debug enabled :

2023-11-23 07:55:19.546 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 1 not enabled
2023-11-23 07:55:19.546 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 2 not enabled
2023-11-23 07:55:19.546 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 3 not enabled
2023-11-23 07:55:19.546 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 4 not enabled
2023-11-23 07:55:19.546 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 5 not enabled
2023-11-23 07:55:19.546 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 6 not enabled
2023-11-23 07:55:19.546 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 7 not enabled
2023-11-23 07:55:19.546 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 8 not enabled
2023-11-23 07:55:19.546 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 9 not enabled
2023-11-23 07:55:19.547 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 10 not enabled
2023-11-23 07:55:19.547 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 11 not enabled
2023-11-23 07:55:19.547 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 12 not enabled
2023-11-23 07:55:19.547 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 13 not enabled
2023-11-23 07:55:19.547 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 14 not enabled
2023-11-23 07:55:19.547 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 15 not enabled
2023-11-23 07:55:19.547 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 16 not enabled
2023-11-23 07:55:19.547 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 17 not enabled
2023-11-23 07:55:19.547 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 18 not enabled
2023-11-23 07:55:19.547 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 19 not enabled
2023-11-23 07:55:19.547 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 20 not enabled
2023-11-23 07:55:19.547 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 21 not enabled
2023-11-23 07:55:19.548 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 22 not enabled
2023-11-23 07:55:19.548 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 23 not enabled
2023-11-23 07:55:19.548 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 24 not enabled
2023-11-23 07:55:19.548 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 25 not enabled
2023-11-23 07:55:19.548 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 26 not enabled
2023-11-23 07:55:19.548 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 27 not enabled
2023-11-23 07:55:19.548 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 28 not enabled
2023-11-23 07:55:19.548 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 29 not enabled
2023-11-23 07:55:19.548 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 30 not enabled`

home-assistant_keymaster_2023-11-23T14-20-38.765Z.log

Which seems to me is exactly my problem but doesn't give me any clue on how solve it. More, as I have several locks it doesn't say which lock it's about.

Screenshots

image

image

Additional context We're dealing with three cabins, Cabin1 Cabin2 and Cabin3. One Raspberry on each cabin (because one Zwave stick per cabin because of distance and walls issues). Cabin2 is the one running Home Assistant for everyone. Cabin1 and Cabin3 are just running Debian12 Docker and ZwaveJS-UI (and portainer). Cabin1 and Cabin3 have the axact same config. Integration for Cabin1 and Cabin3 added succesfully using ws:// URL. Zwave working fine, I can lock and unlock, it reports all status, all Zwave entities are here and oK.

Cabin 1 is the only one having issues with Keymaster.

I tried removing Cabin1 keymaster integration which leaves a bunch of entities. I manually deleted all Cabin1 keymaster entities which were unavailable while the corresponding integration (keymaster) was deleted. Rebooted each time I changed something. Once I found Home Assistant cleaned from the integration and its entities I begun the process of re-adding it, using the same name for the lock (maybe that's the error - but ot shouldn't be), exact same parameters for the Keymaster dialog as I had screenshot the form. Nothing changes, Cabin1 entities are still unavailable just after Keymaster integration addition.

firstof9 commented 7 months ago

Means your slots are not available, fix the code slots in ZwaveJS UI.

Vartkat commented 7 months ago

Hi,

Thanks for the quick answer. That did the trick for one but not for the other even if... I restarted Home Assistant I rebooted the Cabin1 Raspberry I reloaded the integration I restarted Home Assistant (after Cabin1 reboot) I reconfigured the integration (opened the dialog and validate).

Even if the slots were marked as Available in ZWaveJS UI I updated all 30 slots to Available and got 'Value updated' popup for each one.

Vartkat commented 7 months ago

I deleted the integration (just for this lock), restarted Home Assistant, re-added the integration with the exact same parameters... Stil no luck...Restarted HA... Nope. Gone to ZwaveJS UI to verify states, all slots marked as available, then just in case I asked for a refresh code values... Bingo ! Thanks for your help.