question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't extract the key with tuya-cli

See original GitHub issue

Hello, I’m triying to get the key of a plug using tuya cli. First i add the device to the Tuya Smart App (v3.19.4). From the app I can control the plug. I can turn it on and off and i can see the power consumption.

So I try the process “Listing Tuya devices from the app”: I create iot.tuya.com account, create the fake app and launch tuya-cli. Input for the api key, input for the api secret, and inpuit for the device id (which i extract from TuyaSmart app). But then the only answer is “There was an issue fetching that device. Make sure your account is linked and the ID is correct.”

Of course the api-key, api-secret are correct (checked several times witrh the ones showed in iot.tuya.com).

I have tried to get debug messages launching the process as “DEBUG=* tuya-cli wizard”, but nothing appears.

So, any idea?

PD. I have done the other process to get the key (using tuya-cli link) but I couldn0’t get the key either. In this case ther message was


✖ Device(s) failed to be registered!
Error: data not exist
    at OpenAPI._client.got_1.default.extend.hooks.afterResponse (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/link/node_modules/@tuyapi/openapi/dist/api.js:68:31)
    at EventEmitter.<anonymous> (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/got/dist/source/as-promise.js:87:38)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:27 (8 by maintainers)

github_iconTop GitHub Comments

4reactions
javiermarascocommented, Sep 21, 2020

@codetheweb digging a bit in tuya.com found that “API Group” tab and after a few clicks it worked, I was coming back to happily post the solution haha.

Thank you for pointing in the right direction, that definitely solves the issue.

1reaction
ronitsinhacommented, Sep 1, 2020

Hooray! With the new update it’s working for me! Actually had a similar setup to @TroyG-Aus. I had 2 projects: when I tried with the first one it didn’t work (I got the same error as @TroyG-Aus), but the second one was successful. Really weird. HUGE THANKS @codetheweb, you are amazing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get All Local Tuya Keys (ALL KEYS, SIMPLE, NO SOLDERING)
In this video we will be looking at a way to extract all of your Local Keys for all of your Tuya Devices....
Read more >
Tuya have blocked all ways of getting a LocalKey?
Logging in with old Smart Life apk is blocked and when I tried to get a key from the device info on Tuya...
Read more >
any new ways to extract tuya local keys? None of the ... - Reddit
Hi,. It seems you can no longer use proxy charles or similar to extract local key information for tuya devices.
Read more >
La ferralla xerra amb el núvol - IoT - TINET
config/configstore/update-notifier-@tuyapi/cli.json"} nicolau@mars:~/sebas/python/smart_plug$ sudo DEBUG=* tuya-cli wizard ? The API key from tuya.com: ...
Read more >
Control a Smart Device using Tuya API and Python
Then we set the configuration info to connect to our Tuya IoT account. You can find the ACCESS_ID and ACCESS_KEY keys by navigating...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found