rospogrigio / localtuya

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

Connection to device succeeded but no datapoints found #1764

Open XalaTheShepard opened 3 weeks ago

XalaTheShepard commented 3 weeks ago

Dear Rospogrigio,

I noticed today that a Tuya wifi light was unavailable in the Localtuya integration for over 14 hours, while it was still available in the Tuya integration. Thinking I might had to refresh the local key, I deleted the device from the integration. However, the local key was unchanged from the last time I configured it. While trying to add the device again to the Localtuya integration, I got the following error message: Connection to device succeeded but no datapoints found.

In the detailed logs, I noticed the error below concerning the device.

Could you please lend me a hand adding the device again?

Many thanks.

Kind regards,

Robin

2024-08-19 21:11:56.442 ERROR (MainThread) [custom_components.localtuya.pytuya] [bff...0p7] Failed to get status: Traceback (most recent call last): File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for return await fut ^^^^^^^^^ File "/usr/local/lib/python3.12/asyncio/locks.py", line 386, in acquire await fut asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/config/custom_components/localtuya/pytuya/init.py", line 863, in detect_available_dps data = await self.status() ^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/localtuya/pytuya/init.py", line 795, in status status = await self.exchange(DP_QUERY) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/localtuya/pytuya/init.py", line 769, in exchange msg = await self.dispatcher.wait_for(seqno, payload.cmd) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/localtuya/pytuya/init.py", line 450, in wait_for await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout) File "/usr/local/lib/python3.12/asyncio/tasks.py", line 519, in wait_for async with timeouts.timeout(timeout): File "/usr/local/lib/python3.12/asyncio/timeouts.py", line 115, in aexit raise TimeoutError from exc_val TimeoutError

awshirley commented 2 weeks ago

I've experienced the exact same problem. One of my lights quit working on Local Tuya but works fine for the regular Tuya integration. I removed the Local Tuya integration and reinstalled it, but the same bulb is failing and I get this when trying to add it. image

swaggerino commented 2 weeks ago

same issue here, not directly a light but a wifi LED controller