rospogrigio / localtuya

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

RGB bulb randomly became unavailable #821

Open ONBET opened 2 years ago

ONBET commented 2 years ago

image

I have few tuya RGB bulb using local tuya behave became unavailable randomly multiple time every hour. My local tuya is latest v3.5.0

rbonat commented 2 years ago

Same here, 5 RGB bulbs, randomly unavailable and not responding. I've found errors in logfile pointing to some timeouts, but TuyaSmart works just fine:

`This error originated from a custom integration.

Logger: custom_components.localtuya.common Source: custom_components/localtuya/pytuya/init.py:247 Integration: LocalTuya (documentation, issues) First occurred: 4:19:32 PM (5 occurrences) Last logged: 4:24:44 PM

[bfd...vvl] Connect to 192.168.0.121 failed Traceback (most recent call last): File "/usr/local/lib/python3.9/asyncio/locks.py", line 417, in acquire await fut asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.9/asyncio/tasks.py", line 490, 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 "/config/custom_components/localtuya/common.py", line 155, in _make_connection status = await self._interface.status() File "/config/custom_components/localtuya/pytuya/init.py", line 481, in status status = await self.exchange(STATUS) File "/config/custom_components/localtuya/pytuya/init.py", line 460, in exchange msg = await self.dispatcher.wait_for(seqno) File "/config/custom_components/localtuya/pytuya/init.py", line 247, in wait_for await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout) File "/usr/local/lib/python3.9/asyncio/tasks.py", line 492, in wait_for raise exceptions.TimeoutError() from exc asyncio.exceptions.TimeoutError`

naomai commented 2 years ago

It's even weirder in my case, the disconnects happen every minute or two. There are days when the bulbs stay online for hours, on the other, they keep cycling. It's hard to trigger a scene for multiple bulbs when almost every time one of them is disconnected. Screenshot_20220602-222552

imkebe commented 2 years ago

This affects me also. However it turns out it's more likely a WiFi constraint. I have also Tasmota devices. My WiFi channel has moderate neighbour noise but time to time some devices with potential of interference (devices lie in one axis from router) got disconnected. Including Tasmota based ones.

If you have many devices CSMA/CD might get them to stay in such ankward situation for days... Try to switch them off or just wait... This adffects also Zigbee, BlueTooth etc. All 2,4Ghz based devices.

@naomai Meduza is kind of multi bulb chandelier ? Issue is related to one of those group? More likely.