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

M9 Plus and http -> https update #213

Closed
sla004 opened this issue Aug 4, 2023 · 4 comments
Closed

M9 Plus and http -> https update #213

sla004 opened this issue Aug 4, 2023 · 4 comments
Labels
bug Something isn't working not_enough_data

Comments

@sla004
Copy link

sla004 commented Aug 4, 2023

Problem

Allways when I update this to latest version I have to manually update all http:// links to https:// in /config/custom_components/tplink_deco/api.py file. This feature has been there for long time but have not had time to report it. After https update and restart everything works correctly.

TP-Link Deco Version

1.6.1

Router Model

Deco M9 Plus

Debugging Information

Maybe not needed in this case?

@amosyuen
Copy link
Owner

amosyuen commented Aug 4, 2023

Have you tried setting the 443 port in the host e.g. 192.168.68.1:443?

@amosyuen amosyuen added bug Something isn't working not_enough_data labels Aug 11, 2023
@sla004
Copy link
Author

sla004 commented Aug 14, 2023

Below is error log when I tried to insert :443 after ip'

This error is from custom integration.

Logger: custom_components.tplink_deco.coordinator
Source: custom_components/tplink_deco/api.py:445
Integration: TP-Link Deco (documentation, issues)
First occurred: 14.24.20 (3 occurrences)
Last logged: 14.26.53

Unexpected error fetching tplink_deco-decos data: Timeout exception. If you get a lot of these see https://github.com/amosyuen/ha-tplink-deco#timeout-error.
Traceback (most recent call last):
File "/config/custom_components/tplink_deco/api.py", line 409, in _async_post
response = await self._session.post(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 560, in _request
await resp.start(conn)
File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 899, in start
message, payload = await protocol.read() # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/streams.py", line 616, in read
await self._waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/config/custom_components/tplink_deco/api.py", line 408, in _async_post
async with async_timeout.timeout(self._timeout_seconds):
File "/usr/local/lib/python3.11/site-packages/async_timeout/init.py", line 129, in aexit
self._do_exit(exc_type)
File "/usr/local/lib/python3.11/site-packages/async_timeout/init.py", line 212, in _do_exit
raise asyncio.TimeoutError
TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tplink_deco/coordinator.py", line 166, in _async_update_data
new_decos = await async_call_and_propagate_config_error(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tplink_deco/coordinator.py", line 47, in async_call_and_propagate_config_error
return await func(*args)
^^^^^^^^^^^^^^^^^
File "/config/custom_components/tplink_deco/api.py", line 166, in async_list_devices
return await self._async_call_with_retry(self._async_list_devices)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tplink_deco/api.py", line 557, in _async_call_with_retry
raise err
File "/config/custom_components/tplink_deco/api.py", line 544, in _async_call_with_retry
return await func(*args)
^^^^^^^^^^^^^^^^^
File "/config/custom_components/tplink_deco/api.py", line 169, in _async_list_devices
await self.async_login_if_needed()
File "/config/custom_components/tplink_deco/api.py", line 317, in async_login_if_needed
await self.async_login()
File "/config/custom_components/tplink_deco/api.py", line 334, in async_login
await self._login_future
File "/config/custom_components/tplink_deco/api.py", line 326, in async_login
await self._async_login()
File "/config/custom_components/tplink_deco/api.py", line 343, in _async_login
await self._async_fetch_keys()
File "/config/custom_components/tplink_deco/api.py", line 264, in _async_fetch_keys
response_json = await self._async_post(
^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tplink_deco/api.py", line 445, in _async_post
raise TimeoutException from err
custom_components.tplink_deco.exceptions.TimeoutException: Timeout exception. If you get a lot of these see https://github.com/amosyuen/ha-tplink-deco#timeout-error.

@amosyuen
Copy link
Owner

amosyuen commented Jan 9, 2024

In release https://github.com/amosyuen/ha-tplink-deco/releases/tag/v3.6.0 I modified host field to include scheme so you can change it to HTTPS.

@amosyuen amosyuen closed this as completed Jan 9, 2024
@sla004
Copy link
Author

sla004 commented Jan 9, 2024

I just confirm that this change was working correctly after installing latest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working not_enough_data
Projects
None yet
Development

No branches or pull requests

2 participants