AlexandrErohin / home-assistant-tplink-router

Home Assistant component for TP-Link router administration with sensors, button reboot, switches and device tracking.
https://community.home-assistant.io/t/custom-component-tp-link-router-integration
MIT License
137 stars 16 forks source link

Error by authentication #52

Closed dreamfoxmedia closed 5 months ago

dreamfoxmedia commented 7 months ago

TplinkRouter - TPLinkDecoClient - Cannot authorize! Error - Extra data: line 1 column 2 (char 1); Response - 5GjwKMgbD0aIu4XYgnEEt8fsEbrSAmxtEf0u3F+AHAtRlfcmzNSR654LrRaCXgJ9EHO1pXko8eyI5P9H0AU8YAp5Q/ry1qaa1WCKUKnu5grNpLn0vZp0e2X+3EL2+A/jVhjnUAQVlZTw1FIHeTXP0+Jn4v0jHPKuxMyMbkSsdi21Z0ZeX4PDWmL+domqmyiZLbWoxmAh4jdtAU+RIezZBFGRIxj0+X3+yYuvl3JGLcz6uKZxg95ut6AF9i4ZsJ+NzrjilVeHzzfquI77tVj07WZyDbOds8CmKKsLj4p6TZ7AAh2SwmcJ7oUQp14owkhr

Deco M4

Error by authentication

AlexandrErohin commented 7 months ago

@dreamfoxmedia What is your router hardware version? What password do you use to log in? - It should be your password for Deco APP. Password for manager account doesnt work

Deco M4 support was confirmed https://github.com/AlexandrErohin/home-assistant-tplink-router/issues/37 and https://github.com/AlexandrErohin/home-assistant-tplink-router/issues/47

dreamfoxmedia commented 7 months ago

@AlexandrErohin :

I did a restart and then the error was gone. But it says Needs attention. No devices or entities:

Screenshot (4)

In the errorlog:

Logger: homeassistant.config_entries Bron: config_entries.py:551 Eerst voorgekomen: 14:55:32 (1 gebeurtenissen) Laatst gelogd: 14:55:32

Error setting up entry http://192.168.1.1 for tplink_router Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 467, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 462, in _make_request httplib_response = conn.getresponse() ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/http/client.py", line 1423, in getresponse response.begin() File "/usr/local/lib/python3.12/http/client.py", line 331, in begin version, status, reason = self._read_status() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/http/client.py", line 292, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/socket.py", line 707, in readinto return self._sock.recv_into(b) ^^^^^^^^^^^^^^^^^^^^^^^ TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/packages/six.py", line 770, in reraise raise value File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 469, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 358, in _raise_timeout raise ReadTimeoutError( urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='192.168.1.1', port=80): Read timed out. (read timeout=10)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 551, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/tplink_router/init.py", line 47, in async_setup_entry firmware, status = await hass.async_add_executor_job(TPLinkRouterCoordinator.request, client, callback) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/tplink_router/coordinator.py", line 56, in request data = callback() ^^^^^^^^^^ File "/config/custom_components/tplink_router/init.py", line 43, in callback stat = client.get_status() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/tplinkrouterc6u/client.py", line 559, in get_status data = self.request('admin/client?form=client_list', json.dumps( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/tplinkrouterc6u/client.py", line 79, in request response = requests.post( ^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 115, in post return request("post", url, data=data, json=json, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 532, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPConnectionPool(host='192.168.1.1', port=80): Read timed out. (read timeout=10)

firmware: 1.6.2 Build 20240308 Rel: 55841

dreamfoxmedia commented 6 months ago

Any update?

AlexandrErohin commented 6 months ago

@dreamfoxmedia Hi Could you try version v1.13.3?