FutureTense / keymaster

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

UpdateCoordinator not honoring "start from" setting for code slot sensors #248

Open firstof9 opened 2 years ago

firstof9 commented 2 years ago

In your debug logs do you see anything that says something like Finished fetching keymaster data in 0.004 seconds (success: True) ?

If not, that'd be why they're unavailable.

Yes, but it´s pulling the wrong keyslots? I have configured 5 slots from keyslot 10 and up, while debug shows that keymaster pulls 1-5

2021-11-02 16:50:38 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.001 seconds (success: True)
2021-11-02 16:50:43 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 1 value: xxxxx
2021-11-02 16:50:43 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 2 value: xxxxx
2021-11-02 16:50:43 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 3 not enabled
2021-11-02 16:50:43 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 4 not enabled
2021-11-02 16:50:43 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 5 value: xxxxx
2021-11-02 16:50:43 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.001 seconds (success: True)

Originally posted by @labanx in https://github.com/FutureTense/keymaster/issues/228#issuecomment-957940432

labanx commented 2 years ago

Updating this bug report, since there is a bit of info spread all over now.

Tested with pullrequest 250, the difference is that Keymaster stopped pulling the wrong slots (according to the debug log)

2021-11-03 15:35:46 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.000 seconds (success: True)
2021-11-03 15:35:51 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.000 seconds (success: True)
2021-11-03 15:35:56 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.000 seconds (success: True)
2021-11-03 15:36:01 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.000 seconds (success: True) 

Compared to it pulling the first 5 slots before the patch

2021-11-02 16:50:38 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.001 seconds (success: True)
2021-11-02 16:50:43 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 1 value: xxxxx
2021-11-02 16:50:43 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 2 value: xxxxx
2021-11-02 16:50:43 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 3 not enabled
2021-11-02 16:50:43 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 4 not enabled
2021-11-02 16:50:43 DEBUG (MainThread) [custom_components.keymaster] DEBUG: Code slot 5 value: xxxxx
2021-11-02 16:50:43 DEBUG (MainThread) [custom_components.keymaster] Finished fetching keymaster data in 0.001 seconds (success: True)

Some part of Keymaster is working however, if i manually run the automations the pin get applied. Please note that keymaster is not able to verify that the pin has been applied, so it seems to be related to pulling of the keyslots?

image image

Zwave-js debug logs

2021-11-03T16:11:40.762Z DRIVER » [Node 031] [REQ] [SendDataBridge]
                                  │ source node id:   1
                                  │ transmit options: 0x25
                                  │ route:            0, 0, 0, 0
                                  │ callback id:      86
                                  └─[SecurityCCCommandEncapsulation]
                                    │ nonce id: 146
                                    └─[UserCodeCCSet]
                                        user id:   12
                                        id status: Enabled
                                        user code: 77668877

You can also see that the code slots are failing in HA image