ericpignet / home-assistant-tplink_router Goto Github PK
View Code? Open in Web Editor NEWTPLink router device tracker for Home Assistant
TPLink router device tracker for Home Assistant
After install - get error
device_tracker.tplink_router Integration 'tplink_router' not found.
Solution - add row in manifest.json
"version": "0.6",
like this:
{
"domain": "tplink_router",
"name": "TPLink Router device tracker",
"documentation": "https://github.com/ericpignet/home-assistant-tplink_router",
"requirements": [],
"dependencies": [],
"version": "0.6",
"codeowners": ["@ericpignet"]
}
Please let me know if anything else is required to diagnose the issue, a little new to this and am not sure what is required
EDIT: Its a VR1600v v2
Firmware: 0.1.0 0.9.1 v5006.0 Build 200304 Rel.64006n
Error setting up platform legacy tplink_router
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 282, 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 56, in get_scanner
scanner = cls(config[DOMAIN])
File "/config/custom_components/tplink-router/device_tracker.py", line 494, in __init__
super(VR600TplinkDeviceScanner, self).__init__(config)
File "/config/custom_components/tplink-router/device_tracker.py", line 83, in __init__
self.success_init = self._update_info()
File "/config/custom_components/tplink-router/device_tracker.py", line 649, in _update_info
gotToken = self._get_auth_tokens()
File "/config/custom_components/tplink-router/device_tracker.py", line 588, in _get_auth_tokens
jsessionId = self._get_jsession_id()
File "/config/custom_components/tplink-router/device_tracker.py", line 544, in _get_jsession_id
response = requests.post(url, headers=headers)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=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 ('Referer') from {'Referer': 'http://10.8.0.1'} must be of type str or bytes, not <class 'multidict._multidict.istr'>
Version 0.0.2 works great.
Log error with version 0.0.3:
Logger: homeassistant.components.device_tracker
Source: custom_components/tplink_router/device_tracker.py:537
Integration: Device tracker (documentation, issues)
First occurred: 3:23:45 PM (1 occurrences)
Last logged: 3:23:45 PM
Error setting up platform legacy
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 64, in async_setup_legacy
self.platform.get_scanner, hass, {DOMAIN: self.config}
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/tplink_router/device_tracker.py", line 54, in get_scanner
scanner = cls(config[DOMAIN])
File "/config/custom_components/tplink_router/device_tracker.py", line 513, in init
super(Tplink6DeviceScanner, self).init(config)
File "/config/custom_components/tplink_router/device_tracker.py", line 81, in init
self.success_init = self._update_info()
File "/config/custom_components/tplink_router/device_tracker.py", line 679, in _update_info
gotToken = self._get_auth_tokens()
File "/config/custom_components/tplink_router/device_tracker.py", line 613, in _get_auth_tokens
pubkey = self._get_pub_key()
File "/config/custom_components/tplink_router/device_tracker.py", line 537, in _get_pub_key
e = int(ee, 16)
ValueError: invalid literal for int() with base 16: ''
This doesn't seem to be working on my EAP-225 v3 AP (on latest firmware);
`Log Details (ERROR)
Logger: custom_components.tplink_router.device_tracker
Source: custom_components/tplink_router/device_tracker.py:473
Integration: tplink_router (documentation)
First occurred: 9:15:36 PM (1 occurrences)
Last logged: 9:15:36 PM
AP didn't respond with JSON. Check if credentials are correct`
The credentials are correct. I have tried with the current version and the previous.
Hi, I have 3 TL-WR840N- one is HOST and the other two are used as extenders. What kind of indormation will be needed to add support for this model?
Cheers
EAP-225 AP supports the Omada management portal -- any chance that this integration supports it too?
Dont seem to be able to get this running, any suggestions ??
2022-05-23 03:23:46 INFO (MainThread) [homeassistant.components.device_tracker] Setting up device_tracker.tplink_router
2022-05-23 03:23:46 INFO (SyncWorker_4) [custom_components.tplink_router.device_tracker] [VR600] Loading wireless clients...
2022-05-23 03:23:46 INFO (SyncWorker_4) [custom_components.tplink_router.device_tracker] Retrieving PublicKey...
2022-05-23 03:23:46 INFO (SyncWorker_4) [custom_components.tplink_router.device_tracker] Failed to get AuthTokens. Retrying in 3 secs.
2022-05-23 03:23:49 INFO (SyncWorker_4) [custom_components.tplink_router.device_tracker] Retrieving PublicKey...
2022-05-23 03:23:49 INFO (SyncWorker_4) [custom_components.tplink_router.device_tracker] Retrieving JSessionID...
2022-05-23 03:23:49 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy tplink_router
File "/config/custom_components/tplink_router/device_tracker.py", line 56, in get_scanner
File "/config/custom_components/tplink_router/device_tracker.py", line 494, in __init__
File "/config/custom_components/tplink_router/device_tracker.py", line 83, in __init__
File "/config/custom_components/tplink_router/device_tracker.py", line 654, in _update_info
File "/config/custom_components/tplink_router/device_tracker.py", line 588, in _get_auth_tokens
File "/config/custom_components/tplink_router/device_tracker.py", line 550, in _get_jsession_id
My guess is the issue is here: Failed to get AuthTokens. Retrying in 3 secs
Router : Tp link Archer C6 Indian variant
The error I am getting after adding the details in configuration.yaml
Do I need to install integration after installing from hacs, I cant find tplink router in integration search in HA
Error :
Platform error device_tracker.tplink_router - Integration 'tplink_router' not found.
Using VR600.
The home of my router is accepting only email and password..
Using it doesn't seems to be working.
How do I switch to username/password (not TPLink account) login?
Which attribute would one use to determine if a device is home or away? I tried manually entering "place" and simply leaving the attribute field blank. I tried using source, scanner, and family name, the only three options given. None work. The entity does say either away or home but won't trigger anything.
this link: https://github.com/ericpignet/home-assistant-tplink_router/blob/master/integrations/device_tracker
it no longer exists.
How do we use this?
Hi there,
Seems to be working with the AX6000. At least, after i integrate your code, my router was discovered.
However there is no scanning of all addresses.
I can do some trials if you want,
Philippe
The work done seems to be relevant to another feature: that of toggling ACCESS CONTROL (on Advanced settings > Security).
Together with an automation in HA, it would be useful to switch of network access to some devices (eg parental control)
I can help somewhat, at least in testing, since my Python skills are rather limited
The page on how to use the device tracker appears to not exist.
Hi there,
I am currently trying to setup this integration and have everything installed but I am getting the error:
Error setting up platform legacy tplink_router
I have no idea what I am doing wrong or if I am doing anything wrong at all. Does anyone have any idea why this would be happening please?
Jamie
I'm told to report this error in my hass logs, forbidding to load this integration:
homeassistant | 2021-05-31 02:13:43 ERROR (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'tplink_router'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'tplink_router'
h
"For Archer D9 model the default IP is 192.168.1.1, the username is not necessary and you can leave that field blank."
Following this advice for my router of a different model number, the yaml errors and asks for a username.
When this integration runs, with VR600 and perhaps other routers, every time it logs in to the router to fetch existing users, it kicks out the logged in session from the admin page of the router (192.168.1.1)
One workaround is to increase the interval_seconds
field
device_tracker:
- platform: tplink_router
host: IP_ADDRESS
username: YOUR_USERNAME
password: YOUR PASSWORD
interval_seconds: 10 // <------- change this to 60 for once in every minute
I'll try to find a way to do that without kicking the user out - but just for you to know, this is a known issue
Hi! I've edited the OriginalTPLinkDeviceScanner to work with dual band routers. It did work already for 2.4 GHz devices, but devices connected to the 5GHz SSID could not be tracked since they are on another url.
Not sure if this breaks support for single band routers though.
class OriginalTplinkDeviceScanner(TplinkDeviceScanner):
"""This class queries a wireless router running TP-Link firmware.
Oldest firmware supported by this integration."""
def _update_info(self):
"""Ensure the information from the TP-Link router is up to date.
Return boolean if scanning successful.
"""
_LOGGER.info("[Original] Loading wireless clients...")
url = 'http://{}/userRpm/WlanStationRpm.htm'.format(self.host)
referer = 'http://{}'.format(self.host)
page = requests.get(
url, auth=(self.username, self.password),
headers={REFERER: referer}, timeout=4)
pagetext = page.text
# Find devices on 5GHz band
url = 'http://{}/userRpm/WlanStationRpm_5g.htm'.format(self.host)
referer = 'http://{}'.format(self.host)
page = requests.get(
url, auth=(self.username, self.password),
headers={REFERER: referer}, timeout=4)
# Combine results from 2.4 GHz and 5 GHz
pagetext = pagetext + ' ' + page.text
result = self.parse_macs_hyphens.findall(pagetext)
if result:
self.last_results = [mac.replace("-", ":") for mac in result]
return True
return False
Hi
Will be great If you can add support for Archer VR1600v
cheers
I tried with my router above and worked well!
Hi,
I'd love to help to get the AX11000 working with this integration.
How can we can get the ball rolling?
Cool! Will this still work with a TP Link Cloud connected device? I have the C5400 and have a TP-Link Cloud account the I use to login to the device.
I would like to see this integration support the x60 router. I can test on my backup HA system. Let me know what info to provide you to help.
While trying to use ingegration got following error in Home Assistant:
2021-09-30 20:46:25 ERROR (SyncWorker_2) [homeassistant.loader] The custom integration 'tplink_router' does not have a valid version key (None) in the manifest file and was blocked from loading. See https://developers.home-assistant.io/blog/2021/01/29/custom-integration-changes#versions for more details
Home Assistant Supervised on Rasbperry PI Debian
Integration installed by HACS
Hi there,
thanks a lot for developing this plugin.
Unfortunately isn't my router supported (yet).
I'm a software developer and can probably get it to work myself after a lot of trial and error.
I'm hoping you can give me a push into the right direction, so I can make this plugin work for my router and so others can benefit from this as well.
This is was I got in my log:
2020-06-23 21:26:10 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for tplink_router which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-06-23 21:26:15 ERROR (SyncWorker_0) [custom_components.tplink_router.device_tracker] AP didn't respond with JSON. Check if credentials are correct
2020-06-23 21:26:15 ERROR (SyncWorker_0) [custom_components.tplink_router.device_tracker] Error 404 from router
2020-06-23 21:26:16 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 64, in async_setup_legacy
self.platform.get_scanner, hass, {DOMAIN: self.config}
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/tplink_router/device_tracker.py", line 56, in get_scanner
scanner = cls(config[DOMAIN])
File "/config/custom_components/tplink_router/device_tracker.py", line 237, in init
super(C9TplinkDeviceScanner, self).init(config)
File "/config/custom_components/tplink_router/device_tracker.py", line 83, in init
self.success_init = self._update_info()
File "/config/custom_components/tplink_router/device_tracker.py", line 285, in _update_info
self._get_auth_tokens()
File "/config/custom_components/tplink_router/device_tracker.py", line 266, in _get_auth_tokens
self.stok = response.json().get('data').get('stok')
AttributeError: 'str' object has no attribute 'get'
Please let me know if I can provide you with something else.
Thanks in advance for your help.
Ron
Trying your integration and it is not seems to work
Firmware Version:
1.0.1 Build 20200907 rel.76867(4555)
Hardware Version:
Archer AX73 v1.0
First trying to get encrypted password (as plain text does not seems to work), but both given commands give nothing.
The container on login page is given like that:
Hello,
can you help me with this issue?
Device tracker doesnt work with my router.
Logger: homeassistant.components.device_tracker
Source: custom_components/tplink_router/device_tracker.py:451
Integration: Device tracker (documentation, issues)
First occurred: 10:10:07 AM (1 occurrences)
Last logged: 10:10:07 AM
Error setting up platform legacy tplink_router
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 282, 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 56, in get_scanner
scanner = cls(config[DOMAIN])
File "/config/custom_components/tplink_router/device_tracker.py", line 83, in init
self.success_init = self._update_info()
File "/config/custom_components/tplink_router/device_tracker.py", line 451, 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'>
Thank you
Expectedly, TP-Link v100 does not seem to work - on startup, i get this error for my TP-Link-v100 router:
homeassistant | 2021-05-31 02:52:28 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy tplink_router
homeassistant | Traceback (most recent call last):
homeassistant | File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 236, in async_setup_legacy
homeassistant | scanner = await hass.async_add_executor_job(
homeassistant | File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
homeassistant | result = self.fn(*self.args, **self.kwargs)
homeassistant | File "/config/custom_components/tplink_router/device_tracker.py", line 56, in get_scanner
homeassistant | scanner = cls(config[DOMAIN])
homeassistant | File "/config/custom_components/tplink_router/device_tracker.py", line 494, in __init__
homeassistant | super(VR600TplinkDeviceScanner, self).__init__(config)
homeassistant | File "/config/custom_components/tplink_router/device_tracker.py", line 83, in __init__
homeassistant | self.success_init = self._update_info()
homeassistant | File "/config/custom_components/tplink_router/device_tracker.py", line 649, in _update_info
homeassistant | gotToken = self._get_auth_tokens()
homeassistant | File "/config/custom_components/tplink_router/device_tracker.py", line 588, in _get_auth_tokens
homeassistant | jsessionId = self._get_jsession_id()
homeassistant | File "/config/custom_components/tplink_router/device_tracker.py", line 550, in _get_jsession_id
homeassistant | self.jsessionId = dict(response.cookies)['JSESSIONID']
homeassistant | KeyError: 'JSESSIONID'
with this simple config:
device_tracker:
- platform: tplink_router
host: 192.168.0.1
username: admin
password: !secret router_pswd
archer c1200 v2.0
no username field for router home page, only password field
AP didn't respond with JSON. Check if credentials are correct
Couldn't fetch auth tokens!
Response was: {"errorcode":"login failed","success":false,"data":{"failureCount":1,"errorcode":"-5002","attemptsAllowed":9}}
Router didn't respond with JSON. Check if credentials are correct.
Error 404 from router
How can i help?
Need support for DECO series.
After logon
Main page (DIV id="map-router" class="map-item map-router")
URL = router_ip/webpages/index.html#networkMap
Clients page - ( DIVid="map-clients" class="map-item map-clients")
same url /webpages/index.html#networkMap
Click on Clients icon just add/remove active for class of div
class="map-item map-clients active"
class="map-item map-router active"
I am working on improving somewhat this project, for the C6 v2 Archer, which seems to be using something similar to the C9 (Lua interface)
I have managed to implement logging into the router using RSA encryption, with some caveats.
REFERENCES
RSA encryption uses this library: http://www-cs-students.stanford.edu/~tjw/jsbn/
Using this, I can generate the approriate signatures. However, my python scripts do not correspond (yet to this protocol). Seems to be PKCS1 v1.5
Tried the following: https://stackoverflow.com/questions/59063930/implementing-rsa-pkcs1-padding-in-python-3-x
A lot on info on TPlink router: https://github.com/ocastejon/exploits OR https://the-hyperbolic.com/posts/hacking-the-tlwpa4220-part-3/
Also looking at https://github.com/marcnewlin/ax1500-crypto-client/blob/master/ax1500-poc.py
My problem so far is getting the RSA protocol right. Once this is done, I will post results here.
Hi! Updated HA to 0.188.4 and saw that device tracker stop working. Saw this error in logs:
Logger: homeassistant.components.device_tracker
Source: custom_components/tplink_router/device_tracker.py:500
Integration: Отслеживание устройств (documentation, issues)
First occurred: 21:37:01 (1 occurrences)
Last logged: 21:37:01
Error setting up platform legacy
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 169, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 96, in create_connection
raise err
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 86, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 394, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 234, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/local/lib/python3.8/http/client.py", line 1255, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1301, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1250, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1010, in _send_output
self.send(msg)
File "/usr/local/lib/python3.8/http/client.py", line 950, in send
self.connect()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 200, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 181, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fae8b8610>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 573, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.254', port=80): Max retries exceeded with url: /cgi/getParm (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fae8b8610>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 63, in async_setup_legacy
scanner = await hass.async_add_executor_job(
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/tplink_router/device_tracker.py", line 56, in get_scanner
scanner = cls(config[DOMAIN])
File "/config/custom_components/tplink_router/device_tracker.py", line 494, in init
super(VR600TplinkDeviceScanner, self).init(config)
File "/config/custom_components/tplink_router/device_tracker.py", line 83, in init
self.success_init = self._update_info()
File "/config/custom_components/tplink_router/device_tracker.py", line 649, in _update_info
gotToken = self._get_auth_tokens()
File "/config/custom_components/tplink_router/device_tracker.py", line 583, in _get_auth_tokens
pubkey = self._get_pub_key()
File "/config/custom_components/tplink_router/device_tracker.py", line 500, in _get_pub_key
response = requests.post(url, headers={ 'REFERER': referer})
File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 119, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.1.254', port=80): Max retries exceeded with url: /cgi/getParm (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fae8b8610>: Failed to establish a new connection: [Errno 111] Connection refused'))
I am trying to connect my AX1500 using this plugin, however it can't seem to authenticate.
My router doesn't ask for a username, just a local password (unless you decide to log in with tp-link ID).
Here are all relevant logs:
If I use admin
as the username:
2020-11-15 16:45:47 INFO (SyncWorker_11) [custom_components.tplink_router.device_tracker] [VR600] Loading wireless clients...
2020-11-15 16:45:47 INFO (SyncWorker_11) [custom_components.tplink_router.device_tracker] Retrieving PublicKey...
2020-11-15 16:45:47 INFO (SyncWorker_11) [custom_components.tplink_router.device_tracker] Failed to get AuthTokens. Retrying in 3 secs.
2020-11-15 16:45:50 INFO (SyncWorker_11) [custom_components.tplink_router.device_tracker] Retrieving PublicKey...
2020-11-15 16:45:50 INFO (SyncWorker_11) [custom_components.tplink_router.device_tracker] [EAP225] Loading wireless clients...
2020-11-15 16:45:50 ERROR (SyncWorker_11) [custom_components.tplink_router.device_tracker] AP didn't respond with JSON. Check if credentials are correct
2020-11-15 16:45:50 INFO (SyncWorker_11) [custom_components.tplink_router.device_tracker] [N600] Loading wireless clients...
2020-11-15 16:45:50 ERROR (SyncWorker_11) [custom_components.tplink_router.device_tracker] Error 404 from router
2020-11-15 16:45:50 INFO (SyncWorker_11) [custom_components.tplink_router.device_tracker] [C7] Loading wireless clients...
2020-11-15 16:45:50 INFO (SyncWorker_11) [custom_components.tplink_router.device_tracker] Retrieving auth tokens...
2020-11-15 16:45:50 INFO (SyncWorker_11) [custom_components.tplink_router.device_tracker] [C9] Loading wireless clients...
2020-11-15 16:45:50 INFO (SyncWorker_11) [custom_components.tplink_router.device_tracker] Retrieving auth tokens...
2020-11-15 16:45:50 ERROR (SyncWorker_11) [custom_components.tplink_router.device_tracker] Couldn't fetch auth tokens! Response was: {"data":""}
2020-11-15 16:45:50 ERROR (SyncWorker_11) [custom_components.tplink_router.device_tracker] An unknown error happened while fetching data
2020-11-15 16:45:50 INFO (SyncWorker_11) [custom_components.tplink_router.device_tracker] [OldC9] Loading wireless clients...
2020-11-15 16:45:50 ERROR (SyncWorker_11) [custom_components.tplink_router.device_tracker] Router didn't respond with JSON. Check if credentials are correct.
2020-11-15 16:45:50 INFO (SyncWorker_11) [custom_components.tplink_router.device_tracker] [Original] Loading wireless clients...
If I user ""
(empty string) as the username:
2020-11-15 16:53:16 INFO (SyncWorker_6) [custom_components.tplink_router.device_tracker] [VR600] Loading wireless clients...
2020-11-15 16:53:16 INFO (SyncWorker_6) [custom_components.tplink_router.device_tracker] Retrieving PublicKey...
2020-11-15 16:53:16 INFO (SyncWorker_6) [custom_components.tplink_router.device_tracker] Failed to get AuthTokens. Retrying in 3 secs.
2020-11-15 16:53:19 INFO (SyncWorker_6) [custom_components.tplink_router.device_tracker] Retrieving PublicKey...
2020-11-15 16:53:19 INFO (SyncWorker_6) [custom_components.tplink_router.device_tracker] [EAP225] Loading wireless clients...
2020-11-15 16:53:19 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 421, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.8/http/client.py", line 1347, in getresponse
response.begin()
File "/usr/local/lib/python3.8/http/client.py", line 331, in begin
self.headers = self.msg = parse_headers(self.fp)
File "/usr/local/lib/python3.8/http/client.py", line 216, in parse_headers
line = fp.readline(_MAXLINE + 1)
File "/usr/local/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 726, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 410, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.8/site-packages/urllib3/packages/six.py", line 734, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 421, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.8/http/client.py", line 1347, in getresponse
response.begin()
File "/usr/local/lib/python3.8/http/client.py", line 331, in begin
self.headers = self.msg = parse_headers(self.fp)
File "/usr/local/lib/python3.8/http/client.py", line 216, in parse_headers
line = fp.readline(_MAXLINE + 1)
File "/usr/local/lib/python3.8/socket.py", line 669, in readinto
return self._sock.recv_into(b)
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 63, in async_setup_legacy
scanner = await hass.async_add_executor_job(
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/tplink_router/device_tracker.py", line 56, in get_scanner
scanner = cls(config[DOMAIN])
File "/config/custom_components/tplink_router/device_tracker.py", line 83, in __init__
self.success_init = self._update_info()
File "/config/custom_components/tplink_router/device_tracker.py", line 454, in _update_info
session.post(base_url, login_data, headers=header)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 578, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
I understand the AX1500 isn't one of the tested routers, but any help would be appreciated.
Hi,
I'm trying to install the integration through HACS, but unfortunately, when I add it as a custom repository, I'm getting the following error message:
<Integration ericpignet/home-assistant-tplink_router> Repository has been requested to be removed.
Hello,
I've tried to use this integration with an Archer C2300 v2.0.
It fails at the login stage.
Any suggestions?
Hi, I wanted to try the integration with my TP Link Archer VR1200v but when after configuring the configuration.yaml the following error comes out.
device_tracker:
- platform: tplink_router
host: !secret tplink_router_ip
username: !secret tplink_router_username
password: !secret tplink_router_password
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.