Help with tuya accessories

Hi all,
I just bought tuya smoke detectors and when I try to connect them to HA, I get error : “An unknown error occurred. See log for details.”

Log details (ERROR)
This error originated from a custom integration.
Logger: custom_components.localtuya.config_flow
Source: custom_components/localtuya/config_flow.py:595
integration: LocalTuya (documentation, issues)
First occurred: 11:14:05 AM (5 occurrences)
Last logged: 2:11:26 PM

Unexpected exception: [Errno 113] Connect call failed ('xxx.xx.xxx.xx', 6668)
Traceback (most recent call last):
  File "/config/custom_components/localtuya/config_flow.py", line 595, in async_step_configure_device
    self.dps_strings = await validate_input(self.hass, user_input)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/localtuya/config_flow.py", line 242, in validate_input
    interface = await pytuya.connect(
                ^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 1182, in connect
    _, protocol = await loop.create_connection(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1120, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1102, in create_connection
    sock = await self._connect_sock(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1005, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 641, in sock_connect
    return await fut
           ^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 681, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 113] Connect call failed ('xxx.xx.xx.xx', 6668)

details about my system:

Home Assistant-

  • Core2024.6.4
  • Supervisor2024.06.0
  • Operating System12.4
  • Frontend20240610.1

Lucal toya-
5.2.1
Custom integration

Please any help ?

Looks like it’s the same issue as this one on github.

Try posting or following that thread, in case you get an answer.