Giter VIP home page Giter VIP logo

home-assistant-tplink_router's People

Contributors

ericpignet avatar guykh avatar mdagbro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

home-assistant-tplink_router's Issues

Header part ('Referer') from {'Referer': 'http://10.8.0.1'} must be of type str or bytes, not <class 'multidict._multidict.istr'>

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.3 stoped working in my C7 V2 170525

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: ''

EAP 225 (v3)

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.

Device request: TL-WR840N

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

Support Omada?

EAP-225 AP supports the Omada management portal -- any chance that this integration supports it too?

Error setting up platform legacy tplink_router

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

Cant find tp link router integration

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.

Login with email and password

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 determines away or home?

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.

Archer AX6000

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

Feature Request: Add control for ACCESS CONTROL

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

Error setting up platform legacy tplink_router

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

Missing 'version' from manifest file causes the intergation not to load

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

Leaving the username blank errors

"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.

[VR600] logging out users from the Admin panel

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

TL-WDR4900 (and likely other old dual-band routers)

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

Setting up AX11000

Hi,

I'd love to help to get the AX11000 working with this integration.

How can we can get the ball rolling?

Cloud connected devices

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.

X60 support

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.

No ‘version’ key in the manifest file for custom integration

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

image

Device/support request: Deco M9 Plus

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

Need dvice/help on setting your integration for AX5400 tplink router

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:

Local Password:
Show
Would appreciate your help to make it work

TPLink WR841N - Error setting up platform legacy tplink_router

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

TP-Link v100 does not work

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 C7 version

First, thx for the integration!

I have archer C& and the version I see is:

image

Is it supported?

device request: Archer C1200

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

Support TpLink router DECO series?

How can i help?
Need support for DECO series.

Logon only with password
2021-10-13_09-17-18

After logon
Main page (DIV id="map-router" class="map-item map-router")
URL = router_ip/webpages/index.html#networkMap
2021-10-13_09-20-02

Clients page - ( DIVid="map-clients" class="map-item map-clients")
same url /webpages/index.html#networkMap
2021-10-13_09-21-43

Click on Clients icon just add/remove active for class of div

class="map-item map-clients active"
class="map-item map-router active"

RSA encryption

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

  1. 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

  2. Tried the following: https://stackoverflow.com/questions/59063930/implementing-rsa-pkcs1-padding-in-python-3-x

  3. 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.

Error on startup after update to 0.118.4

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'))

Archer AX1500 - cannot connect

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.

Archer C2300 v2.0

Hello,
I've tried to use this integration with an Archer C2300 v2.0.
It fails at the login stage.
Any suggestions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.