Skip to content

Add TP-Link Archer C20 device tracking support#11827

Closed
btomer wants to merge 1 commit intohome-assistant:devfrom
btomer:tplink-archer-c20-support
Closed

Add TP-Link Archer C20 device tracking support#11827
btomer wants to merge 1 commit intohome-assistant:devfrom
btomer:tplink-archer-c20-support

Conversation

@btomer
Copy link
Copy Markdown

@btomer btomer commented Jan 20, 2018

Description:

Added device_tracker support for my TP-Link Archer C20 router.
Tested on firmware 0.9.1 4.0 v0044.0 Build 160427.

Checklist:

  • The code change is tested and works locally.

If the code communicates with devices, web services, or third-party tools:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
    (There are no new external dependencies and no new files)

Copy link
Copy Markdown
Contributor

@amelchio amelchio left a comment

Choose a reason for hiding this comment

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

There is a HA rule that device specific protocol information must be handled by an external PyPI library. Even if the TP-Link device tracker is not a great example of that, a PR making it even worse is unlikely to get accepted at this time.

It seems that someone has already created such a library, from the HA code even: https://github.com/ericpignet/pytplinkrouter

So if you can get your change added to pytplinkrouter instead and then modify this device tracker to use the library, that would be a great contribution!

@ericpignet
Copy link
Copy Markdown
Contributor

Hi all,
Just a bit of context about this library.
I proposed a PR to add support for TP-Link N600 back in November: #10506
But it was rejected, balloob asked all router specific code to be in an external library.
So I created an external library https://github.com/ericpignet/pytplinkrouter/ with is mostly a copy/paste from the TPLink HA component, with support for my device on top. And I'm using a custom version of tplink.py to use it.
I have not proposed any PR for the custom TPLink component using the new library because it was a very early version: it moves the HA terminology/component functions to the library, but it would be much cleaner to have a more neutral library and HA stuff in HA. I thought there was no rush.
However if others want to add support for new models, I'm happy to already propose a PR with current version, and we can still improve later on.

Eric

@amelchio
Copy link
Copy Markdown
Contributor

If you are willing to maintain your library for the long haul, changing now makes sense to me.

@balloob
Copy link
Copy Markdown
Member

balloob commented May 2, 2018

Please provide a PR to use pytplinkrouter. We should not add new classes to this file.

@balloob balloob closed this May 2, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Sep 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants