FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Update dump_devinfo to include 20002 discovery results by sdb9696 · Pull Request #556 · python-kasa/python-kasa · GitHub

Repository navigation

Update dump_devinfo to include 20002 discovery results - #556

Merged
rytilahti merged 3 commits into
python-kasa:masterfrom
sdb9696:update_dump_devinfo
Nov 29, 2023
Merged

rytilahti merged 3 commits into
python-kasa:masterfrom
sdb9696:update_dump_devinfo

Conversation

sdb9696 commented Nov 28, 2023

Copy link
Copy Markdown
Contributor

Updated dump_devinfo to capture the 20002 discovery result if present and save it in the fixtures file. This will be used for testing, for example to ensure that the correct fake protocol is used for tapo devices.

N.B. dump_devinfo didn't seem to be working as it imported non-async click which isn't installed by poetry so I updated it to async_click

codecov Bot commented Nov 28, 2023 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9728866) 82.27% compared to head (8981bf5) 82.29%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #556      +/-   ##
==========================================
+ Coverage   82.27%   82.29%   +0.01%     
==========================================
  Files          30       30              
  Lines        2466     2468       +2     
  Branches      694      694              
==========================================
+ Hits         2029     2031       +2     
  Misses        379      379              
  Partials       58       58              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

sdb9696 force-pushed the update_dump_devinfo branch from 63c0dba to a077f19 Compare November 28, 2023 18:04

rytilahti left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Some comments, I'll use this PR to create a fixture for my new L530 soon :-)

Comment thread devtools/dump_devinfo.py Outdated
Comment thread kasa/discover.py
Comment thread kasa/smartdevice.py Outdated
Comment thread devtools/dump_devinfo.py
"ssid",
"hw_id",
"fw_id",
"oem_id",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This looks good to me for now, but we will probably want to move the list of keys to scrub (including the ones below) into the library itself. This will allow removing the hardcoded list from homeassistant integration: https://github.com/home-assistant/core/blob/b36ddaa15c5975fbae36e2b4eef9721ef45f1a35/homeassistant/components/tplink/diagnostics.py#L14

rytilahti left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Tested to work on KL130 and HS110 using the legacy, raises an error though after saving the results, unsure if related:

Exception ignored in: <function StreamWriter.__del__ at 0x7fcdb9dd8180>
Traceback (most recent call last):
  File "/usr/lib/python3.11/asyncio/streams.py", line 395, in __del__
    self.close()
  File "/usr/lib/python3.11/asyncio/streams.py", line 343, in close
    return self._transport.close()
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/selector_events.py", line 860, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "/usr/lib/python3.11/asyncio/base_events.py", line 761, in call_soon
    self._check_closed()
  File "/usr/lib/python3.11/asyncio/base_events.py", line 519, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

Comment thread kasa/discover.py
sdb9696 force-pushed the update_dump_devinfo branch from b54dba6 to ff76471 Compare November 29, 2023 16:27

sdb9696 commented Nov 29, 2023

Copy link
Copy Markdown
Contributor Author

Thanks. I've rebased to master so should be ready to merge.

rytilahti changed the title Fix dump_devinfo and add discovery_result to json Update dump_devinfo to include 20002 discovery results Nov 29, 2023
rytilahti added the enhancement New feature or request label Nov 29, 2023
rytilahti merged commit 9de3f69 into python-kasa:master Nov 29, 2023
sdb9696 deleted the update_dump_devinfo branch December 6, 2023 19:29
pillarsdotnet pushed a commit to pillarsdotnet/python-kasa that referenced this pull request Oct 22, 2026
* Fix dump_devinfo and add discovery_result to json

* Update following review.  Do not serialize aliases.

* Delete kasa/tests/fixtures/HS100(UK)_1.0_1.2.6.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL