Can't extract the key with tuya-cli
See original GitHub issueHello, 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:
- Created 3 years ago
- Comments:27 (8 by maintainers)
@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.
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.