Open marcofederici92 opened 3 weeks ago
Not sure how does your device even works if you used cloud api set-up can you post entry diagnostics.
I have the same problem with a valve, these are the log messages Homeassistant 2024.4.2
2024-04-09 09:28:19.040 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Sending command 10 (device type: v3.4)
2024-04-09 09:28:19.040 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Sending payload: b'{"gwId":"bf006634dfc0d0fe25lrna","devId":"bf006634dfc0d0fe25lrna","uid":"bf006634dfc0d0fe25lrna","t":"1712647699"}'
2024-04-09 09:28:19.040 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] final payload for cmd 16: b'{"gwId":"bf006634dfc0d0fe25lrna","devId":"bf006634dfc0d0fe25lrna","uid":"bf006634dfc0d0fe25lrna","t":"1712647699"}'
2024-04-09 09:28:19.043 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Command 16 waiting for seq. number 16263
2024-04-09 09:28:19.180 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Dispatching message CMD 16 TuyaMessage(seqno=16263, cmd=16, retcode=1, payload=b"w{3\x94\xda\x83m)t\xc5\xc0\xb73\xaa\xaa\x9fV';f\x08!e\xbe\xb6\x0cRf\xb9tP(", crc=b'\xfc\xf2Y@*\x97\x8a\xc0r\xefy\xd1\xd3`8D1a\xca}\xdd\x83zo9\xbc)\xa1o\xdeE\x7f', crc_good=True, prefix=21930, iv=None)
2024-04-09 09:28:19.181 DEBUG (MainThread) [custom_components.localtuya.config_flow] Detected DPS: {}
2024-04-09 09:28:19.184 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Closing connection
2024-04-09 09:28:19.186 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Connection lost: None
2024-04-09 09:34:54.214 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] 3.4 or 3.5 device: negotiating a new session key
2024-04-09 09:34:54.214 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] final payload for cmd 3: b'0123456789abcdef'
2024-04-09 09:34:54.216 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Command 3 waiting for seq. number -102
2024-04-09 09:34:54.407 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Dispatching message CMD 4 TuyaMessage(seqno=22158, cmd=4, retcode=0, payload=b'\xa5\xa3,"\x19\xa3\xad\x9c\'\xa4\xeb\xdc\x8c\xa2sW\xb8c\x1a\xd6\x0b\xa4\r\xde\xd0;R\x86Qp\x84\xaf\xe9\xe9\xa6\xaa\x9cb8\x98\xb5\x07\x1b&\x03k\x9d5\x1bZB"3-Z\x13\xbfC\x1c\x82\xfc(\x9f\x98', crc=b"\xe4\xc6D\xdb\xccB5\xc60\xd9?+\x9e\x80\xb6\xef\xda\xec\x9d\x17'\xfb\xb9\xf7?\x95\xbc\xc9\xf6\\f%", crc_good=True, prefix=21930, iv=None)
2024-04-09 09:34:54.408 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Got key negotiation response
2024-04-09 09:34:54.409 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] decrypted session key negotiation step 2: payload=b'd30c7b36b29c23c23s\xc9w8\xd4\x88WPD\x81\xe9j\x02\xd5=@\xd5\x8b\xef\x94\xb1\x13\xe8\x068\x02%\xb8@\x0cL'
2024-04-09 09:34:54.409 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] final payload for cmd 5: b'\xdd79\xbe"\x9cY\xc9?\xdfLPP\xec\xbb\xcc\xd3(\xe2%4Q\\\x89\xa5\xe6_\x900\x9brX'
2024-04-09 09:34:54.410 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Session key negotiate success! session key: b'\xf7\xea\x15\xfef{\xbf\xad\x0e\\*\x1d&a\x01T'
2024-04-09 09:34:54.410 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Sending command 10 (device type: v3.4)
2024-04-09 09:34:54.410 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Sending payload: b'{"gwId":"bf006634dfc0d0fe25lrna","devId":"bf006634dfc0d0fe25lrna","uid":"bf006634dfc0d0fe25lrna","t":"1712648094"}'
2024-04-09 09:34:54.410 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] final payload for cmd 16: b'{"gwId":"bf006634dfc0d0fe25lrna","devId":"bf006634dfc0d0fe25lrna","uid":"bf006634dfc0d0fe25lrna","t":"1712648094"}'
2024-04-09 09:34:54.413 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Command 16 waiting for seq. number 22159
2024-04-09 09:34:54.659 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Dispatching message CMD 16 TuyaMessage(seqno=22159, cmd=16, retcode=1, payload=b'\x9b[\x17\xe2\xc7M(\x8a\xef\x17\xc4r4V\xbf\xc8I\xa3\xf5\xbeD\xd1c\x81\xbb\xd8i9\x86?L\xc6', crc=b'x\xfe\xb5\xad\x95\t\x90a\xe1\n\xa5\x95\xbe>\x1eLD\xa8\xc7\xa8,\x9dC\x0c\xdf\x04~j\xe7p\xf9x', crc_good=True, prefix=21930, iv=None)
2024-04-09 09:34:54.659 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Sending command 10 (device type: v3.4)
2024-04-09 09:34:54.659 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Sending payload: b'{"gwId":"bf006634dfc0d0fe25lrna","devId":"bf006634dfc0d0fe25lrna","uid":"bf006634dfc0d0fe25lrna","t":"1712648094"}'
2024-04-09 09:34:54.660 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] final payload for cmd 16: b'{"gwId":"bf006634dfc0d0fe25lrna","devId":"bf006634dfc0d0fe25lrna","uid":"bf006634dfc0d0fe25lrna","t":"1712648094"}'
2024-04-09 09:34:54.661 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Command 16 waiting for seq. number 22160
2024-04-09 09:34:54.757 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Dispatching message CMD 16 TuyaMessage(seqno=22160, cmd=16, retcode=1, payload=b'\x9b[\x17\xe2\xc7M(\x8a\xef\x17\xc4r4V\xbf\xc8I\xa3\xf5\xbeD\xd1c\x81\xbb\xd8i9\x86?L\xc6', crc=b"5|\xc0m\x80S@\x03\xa2Dk\xf3\xb1\x04\xa6\xf9\x8a\x05S\xc4\x1a\xb3u'|\x06r\x0eI\x8c\xd6\xde", crc_good=True, prefix=21930, iv=None)
2024-04-09 09:34:54.758 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Sending command 10 (device type: v3.4)
2024-04-09 09:34:54.758 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Sending payload: b'{"gwId":"bf006634dfc0d0fe25lrna","devId":"bf006634dfc0d0fe25lrna","uid":"bf006634dfc0d0fe25lrna","t":"1712648094"}'
2024-04-09 09:34:54.758 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] final payload for cmd 16: b'{"gwId":"bf006634dfc0d0fe25lrna","devId":"bf006634dfc0d0fe25lrna","uid":"bf006634dfc0d0fe25lrna","t":"1712648094"}'
2024-04-09 09:34:54.759 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Command 16 waiting for seq. number 22161
2024-04-09 09:34:54.923 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Dispatching message CMD 16 TuyaMessage(seqno=22161, cmd=16, retcode=1, payload=b'\x9b[\x17\xe2\xc7M(\x8a\xef\x17\xc4r4V\xbf\xc8I\xa3\xf5\xbeD\xd1c\x81\xbb\xd8i9\x86?L\xc6', crc=b'\xd5\xa8\xaav\xed\xfb\xf0\x15\xc5!z\xd5z\xe8Hc\x06T\xff\xba\x1fo\xf0\xa4\xee\x8fB\x94\xcbwm\x1a', crc_good=True, prefix=21930, iv=None)
2024-04-09 09:34:54.925 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Sending command 10 (device type: v3.4)
2024-04-09 09:34:54.925 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Sending payload: b'{"gwId":"bf006634dfc0d0fe25lrna","devId":"bf006634dfc0d0fe25lrna","uid":"bf006634dfc0d0fe25lrna","t":"1712648094"}'
2024-04-09 09:34:54.926 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] final payload for cmd 16: b'{"gwId":"bf006634dfc0d0fe25lrna","devId":"bf006634dfc0d0fe25lrna","uid":"bf006634dfc0d0fe25lrna","t":"1712648094"}'
2024-04-09 09:34:54.927 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Command 16 waiting for seq. number 22162
2024-04-09 09:34:55.066 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Dispatching message CMD 16 TuyaMessage(seqno=22162, cmd=16, retcode=1, payload=b'\x9b[\x17\xe2\xc7M(\x8a\xef\x17\xc4r4V\xbf\xc8I\xa3\xf5\xbeD\xd1c\x81\xbb\xd8i9\x86?L\xc6', crc=b'\xb1\x0cbd<r\x82\x00\xa0t\xff#\xf7\r\xd9\xa5\xe9U\xf9\x1f\x08\x9f\xdb\x8d\xe2\x17\xe8cO\xcd\x84\x93', crc_good=True, prefix=21930, iv=None)
2024-04-09 09:34:55.067 DEBUG (MainThread) [custom_components.localtuya.config_flow] Detected DPS: {}
2024-04-09 09:34:55.067 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Closing connection
2024-04-09 09:34:55.071 DEBUG (MainThread) [custom_components.localtuya.core.pytuya] [bf0...rna] Connection lost: None
Now it works without having made any changes or updates, maybe it was just a temporary problem with the Tuya servers?
Now it works without having made any changes or updates, maybe it was just a temporary problem with the Tuya servers?
Tomorrow i'll try and let u know-
What's is the devices you're trying to setup!?
Connect to the device is completely locally process a odd issues may happen if devices are "blocked from internet incorrectly" however a reason that could made @cb12tre connect later it's because the device was kinda dead? and when it turned on/off it wakes up. this can happen some times since Tuya Devices are toxic on local.
Ensure when you connect to the device that there is no other local connection happened to the device e.g. "any other local integration, smart and tuya apps need to be closed!."
What's is the devices you're trying to setup!?
Connect to the device is completely locally process a wired issues may happen if devices are "blocked from internet incorrectly" however a reason that could made @cb12tre connect later it's because the device was kinda dead? and when it turned on/off it wakes up. this can happen some times since Tuya Devices are toxic on local.
Ensure when you connect to the device that there is no other local connection happened to the device e.g. "any other local integration, smart and tuya apps need to be closed!."
I had to change my WiFi password, hence had to use Smart Life (one of the official apps to control/setup these Tuya OEM plugs) app to reset them. Of course, by doing this the local_key changed (we knew it). I had no problem accessing the API Explorer page and determine the key.
What I had trouble was re-configure them on HA. I wanted to ensure the plugs was online and in working order so at the same time configuring HA (localtuya) I also had the Smart Life app turned on. THIS IS THE PROBLEM
Thanks @xZetsubou and @cb12tre on checking this and sharing your experience. This is what I spent half day tried to fix it.
This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.
I've encountered the same problem again; the switch works correctly with both the official Tuya integration and SmartLife. I tried closing the application on the phone and also disabling the Tuya integration, restarting Home Assistant, but I still get the following error:
LocalTuya Version
3.2.5.1
Home Assistant Version
Core 2024.4.1 Supervisor 2024.03.1 Operating System 12.1 Frontend 20240404.1
Environment
What happened?
Every time i try to add a device from my cloud project i get this error:
Connected to the device successfully but could not find datapoints. Please retry setup. If the problem persists, create a new report (including debug logs).
Here the log from the other repo (rospogrigio), by this i cannot enable debug mode, in both repo i have the same problem
👍 Help me to solve.. i've buy 10 camera for home assistante and not working =(
Steps to reproduce.
add new device by found devices
Relevant log output
Diagnostics information.
No response