localtuya
localtuya copied to clipboard
Error when adding ZigBee Smart Gateway
Connection to device succeeded but no datapoints found, please try again. Create a new issue and include debug logs if problem persists.
I am also experiencing this issue.
I'm also: The connection to the device was successful but no datapoints were found, try again. Create a new issue and include debug logs if the problem persists
This is the log:
ERROR (MainThread) [custom_components.localtuya.pytuya] [bfa...k5t] Failed to get status: Traceback (most recent call last): File "/usr/lib/python3.10/asyncio/locks.py", line 390, in acquire await fut asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3.10/asyncio/tasks.py", line 456, in wait_for return fut.result() asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/home/homeassistant/.homeassistant/custom_components/localtuya/pytuya/init.py", line 574, in detect_available_dps data = await self.status() File "/home/homeassistant/.homeassistant/custom_components/localtuya/pytuya/init.py", line 507, in status status = await self.exchange(STATUS) File "/home/homeassistant/.homeassistant/custom_components/localtuya/pytuya/init.py", line 486, in exchange msg = await self.dispatcher.wait_for(seqno) File "/home/homeassistant/.homeassistant/custom_components/localtuya/pytuya/init.py", line 259, in wait_for await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout) File "/usr/lib/python3.10/asyncio/tasks.py", line 458, in wait_for raise exceptions.TimeoutError() from exc asyncio.exceptions.TimeoutError
i am also experiencing this issue, often a reboot of home assitant fixes it temporaly
What kind of data points your expecting on a zigbee bridge/gateway? Its a bridge/gateway for a reason.
Might as well just skip localtuya and grab a usb zigbee coordinator and use zha or z2m.
Localtuya's main job is to control or poll sensors and switches that wifi based tuya end devices.
Same issue with Tuya Zigbee GW here with HA 2023.3.5 and LocalTuya v.5.1.0 . It works fine using cloud API (but recently got some Internet connection issues so I decided to switch to local). I have also this in HA logs:
Error doing job: Exception in callback _SelectorDatagramTransport._read_ready()
Traceback (most recent call last):
File "/config/custom_components/localtuya/discovery.py", line 65, in datagram_received
data = decrypt_udp(data)
File "/config/custom_components/localtuya/discovery.py", line 30, in decrypt_udp
return _unpad(decryptor.update(message) + decryptor.finalize()).decode()
File "/usr/local/lib/python3.10/site-packages/cryptography/hazmat/primitives/ciphers/base.py", line 186, in finalize
data = self._ctx.finalize()
File "/usr/local/lib/python3.10/site-packages/cryptography/hazmat/backends/openssl/ciphers.py", line 222, in finalize
raise ValueError(
ValueError: The length of the provided data is not a multiple of the block length.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 1035, in _read_ready
self._protocol.datagram_received(data, addr)
File "/config/custom_components/localtuya/discovery.py", line 67, in datagram_received
data = data.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb9 in position 13: invalid start byte
I have introduced Zigbee support in PR #1493, if anybody wants to test it and provide feedback, please comment in the PR.