petretiandrea / home-assistant-tapo-p100

A custom integration to control Tapo devices from home assistant.
MIT License
818 stars 101 forks source link

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

Open Adrian281701 opened 6 days ago

Adrian281701 commented 6 days ago

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 ```yaml 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 ```text Add your logs here. ```
JimmyKer commented 5 days ago

Perhaps this helps you as well ... https://github.com/petretiandrea/home-assistant-tapo-p100/issues/781#issuecomment-2421872696

Adrian281701 commented 5 days ago

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