Skip to content
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

ID and Key not getting intercepted - change in Tuya Smart app? #280

Open
togume opened this issue Dec 17, 2022 · 12 comments
Open

ID and Key not getting intercepted - change in Tuya Smart app? #280

togume opened this issue Dec 17, 2022 · 12 comments

Comments

@togume
Copy link

togume commented Dec 17, 2022

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!

@peterupton
Copy link

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' }

@krishnavelu
Copy link

krishnavelu commented Jan 20, 2023

I too get the same, is this not working anymore.

image

@peros550
Copy link

same issue here, any fix?

@khammo01
Copy link

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'

@dcifer1
Copy link

dcifer1 commented Jul 22, 2023

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???

@socalcal
Copy link

Now on iOS 17.1.1 and appears there is still no key. IDs can be found in the app, but no KEYs.

@jackklink
Copy link

Same issue. Still no fix?

@TrshPndaGreg
Copy link

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.

@arrancurran
Copy link

arrancurran commented Feb 9, 2024

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.

#279 (comment)

@TrshPndaGreg
Copy link

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.

image

Then I used that device ID and pasted it in the API Explorer page that I linked, under Device Management > Query Device Details.

image

Then I used this local_key and the device_id to put into the plugin.

image

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.

@arrancurran
Copy link

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.

@luisffc
Copy link

luisffc commented Mar 29, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests