keymaster icon indicating copy to clipboard operation
keymaster copied to clipboard

Only get slot data for slots that are whitelisted

Open raman325 opened this issue 4 years ago • 9 comments

Breaking change

Proposed change

Type of change

  • [ ] Dependency upgrade
  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [ ] New feature (which adds functionality)
  • [ ] Breaking change (fix/feature causing existing functionality to break)
  • [x] Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:

raman325 avatar Nov 03 '21 03:11 raman325

Codecov Report

Merging #250 (7015403) into main (c5527e9) will decrease coverage by 0.03%. The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #250      +/-   ##
==========================================
- Coverage   88.55%   88.51%   -0.04%     
==========================================
  Files          10       10              
  Lines         987      993       +6     
==========================================
+ Hits          874      879       +5     
- Misses        113      114       +1     
Impacted Files Coverage Δ
custom_components/keymaster/__init__.py 89.25% <85.71%> (-0.12%) :arrow_down:

codecov-commenter avatar Nov 03 '21 03:11 codecov-commenter

You think this'll fix #248 ?

firstof9 avatar Nov 03 '21 14:11 firstof9

teste the updated init file against #248 , and it stopped pulling the wrong keyslots, but it doesn't pull the correct ones either.

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)

While it before pulled the 5 first keyslots (since i only enabled 5)

labanx avatar Nov 03 '21 15:11 labanx

@labanx can you see the other slots in zwavejs2mqtt? Based on what you are saying, it seems like the driver is only returning the first five slots.

raman325 avatar Nov 03 '21 15:11 raman325

@labanx can you see the other slots in zwavejs2mqtt? Based on what you are saying, it seems like the driver is only returning the first five slots.

@raman325 Yup, i could even set the pin in keymaster. I just have to force the automation, but keymaster doesn't think it's added. But it shows up in zwavejs2mqtt and i can also see it in the zwave-js debug logs

image

image

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

labanx avatar Nov 03 '21 16:11 labanx

I think merging this could be really helpful in reducing the z-wave traffic generated by keymaster

smiller171 avatar Apr 22 '22 17:04 smiller171

This will likely need re-basing after #277 is merged.

firstof9 avatar Apr 22 '22 20:04 firstof9

@firstof9 #277 is merged. Is there anything I can do to help get this merged in? The sheer number of requests keymaster is trying to send to my old Yale lock is causing me a lot of problems.

smiller171 avatar Jun 28 '22 20:06 smiller171

Note the only zwave traffic that is generated is when a code is being cleared or set.

firstof9 avatar Jun 28 '22 20:06 firstof9