Open WilliamTian0987 opened 1 year ago
Have the same problem but have different output. Verified that datapoints exist.
Logger: custom_components.localtuya.pytuya Source: custom_components/localtuya/pytuya/init.py:450 Integration: LocalTuya (documentation, issues) First occurred: 2:33:13 PM (2 occurrences) Last logged: 2:35:34 PM
[ebc...ym2] Failed to get status: Traceback (most recent call last): File "/usr/local/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/local/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 "/config/custom_components/localtuya/pytuya/init.py", line 857, in detect_available_dps data = await self.status() File "/config/custom_components/localtuya/pytuya/init.py", line 789, in status status = await self.exchange(DP_QUERY) File "/config/custom_components/localtuya/pytuya/init.py", line 763, 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.10/asyncio/tasks.py", line 458, in wait_for raise exceptions.TimeoutError() from exc asyncio.exceptions.TimeoutError
I also have the same problem when I try to add a new device:
` Logger: custom_components.localtuya.pytuya Source: custom_components/localtuya/pytuya/init.py:450 Integration: LocalTuya (documentation, issues) First occurred: 14:44:15 (1 occurrences) Last logged: 14:44:15 [201...c95] Failed to get status:
Traceback (most recent call last): File "/usr/local/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/local/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 "/config/custom_components/localtuya/pytuya/init.py", line 857, in detect_available_dps data = await self.status() File "/config/custom_components/localtuya/pytuya/init.py", line 789, in status status = await self.exchange(DP_QUERY) File "/config/custom_components/localtuya/pytuya/init.py", line 763, 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.10/asyncio/tasks.py", line 458, in wait_for raise exceptions.TimeoutError() from exc asyncio.exceptions.TimeoutError`
I am also seeing this problem. I noticed that the "Local key" field is not being filled in automatically as it has done in the past.
I have the same issue, my device is Petree gen 2 Cat toilet
Same error with different logs:
2023-02-06 10:28:52.093 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf8...ybo] Sending command 10 (device type: type_0a)
2023-02-06 10:28:52.093 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf8...ybo] Sending payload: b'{"gwId":"MY_ID_HERE","devId":"MY_ID_HERE","uid":"MY_ID_HERE","t":"1675675732"}'
2023-02-06 10:28:52.102 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf8...ybo] Command 10 waiting for sequence number 1
2023-02-06 10:28:52.108 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf8...ybo] Dispatching message CMD 10 TuyaMessage(seqno=1, cmd=10, retcode=0, payload=b"!G[&S\xed\x12Y9\xba*1\x00\xf2\xdbzC\x13\xc86AX<8\xe8\xbb\xe3Ol\xfeN\xa2\x7fdAzxdr\xeb\xda\x98r\xa0\x93y\xc7t]\x90_\x13\x8c\x90r\xb4\x12\xcd\r\xfbe\xd8\xed,(Z\xc7;<\xb4+r\xedN\xa1\x0cH\xb5\xde\x89P\xbf\x14\xa0?*\x11\xc3\x80\xefJ\xdc\x18\n\xc1\xd3\x8eT\xd8w%\xfa6\nr-\xdf\xaa\x11\x90\xe8\x88\xa5\x0bE',#\xd4\x85y\xae\xc1?p\x04O\x06\xf1l\xfaQ.\xed\xd6\x9c\x89\xb9C\xe4&\xacp ", crc=1474611291, crc_good=True)
2023-02-06 10:28:52.110 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf8...ybo] incomplete payload=b"!G[&S\xed\x12Y9\xba*1\x00\xf2\xdbzC\x13\xc86AX<8\xe8\xbb\xe3Ol\xfeN\xa2\x7fdAzxdr\xeb\xda\x98r\xa0\x93y\xc7t]\x90_\x13\x8c\x90r\xb4\x12\xcd\r\xfbe\xd8\xed,(Z\xc7;<\xb4+r\xedN\xa1\x0cH\xb5\xde\x89P\xbf\x14\xa0?*\x11\xc3\x80\xefJ\xdc\x18\n\xc1\xd3\x8eT\xd8w%\xfa6\nr-\xdf\xaa\x11\x90\xe8\x88\xa5\x0bE',#\xd4\x85y\xae\xc1?p\x04O\x06\xf1l\xfaQ.\xed\xd6\x9c\x89\xb9C\xe4&\xacp " (len:144)
2023-02-06 10:28:52.110 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf8...ybo] ERROR Unexpected Payload from Device - 904 - payload: null
2023-02-06 10:28:52.111 DEBUG (MainThread) [custom_components.localtuya.config_flow] Detected DPS: {}
2023-02-06 10:28:52.111 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf8...ybo] Closing connection
2023-02-06 10:28:52.120 DEBUG (MainThread) [custom_components.localtuya.pytuya] [bf8...ybo] Connection lost: None
FWIW it did work, this is what I'm getting after I had removed the device and tried to add it back.
I was experiencing the same problem the other day. I turned off the device for some time (to reset the localkey) and got it working with the new localkey
Turning off the device for a period of time (over night) did not work for me. However, I think I know what the issue might be, at least for me. I tried to follow a procedure I found on YouTube (https://www.youtube.com/watch?v=Q1ZShFJDvE0) to obtain my local key for the device in question. I got "msg": "No permissions. Your subscription to cloud development plan has expired." I had noticed that when I setup the account (within the last few months) it something about a 30 day trial subscription. I paid no mind to it and was able to add seven devices and it all worked fine. It was when I tried to add the latest device that it failed to work. So apparently they now want money to do this whereas in the past this basic use of their infrastructure was given a free pass. There are plenty of other devices that can do automation that will not rely on a subscription to setup so I am parting ways with Tuya.
@wjgregory You can extend the free trial for another 6 months. Check Q3 from here: https://github.com/tuya/tuya-home-assistant/blob/main/docs/faq.md
Also you can retrieve your local keys without having to connect to Tuya cloud. Follow this tutorial: https://www.youtube.com/watch?v=YKvGYXw-_cE
@Gonzalo933 - Thanks for the tip. Did the extension and now it all works ... for now. Basically will I have to extend every 6 months or at some point will they decline?
You could do that (people have extended the trial multiple times successfully) but I recommend that now you follow the steps to get the local keys for your devices and get localtuya working
On Sat, Feb 18, 2023, 11:46 wjgregory @.***> wrote:
@Gonzalo933 https://github.com/Gonzalo933 - Thanks for the tip. Did the extension and now it all works ... for now. Basically will I have to extend every 6 months or at some point will they decline?
— Reply to this email directly, view it on GitHub https://github.com/rospogrigio/localtuya/issues/1269#issuecomment-1435714557, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFVNKRJOUTLA36XPEOZCQ3WYD4HRANCNFSM6AAAAAAULLSJA4 . You are receiving this because you were mentioned.Message ID: @.***>
I think the reason that localtuya can't connect to the device is that the device disconnects itself from the network in order to save battery. It reconnects itself every 5 minutes, sends data and disconnects. Probably the "online" window is really short to be picked up by localtuya
The problem
Add a new device. Connection to device succeeded but no datapoints found, please try again. Create a new issue and include debug logs if problem persists.
Environment
Steps to reproduce
DP dump
Provide Home Assistant traceback/logs
此错误来自自定义集成。
Additional information