Skip to content
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

issue with latest HA 2022.3.6 #6

Open
moshriq opened this issue Mar 26, 2022 · 5 comments
Open

issue with latest HA 2022.3.6 #6

moshriq opened this issue Mar 26, 2022 · 5 comments

Comments

@moshriq
Copy link

moshriq commented Mar 26, 2022

the config checker gives 'Platform error switch.tplink_router - Integration 'tplink_router' not found.'

@theshop35
Copy link

theshop35 commented May 21, 2022

I have same error. What's the solution.
I have Tplink Archer C64 AC1200 router.
Please help.

@madeline-scyphers
Copy link

@moshriq @theshop35 So the when I used HACS with the GitHub link, it didn't work because it didn't clone the latest version on main. It used the most recent tagged released from September, which didn't have the version in the manifest json file yet.

So I got it to work by cloning it instead, and then mv Home-Assistant-TP-Link-Router/custom_components/tplink_router/ tplink_router while at /config/custom_components to move just the custom components code. You can then do rm -r Home-Assistant-TP-Link-Router. Restart, It should then work.

Hopefully @menahishayan sees this and gets an updated version released. I think the code is all right, just not released.

@madeline-scyphers
Copy link

I lied, I think there might be other things wrong too.

2022-07-25 19:20:31 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy tplink_router
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 248, in async_setup_legacy
scanner = await hass.async_add_executor_job(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/tplink_router/device_tracker.py", line 57, in get_scanner
scanner = cls(config[DOMAIN])
File "/config/custom_components/tplink_router/device_tracker.py", line 84, in __init__
self.success_init = self._update_info()
File "/config/custom_components/tplink_router/device_tracker.py", line 468, in _update_info
session.get(base_url, headers=header)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 573, in request
prep = self.prepare_request(req)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 484, in prepare_request
p.prepare(
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 369, in prepare
self.prepare_headers(headers)
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 491, in prepare_headers
check_header_validity(header)
File "/usr/local/lib/python3.10/site-packages/requests/utils.py", line 1037, in check_header_validity
raise InvalidHeader(
requests.exceptions.InvalidHeader: Header part ('User-Agent') from {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0'} must be of type str or bytes, not <class 'multidict._multidict.istr'>

@jhalak1984
Copy link

Am I missing something? Can't find integration in HACS at all?

@prullmann
Copy link

You might want to try this different fork of tplink_router which mentions:

This fork has been updated to work with Home Assistant version 2022.7+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants