Skip to content

Update dump_devinfo to produce new TAPO/SMART fixtures - #561

Merged
rytilahti merged 1 commit into
python-kasa:masterfrom
sdb9696:add_tapo_fixtures
Dec 2, 2023
Merged

Update dump_devinfo to produce new TAPO/SMART fixtures#561
rytilahti merged 1 commit into
python-kasa:masterfrom
sdb9696:add_tapo_fixtures

Conversation

@sdb9696

@sdb9696 sdb9696 commented Dec 1, 2023

Copy link
Copy Markdown
Contributor

We need to be careful not merge any of these new fixtures without the test framework changes in #557 or they will break the tests.

@codecov

codecov Bot commented Dec 1, 2023

Copy link
Copy Markdown

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (63d64ad) 75.84% compared to head (6c3f39d) 75.84%.

Files Patch % Lines
kasa/tapo/tapodevice.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #561      +/-   ##
==========================================
- Coverage   75.84%   75.84%   -0.01%     
==========================================
  Files          33       34       +1     
  Lines        2861     2865       +4     
  Branches      747      747              
==========================================
+ Hits         2170     2173       +3     
- Misses        634      635       +1     
  Partials       57       57              

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

@sdb9696

sdb9696 commented Dec 1, 2023

Copy link
Copy Markdown
Contributor Author

@ezekieldas this PR will allow us to be able to create test fixtures for the devices using the TAPO/SMART protocol like your EP25. I don't suppose you'd able to checkout this PR and run it against your EP25? Command would be something like:

python3 -m devtools.dump_devinfo YOUR_IP --username USERNAME --password PASSWORD

The output should be auto masked for sensitive data but please double check because the masking is new for this protocol. If you could then upload the file that would be great, thanks!

@ezekieldas

Copy link
Copy Markdown

Two files attached here. Note the method='get_child_device_component_list' ... {'error_code': -1002} in file devtools.dump_devinfo.stdout.txt

EP25.smart_2.6_1.0.1.json
devtools.dump_devinfo.stdout.txt

@sdb9696

sdb9696 commented Dec 1, 2023

Copy link
Copy Markdown
Contributor Author

Two files attached here. Note the method='get_child_device_component_list' ... {'error_code': -1002} in file devtools.dump_devinfo.stdout.txt

EP25.smart_2.6_1.0.1.json devtools.dump_devinfo.stdout.txt

That's great thanks @ezekieldas. The error in the stdout is expected because the tool tries to get all modules without knowing if the device supports them or not. Glad to see it works and thanks for the fixture.

This PR may interest you because I know you're trying to get energy monitoring in HA with your device. If it works you may want to try it in HA and see if it gives you the graphs you're looking for (if you're not sure how to test a dependency PR in HA I can help but not tonight I'm afraid)

Comment thread devtools/dump_devinfo.py

@rytilahti 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.

LGTM 👍

@rytilahti rytilahti added the enhancement New feature or request label Dec 2, 2023
@rytilahti
rytilahti merged commit a6b7d73 into python-kasa:master Dec 2, 2023
@ezekieldas

Copy link
Copy Markdown

@sdb9696

This PR may interest you because I know you're trying to get energy monitoring in HA with your device. If it works you may want to try it in HA and see if it gives you the graphs you're looking for (if you're not sure how to test a dependency PR in HA I can help but not tonight I'm afraid)

Sending you email on this as to not clutter up these comments.

@sdb9696
sdb9696 deleted the add_tapo_fixtures branch December 6, 2023 19:38
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.

3 participants