rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.94k stars 562 forks source link

Mini smart switch tuya - add error #814

Closed alespaghetti closed 2 years ago

alespaghetti commented 2 years ago

Hello i have installed HA on raspberry 0. HA works fine. On HA I have installed local tuya which recognizes most of my tuya devices and I can manage them in lan. Local tuya, however, is unable to install mini smart switches like the ones in the picture. The switches are recognized on the network by the wizard but when I have to add the device, I get back the message "An unknown error occurred. See log for details.". Thanks for your kind support

Environment

Steps to reproduce

  1. Add new local tuya device
  2. recognize smart switch ip and id, add it (insert key and name)
  3. error IMG_20220405_121701
alespaghetti commented 2 years ago

from log:

Logger: custom_components.localtuya.config_flow Source: custom_components/localtuya/pytuya/init.py:669 Integration: LocalTuya integration (documentation, issues) First occurred: 13:34:26 (5 occurrences) Last logged: 13:39:59 Unexpected exception

Traceback (most recent call last): File "/config/custom_components/localtuya/config_flow.py", line 283, in async_step_basic_info self.dps_strings = await validate_input(self.hass, user_input) File "/config/custom_components/localtuya/config_flow.py", line 189, in validate_input interface = await pytuya.connect( File "/config/customcomponents/localtuya/pytuya/init.py", line 669, in connect , protocol = await loop.create_connection( File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection raise exceptions[0] File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection sock = await self._connect_sock( File "/usr/local/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect return await fut File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') OSError: [Errno 113] Connect call failed ('192.168.0.175', 6668)

85hui commented 2 years ago

Same problem here.Have you found an answer for this?

alespaghetti commented 2 years ago

Same problem here.Have you found an answer for this?

Yes I solved. Just turn off 5ghz wifi on router or give a different name for 2,4 and 5ghz essid. I don't know why but it works.