8000 Simplify discovery query, refactor dump-devinfo by rytilahti · Pull Request #147 · python-kasa/python-kasa · GitHub
[go: up one dir, main page]

Skip to content

Simplify discovery query, refactor dump-devinfo #147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

rytilahti
Copy link
Member
@rytilahti rytilahti commented Mar 18, 2021

This modifies the discovery to query only system:get_sysinfo as querying multiple modules at once is known to have issues with some devices.

This PR also moves the dump-devinfo functionality to a separately shipped file under devtools, which should also now allow generating fixture files for devices that do not support querying multiple modules at once.

Fixes #105, fixes #113, related to #120

@kirichkov
Copy link
Contributor

Other than the conflicting file it looks good to me.

@brianthedavis
Copy link
Contributor

@rytilahti I finally had a chance to check out the dump_devinfo.py script that you mentioned in #141 and it was able to successfully dump information from my KL125 bulb and a new HS200 switch.

@rytilahti
Copy link
Member Author

@brianthedavis would you mind creating a PR to add the resulting files json (for KL125 at least, for HS200 in case it's a different hardware version than the existing ones) to https://github.com/python-kasa/python-kasa/tree/master/kasa/tests/fixtures and adding KL125 to https://github.com/python-kasa/python-kasa/blob/master/kasa/tests/conftest.py#L30 ?

@rytilahti rytilahti force-pushed the fix/simplify_discovery_refactor_dump_devinfo branch from e8ec9f1 to d55c2c9 Compare May 10, 2021 00:07
@codecov-commenter
Copy link
codecov-commenter commented May 10, 2021

Codecov Report

Merging #147 (6758420) into master (1ee4757) will increase coverage by 1.15%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #147      +/-   ##
==========================================
+ Coverage   73.26%   74.42%   +1.15%     
==========================================
  Files          11       11              
  Lines        1242     1220      -22     
  Branches      183      177       -6     
==========================================
- Hits          910      908       -2     
+ Misses        299      279      -20     
  Partials       33       33              
Impacted Files Coverage Δ
kasa/cli.py 58.22% <0.00%> (+3.31%) ⬆️
kasa/discover.py 40.17% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ee4757...6758420. Read the comment docs.

@rytilahti rytilahti merged commit 0471e1a into python-kasa:master May 10, 2021
@rytilahti rytilahti deleted the fix/simplify_discovery_refactor_dump_devinfo branch May 10, 2021 00:19
@rytilahti rytilahti mentioned this pull request May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HS110(UK) not discoverable TP Link Dimmer switch (HS220) hardware version 2.0 not being discovered
4 participants
0