petretiandrea / home-assistant-tapo-p100

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

P100 fail handshake #656

Open sejrbajer opened 10 months ago

sejrbajer commented 10 months ago

Version of the integration 2.12.2 HA core 2023 12.3 Supervisor 2023 12.0 Operating system 11.2 Frontend 20231208.2

Configuration:

All 3 Tapo P100 Hw: 2.0 Fw: 1.2.1 build 230804 rel. 190922

Describe the bug:

1 out of 3 will connect without issues, 2 and 3 will fail handshake then trying to add them.

Debug log:

Failed to setup cannot connect Traceback (most recent call last): File "/config/custom_components/tapo/config_flow.py", line 194, in _get_first_data_from_api .get_or_raise() ^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/plugp100/common/functional/tri.py", line 159, in get_or_raise raise self.value Exception: Device fail to respond to handshake1 with 403

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 119, in async_step_user device_data = await self._get_first_data_from_api(tapo_client) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/tapo/config_flow.py", line 199, in _get_first_data_from_api raise CannotConnect from error custom_components.tapo.errors.CannotConnect

buschbaby commented 10 months ago

Same here. First P100 added without problems, can't get the second one to work. Is there a chance to fix this?

petretiandrea commented 10 months ago

The 3 devices have the same firmware and hardware version?

sejrbajer commented 10 months ago

The 3 devices have the same firmware and hardware version? Yes, in the begin none of them want to work. Then factory reboot all 3, then i got one working, while the 2 other had issue with handshake. I even tried, to change the static ips i gave then through my router around, but nothing changed.

michlalp commented 10 months ago

Hi, same here I have three P110M and only one is working

ml0renz0 commented 9 months ago

Same here, got three plugs but the fourth always fails. Just updated to the latest version 2.13.0 but it still fails:

2024-01-15 23:28:40.365 ERROR (MainThread) [custom_components.tapo.config_flow] Failed to setup cannot connect 
Traceback (most recent call last):
  File "/config/custom_components/tapo/config_flow.py", line 194, in _get_first_data_from_api
    .get_or_raise()
     ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/plugp100/common/functional/tri.py", line 159, in get_or_raise
    raise self.value
Exception: Device fail to respond to handshake1 with 403

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 119, in async_step_user
    device_data = await self._get_first_data_from_api(tapo_client)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/tapo/config_flow.py", line 199, in _get_first_data_from_api
    raise CannotConnect from error
custom_components.tapo.errors.CannotConnect

Had another one lying around and cannot configure it either. They're all P100 running Firmware version 1.2.1 Build 230804 Rel. 190922