Skip to content

Update list of tp-link kasa supported devices#11805

Merged
rytilahti merged 1 commit into
home-assistant:currentfrom
epicalex:patch-1
Jan 19, 2020
Merged

Update list of tp-link kasa supported devices#11805
rytilahti merged 1 commit into
home-assistant:currentfrom
epicalex:patch-1

Conversation

@epicalex
Copy link
Copy Markdown
Contributor

Description:
Update list of supported devices to include 'HS303 (powerstrip 3-outlet)'. I've confirmed this is working.

Checklist:

  • Branch: next is for changes and new documentation that will go public with the next Home Assistant release. Fixes, changes and adjustments for the current release should be created against current.
  • The documentation follows the standards.

Update list of supported devices to include 'HS303 (powerstrip 3-outlet)'. I've confirmed this is working.
@epicalex epicalex requested a review from rytilahti as a code owner January 19, 2020 13:53
@probot-home-assistant probot-home-assistant Bot added the current This PR goes into the current branch label Jan 19, 2020
Copy link
Copy Markdown
Member

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

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

Thanks 👍 If you don't mind installing python-kasa from git (https://github.com/python-kasa/python-kasa) and running kasa dump-discover, and upload the result file to https://github.com/python-kasa/python-kasa/tree/master/kasa/tests/fixtures that would be great.

@rytilahti rytilahti merged commit 436675c into home-assistant:current Jan 19, 2020
@epicalex
Copy link
Copy Markdown
Contributor Author

epicalex commented Jan 20, 2020

Thanks 👍 If you don't mind ... running kasa dump-discover, and upload the result file to https://github.com/python-kasa/python-kasa/tree/master/kasa/tests/fixtures that would be great.

I can't get that to run, I get this error:

  File "/usr/local/bin/kasa", line 11, in <module>
    load_entry_point('python-kasa==0.4.0.dev0', 'console_scripts', 'kasa')()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2843, in load_entry_point
    return ep.load()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2434, in load
    return self.resolve()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2440, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Library/Python/2.7/site-packages/python_kasa-0.4.0.dev0-py2.7.egg/kasa/__init__.py", line 14, in <module>
    from kasa.discover import Discover
  File "/Library/Python/2.7/site-packages/python_kasa-0.4.0.dev0-py2.7.egg/kasa/discover.py", line 26
    discovered_devices: Dict[str, SmartDevice]
                      ^
SyntaxError: invalid syntax

I'm presuming that's because it's trying to use python 2.7 instead of 3.7, but I have no idea how to force it to use python 3.7; I never use python, so this isn't something I'm used to handling. I've downloaded and installed python 3.7 in addition to my mac's copy of 2.7.

Repo is cloned, installed using python setup.py install. I just reran through all of this and actually I see I get errors when installing the project.

Sorry for this to be a burden, not something I was expecting to have to do! Any tips to get this working?

@rytilahti
Copy link
Copy Markdown
Member

No worries, thanks for the effort!

I think the proper way on OSX is to install python3 with brew, and then use virtualenv like shown in https://gist.github.com/pandafulmanda/730a9355e088a9970b18275cb9eadef3

When the environment has been activated, you can simply execute python and pip and it is using the one installed in that virtual environment.

epicalex added a commit to epicalex/home-assistant.io that referenced this pull request Jan 21, 2020
I got the device model number wrong in home-assistant#11805, it's KP303, not HS303, apologies.
@epicalex epicalex mentioned this pull request Jan 21, 2020
2 tasks
@epicalex
Copy link
Copy Markdown
Contributor Author

Had to submit another PR cause I got the model number wrong 🤦‍♂ #11831

However, I have now been able to run the kasa discovery test, so a PR is landing for that shortly. Thanks for the advice on using virtualenv

@epicalex
Copy link
Copy Markdown
Contributor Author

frenck pushed a commit that referenced this pull request Jan 21, 2020
I got the device model number wrong in #11805, it's KP303, not HS303, apologies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

current This PR goes into the current branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants