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

Failed to connect error when entering Tapo app credentials when adding a new device #804

Open
Adrian281701 opened this issue Oct 17, 2024 · 5 comments

Comments

@Adrian281701
Copy link

Version of the integration 3.1.2

Version 3.1.4 downloaded and manually updated, but integration stilll shows 3.1.2 as does entry in const.py file (date of file 11.07.24

Configuration

Trying to add Tapo H100 hub, firmware version 1.5.20 build 240911 release 110830

Add your logs here.

Describe the bug

Home Assistant recognizes the addition of the H100 hub, however when I try to configue and enter the app credentials it fails with a message of "FAILED TO CONNECT"

email address used for crediatials does not contain any up case characters, but does contain numbers and an underscore.

Debug log

This error originated from a custom integration.

Logger: custom_components.tapo.config_flow
Source: custom_components/tapo/config_flow.py:231
integration: TP-Link Tapo (documentation, issues)
First occurred: 21:54:04 (2 occurrences)
Last logged: 22:07:29

Failed to setup cannot connect
Traceback (most recent call last):
File "/config/custom_components/tapo/config_flow.py", line 317, in _async_get_device
await device.update()
File "/usr/local/lib/python3.12/site-packages/plugp100/new/tapodevice.py", line 79, in update
await component.update(state)
File "/usr/local/lib/python3.12/site-packages/plugp100/new/components/hub_children_component.py", line 47, in update
await child_device.update()
File "/usr/local/lib/python3.12/site-packages/plugp100/new/tapodevice.py", line 79, in update
await component.update(state)
File "/usr/local/lib/python3.12/site-packages/plugp100/new/components/smart_door_component.py", line 15, in update
self.is_open = current_state["is_open"]
~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'is_open'

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

Traceback (most recent call last):
File "/config/custom_components/tapo/config_flow.py", line 231, in async_step_discovery_auth_confirm
device = await self._async_get_device_from_discovered(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tapo/config_flow.py", line 295, in _async_get_device_from_discovered
return await self._async_get_device(config | {CONF_HOST: discovered.ip}, discovered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/tapo/config_flow.py", line 322, in _async_get_device
raise CannotConnect from error
custom_components.tapo.errors.CannotConnect


Add your logs here.

@JimmyKer
Copy link

Perhaps this helps you as well ...
#781 (comment)

@Adrian281701
Copy link
Author

@JimmyKer, thanks for the pointer, unfortunatley it did not resolve the issue. I followed the procedure noted in the post, but received the same error message. My Tapo app pasword does contain alpha and numeric characters, and meets the minimmum character count, however, my app password does not incude any symbols or special characters. The credentials have always worked previousl when adding a P110 smart plug. To check I have added a further smart plug today with out issue, So I figue there is no issue with the credentials themselves.

The issue seems to be limited to adding the H100 hub, would I be better with the H200 hub? is this supported?

I have got around the issue somewhat by linking to the hub, and its linked device (T110) Smart Contact Sensor via Matter. But I would ike to resolve the matter for the Tapo Integration..

Just as a side note, when I changed the password, my existing Tapo smart plugs would not connect, obviousy due to the change in password, how do I update these for the new password? Not a biggy as I have reverted back to my orignal password, but worth knowing for the future. (I did reboot HA after changing the password)

Ad.

@townsmcp
Copy link

townsmcp commented Nov 3, 2024

Just to update this, I have found I have to change the Tapo password in the Tapo app when I get this error even if the password doesnt contain special characters. After changing password I can connect again from HA

@ebanin
Copy link

ebanin commented Nov 10, 2024

@Adrian281701 Hello Adrian.. How do you do to configure the T110 via Matter? I am having the same problem, that after I add the sensor, HA stops working.

@TheShai1
Copy link

Do we have to keep changing the password in the Tapo app every time we add a device?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants