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
127 stars 15 forks source link

Archer C6v2/AC1200 login failed #6

Closed Benchbench7 closed 10 months ago

Benchbench7 commented 11 months ago

Hi, to be honest, I'm not very knowledgeable regarding technology. In case you assist me with the setup, I may ask you to explain it as if I am a five-year-old.

Accessing IP address and password for access is correct. Re-installation does not seem to have had any effect so far. Can I help you with any information? Is there a way to determine if the issue only affects me or if it is widespread? Many thanks and best regards!

AlexandrErohin commented 11 months ago

Could you tell me what is your Firmware Version, Hardware Version and what is in Home Assistant logs? Like NeoFax75 described his error in this issue https://github.com/AlexandrErohin/home-assistant-tplink-router/issues/5

Benchbench7 commented 11 months ago

Firmware Version: 1.3.7 Build 20220613 rel.64828(4555) Hardware Version: Archer C6 v2.0

Home Assistant log regarding the integration:

Logger: custom_components.tplink_router.config_flow Source: custom_components/tplink_router/config_flow.py:38 Integration: TP-Link Router (documentation) First occurred: 03:12:44 (11 occurrences) Last logged: 23:14:38

login failed
Cannot connect to host https:80 ssl:default [Name has no usable address]
Cannot connect to host http:80 ssl:default [Name has no usable address]
AlexandrErohin commented 11 months ago

What ip do you put in here ? https://raw.githubusercontent.com/AlexandrErohin/home-assistant-tplink-router/master/docs/media/config_flow.png

Have you tried to put only password to this window and dont edit the ip and login? Ip and login works with default values mostly

Benchbench7 commented 11 months ago

Initially, I attempted the default login, yes.

As evidenced in the log, I made approximately 11 attempts with varying login credentials. First, I tried 192.168.0.1. Afterward, I attempted 192.168.1.1 and the address (http://)tplinkwifi.net.

I have a couple of notes that might be relevant

AlexandrErohin commented 11 months ago

What url do you use to enter router's web ui in browser?

Benchbench7 commented 11 months ago

I use 192.168.0.1. which redirects to http://192.168.0.1/webpages/login.html?t=1655114411095

AlexandrErohin commented 11 months ago

it looks like you have a problem with DNS https://community.home-assistant.io/t/suddenly-hass-cannot-connect-to-internet-ressources-dns-issue/239313/5

AlexandrErohin commented 11 months ago

I succeed to catch this error. I passed to IP address field - http://192.168.0.1 But the correct value is - 192.168.0.1

AlexandrErohin commented 11 months ago

I have added more logs for errors. @Benchbench7 Could you reinstall it and check the logs again?

Benchbench7 commented 11 months ago

I seem to be getting this error message. I honestly didn't give any further feedback as I didn't want to cause too much work.

Logger: custom_components.tplink_router.config_flow Source: custom_components/tplink_router/config_flow.py:49 Integration: TP-Link Router (documentation, issues) First occurred: 17:47:44 (4 occurrences) Last logged: 17:49:02

TplinkRouter Integration Exception - No data in response: {"errorcode":"login failed","success":false,"data":{"failureCount":1,"attemptsAllowed":9}}

AlexandrErohin commented 11 months ago

It looks like password is wrong - I got this error when I typed wrong password

Benchbench7 commented 11 months ago

Unfortunately, I have now tried 6 times. The same password works on the login page under 192.168.0.1 but not in the input mask of the addon.

No data in response: {"errorcode":"login failed","success":false,"data":{"failureCount":6,"attemptsAllowed":4}}

AlexandrErohin commented 11 months ago

Could you try to change your password for a simpler one just for the try? Do you use login in integration as default - admin?

Benchbench7 commented 11 months ago

Interesting. I can log in with an incredibly simple password. However, I get a message that no devices or entities are found.

Logger: homeassistant.config_entries Source: config_entries.py:402 First occurred: 19:02:21 (2 occurrences) Last logged: 19:03:07

Error setting up entry http://192.168.0.1 for tplink_router Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/tplink_router/init.py", line 40, in async_setup_entry coord = TPLinkRouterCoordinator(hass, device, config_entry.data[CONF_SCAN_INTERVAL], info, _LOGGER) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/tplink_router/coordinator.py", line 19, in init self.firmware = info[0]


TypeError: 'NoneType' object is not subscriptable
AlexandrErohin commented 11 months ago

Are you sure that this log is actual after successful login?

After successful login it would take some time for sensors to be updated

Benchbench7 commented 11 months ago

The integration is shown to be enlisted under integrations. This has always failed before.

When I go to the integration section of the TP Link Router, I get a 'Failed to set up' message. In the integration it says "Attention required" and "No devices or entities found".

AlexandrErohin commented 11 months ago

@Benchbench7 Archer C6 v2.0 support has fixed It was tested on Archer C6 v2.0 Firmware: 1.3.7 Build 20220613 rel.64828(4555) here Could you reinstall and check again?

Benchbench7 commented 10 months ago

Since the update to version 1.2.3, the integration is fully operational, thank you.

Regarding password limitations, are there any restrictions on length, numbers, special characters, upper and lower case letters that I should be aware of?

AlexandrErohin commented 10 months ago

About password limitations I dont know - but it looks like there is some limitation

AlexandrErohin commented 7 months ago

@Benchbench7 Please, dont forget to give a star to the repo :)