rospogrigio / localtuya

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

Errors running on a GoSund UP111 smart plug with energy monitoring #202

Open elyobelyob opened 3 years ago

elyobelyob commented 3 years ago

Hi, I have the setup working, but unfortunately not very stable. If I restart Home Assistant, the logging starts again, presumably the plug therefore is not at issue.

Screenshot 2020-11-30 at 11 58 57

Here are the main issues I have spotted in the logs ...

https://paste.ubuntu.com/p/TXQjnnm9Ds/

Thanks for any feedback ...

Nick

tehnoinstyle commented 3 years ago

Hi. I have same problem with Energy Meter Switch. localtuya-master-v 3 1 0

elyobelyob commented 3 years ago
Screenshot 2020-11-30 at 18 03 09

Am getting this with the "ValueError: Invalid key size (160) for AES." error, very regularly (interestingly, every 5 minutes at the same second) ... 2020-11-30 17:45:41 ERROR (MainThread) [custom_components.localtuya.common] [71c...80e] Connect to 192.168.0.181 failed 2020-11-30 17:50:41 ERROR (MainThread) [custom_components.localtuya.common] [71c...80e] Connect to 192.168.0.181 failed 2020-11-30 17:55:41 ERROR (MainThread) [custom_components.localtuya.common] [71c...80e] Connect to 192.168.0.181 failed 2020-11-30 18:00:41 ERROR (MainThread) [custom_components.localtuya.common] [71c...80e] Connect to 192.168.0.181 failed 2020-11-30 18:05:41 ERROR (MainThread) [custom_components.localtuya.common] [71c...80e] Connect to 192.168.0.181 failed 2020-11-30 18:10:41 ERROR (MainThread) [custom_components.localtuya.common] [71c...80e] Connect to 192.168.0.181 failed 2020-11-30 18:15:41 ERROR (MainThread) [custom_components.localtuya.common] [71c...80e] Connect to 192.168.0.181 failed

tehnoinstyle commented 3 years ago

Hi.

After a while, the problem repeats itself.

localtuya-master-v 3 1 0_1

in log:

ERROR
Logger: custom_components.localtuya.common
Source: custom_components/localtuya/pytuya/__init__.py:239
Integration: LocalTuya integration (documentation, issues)
First occurred: 30 ноября 2020 г., 17:43:21 (6 occurrences)
Last logged: 7:28:29

[024...ace] Connect to 192.168.1.115 failed
Traceback (most recent call last):
  File "/config/custom_components/localtuya/common.py", line 156, in _make_connection
    status = await self._interface.status()
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 461, in status
    status = await self.exchange(STATUS)
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 440, in exchange
    msg = await self.dispatcher.wait_for(seqno)
  File "/config/custom_components/localtuya/pytuya/__init__.py", line 239, in wait_for
    await asyncio.wait_for(self.listeners[seqno].acquire(), timeout=timeout)
  File "/usr/local/lib/python3.8/asyncio/tasks.py", line 498, in wait_for
    raise exceptions.TimeoutError()
asyncio.exceptions.TimeoutError

In my opinion, this problem appeared after version 3.0.3

On version 3.0.3, I did not see this problem.