-
Notifications
You must be signed in to change notification settings - Fork 575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disconnect Tuya Device #160
Comments
Can you install the latest release from |
Currently I'm running on master.. but unsure if I got the latest one.. will try to replace it with the current one and will let you know. Thanks man. |
Merged a few things yesterday, so you might not have those changes. |
Update my HA to 0.118 and update master however, it continues to have 2 multi-outlet disconnected after several hours. Restart HA will bring the device back but that's it. Unsure the logs since there is no error on that end |
I'm having a similar error, whether integrated via config flow or YAML... An example of one of my lights: 2020-11-20 18:15:06 ERROR (MainThread) [custom_components.localtuya.common] [464...fd0] Connect to 192.168.1.247 failed
Traceback (most recent call last):
File "/config/custom_components/localtuya/common.py", line 146, in _make_connection
self._interface = await pytuya.connect(
File "/config/custom_components/localtuya/pytuya/__init__.py", line 626, in connect
_, protocol = await loop.create_connection(
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
sock = await self._connect_sock(
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
return await fut
File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionResetError: [Errno 104] Connect call failed ('192.168.1.247', 6668) This happens whenever I restart Home Assistant, and most of my added entities become unavailable. Sometimes reloading their respective integrations works, but also sometimes not. I also get these messages in the log for lights that don't connect: 2020-11-20 18:15:12 WARNING (SyncWorker_22) [custom_components.localtuya.light] [464...fd0] Entity light.back_porch is requesting unknown DPS index 1
2020-11-20 18:15:12 WARNING (SyncWorker_22) [custom_components.localtuya.light] [464...fd0] Entity light.back_porch is requesting unknown DPS index 4
2020-11-20 18:15:12 WARNING (SyncWorker_22) [custom_components.localtuya.light] [464...fd0] Entity light.back_porch is requesting unknown DPS index 5
2020-11-20 18:15:12 WARNING (SyncWorker_22) [custom_components.localtuya.light] [464...fd0] Entity light.back_porch is requesting unknown DPS index 3
2020-11-20 18:15:12 WARNING (SyncWorker_22) [custom_components.localtuya.light] [464...fd0] Entity light.back_porch is requesting unknown DPS index 2
2020-11-20 18:15:12 WARNING (SyncWorker_22) [custom_components.localtuya.light] [464...fd0] Entity light.back_porch is requesting unknown DPS index 2 For what it's worth, I'm on HA 0.118.1 and localtuya from the latest commit at this time: |
I can reproduce the issue myself now and I'm working on it, but it's a bit tricky. Will hopefully come up with a solution soon. |
Would he great if you can test #177. Hopefully smooth sailing ⛵️ |
How do I test this one? since its said out of date? |
I've updated to 3.1.0, and all but one of my lights are working consistently (actually the same case as with On the previous version, I had almost the opposite results (for all but this light), which means all but this one light are now integrated via YAML, and working... This one light I'm having an issue with is a Merkury bulb, which doesn't have color temperature, so I'm simply not setting a DP for it (on my other bulbs I use DP4 for this), if that matters. It looks like if I remove it from my YAML, and then add it again through config flow, it works. |
Update both HA and LocalTuya to the latest.. Still having the same issue..disconnected after several hours or minutes |
@drinfernoo can you put a DP dump there for your Merkury bulb ? |
its always on and even though the device being disconnected its status remain. Just that from HA the device is post as disconnect until I restart HA. |
@ultratoto14 I did experience that today. I turn off all bulbs (but remain connected to netowrk), after wake up I realise when I turn on the bulbs, 2 of them disconnected during night and dont update the status. But in Tuya Custom and on smartlife they both connected and working proprely. I was able to reload the bulb in your integration, but only after reload I was able to mess with the bulb again with your integration Logger: custom_components.localtuya.common [680...406] Connect to 192.168.1.XXX failed DEBUG2020-12-04 04:50:45 DEBUG (MainThread) [custom_components.localtuya.pytuya] [680...a94] Dispatching message TuyaMessage(seqno=0, cmd=9, retcode=0, payload=b'', crc=2958142211) |
@DavidFFerreira for lights with physical switches, this PR should be helpful, if you want to try: #171 |
@ultratoto14 thanks, and yes, I have alot of devices :D |
For me, it seems that whenever a bulb loses connection, I can turn it off, but the state doesn't update, so I can't turn it back on. It does seem that if a light, which isn't updating correctly, is off (but the state is still "on"), and I change the brightness (turning the light on), then turning it off again does update the state. However, the same thing happens again if I then turn it back on again. |
I added one mini-plug on first try with the scan method. Works very good except I need to reload the integration after restarting HA but that might be my slightly off standard setup too. I really hope at some point I can be a contributor in addition to being a consumer |
Installed v 3.3 and it seems that the restart thingy is fixed. I wish I had tried this before returning box loads of Black Friday cheap wall switches! Oh well. All is good - Thanks Again! |
* Fix an issue where adding new device integeration won't load up. * Refactor quick reconnect method
HA: 0.117.6
Latest: localtuya from master
Upon updating to 0.117.6 from time-to-time my tuya device is just disconnected and will not interact with HA. For example my multiplugs appear to be online but I will not be able to switch on/off and this happen to bulb too. After reboot HA everything will work as is. So I believe the device did disconnect after sometimes.
also getting this error messages
The text was updated successfully, but these errors were encountered: