ID and Key not getting intercepted - change in Tuya Smart app?
Opened this issue · 13 comments
Hi all - thanks for all of this great software!
I'm trying to use Tuya locally, but I can't seem to get the id
or key
. I successfully get the QR code, see things getting intercepted from the iOS device (iPhone 14 Pro on iOS 16 latest), but nothing happens when the Tuya Smart app is opened fresh.
Could it be that Tuya is doing a DNS check or something else before attempting to negotiate id
or key
?
Any help would be greatly appreciated. Cheers!
I get the following error after a few interceptions but no id or key:
Error: ERR_TLS_HANDSHAKE_TIMEOUT Error [ERR_TLS_HANDSHAKE_TIMEOUT]: TLS handshake timeout at new NodeError (node:internal/errors:393:5) at TLSSocket._handleTimeout (node:_tls_wrap:902:22) at Object.onceWrapper (node:events:627:28) at TLSSocket.emit (node:events:513:28) at Socket._onTimeout (node:net:562:8) at listOnTimeout (node:internal/timers:564:17) at process.processTimers (node:internal/timers:507:7) { code: 'ERR_TLS_HANDSHAKE_TIMEOUT' }
same issue here, any fix?
I get this instead
Error: [Error: 4148807232:error:14209102:SSL routines:tls_early_post_process_client_hello:unsupported protocol:../deps/openssl/openssl/ssl/statem/statem_srvr.c:1714:
] {
library: 'SSL routines',
function: 'tls_early_post_process_client_hello',
reason: 'unsupported protocol',
code: 'ERR_SSL_UNSUPPORTED_PROTOCOL'
}
Error: Error: socket hang up
at connResetException (node:internal/errors:705:14)
at TLSSocket.onSocketClose (node:_tls_wrap:1089:23)
at TLSSocket.emit (node:events:525:35)
at node:net:301:12
at Socket.done (node:_tls_wrap:588:7)
at Object.onceWrapper (node:events:628:26)
at Socket.emit (node:events:513:28)
at TCP. (node:net:301:12) {
code: 'ECONNRESET'
was so excited about this plugin, but i'm getting the same unsupported protocol / socket hang up errors in Terminal as soon as i launch the Tuya Smart app, with no id or key ever populating.
any known cause or fix for this???
Now on iOS 17.1.1 and appears there is still no key. IDs can be found in the app, but no KEYs.
Same issue. Still no fix?
I couldn't get it fixed, however you can pull your ID and Key from the Tuya IoT webpage very easily.
https://us.iot.tuya.com/cloud/explorer
Then click on Device Management > Query Device Details. It'll ask you for the device_id which is the Device ID that's on the cloud project devices page.
I felt like this was a little easier than trying to intercept the IDs from my iPhone.
Not sure @TrshPndaGreg is posting this comment in multiple issues that are not related to "get device key". Either way, I don't think this is correct. The "local_key" value you can get directly from the IoT Platform, doesn't work.
I can assure you @arrancurran that it does work. I just used it the day I posted the comment to get homebridge-tuya-local up and running. How is getting the local key not related to get device key?
I used the device key from the IoT Platform from going to my cloud project and copying it from the Device ID column.
Then I used that device ID and pasted it in the API Explorer page that I linked, under Device Management > Query Device Details.
Then I used this local_key and the device_id to put into the plugin.
Then I have access to control the device locally, using the Homebridge Accessories screen.
Again...I don't know why I got downvoted and told that it doesn't work. I'll glady record a video if you want me to.
I downvoted because the same comment was posted in an unrelated issue regarding QR code generation, here.
The method (using the ID and the Tuya platform to get the device key) described by @TrshPndaGreg does NOT work with this repo (homebridge-tuya-lan).
It does however work with a different homebridge plugin, homebridge-tuya-local.
I couldn't get it fixed, however you can pull your ID and Key from the Tuya IoT webpage very easily.
https://us.iot.tuya.com/cloud/explorer
Then click on Device Management > Query Device Details. It'll ask you for the device_id which is the Device ID that's on the cloud project devices page.
I felt like this was a little easier than trying to intercept the IDs from my iPhone.
Thanks @TrshPndaGreg that worked for me. I just needed to subscribe for IoT trial before
I can assure you @arrancurran that it does work. I just used it the day I posted the comment to get homebridge-tuya-local up and running. How is getting the local key not related to get device key?
I used the device key from the IoT Platform from going to my cloud project and copying it from the Device ID column.
You left off two important steps:
- Create a dev account.
- Register the device to your account.
I was able to make an account, but couldn't work out how to link my device to that account - I wasn't able to find any good instructions.
Also, I strongly suspect that you have to log in at least once every few months or the account is closed, and does the device stop working then?
I'm just giving up - none of the methods I've tried get me there.