TuyaAPI / cli

🔧 A CLI for Tuya devices
MIT License
261 stars 44 forks source link

Tuya-cli empty response or error #96

Closed Fabian-Ser closed 3 years ago

Fabian-Ser commented 3 years ago

Hello, When I run "tuya-cli wizard" nothing happends:

PS E:\Fabian\My\Path> tuya-cli wizard
PS E:\Fabian\My\Path> 

So I ran link instead of wizard: tuya-cli link --api-key Access ID/Client ID --api-secret Access Secret/Client Secret--ssid MyWifiSSID --password MyWifiPassword

But I get the error:

{                                                                                                                        
 code: 'SING_VALIDATE_FALED_4',                                                                                         
 message: 'Permission validation failed 4'                                                                           
  } 
codetheweb commented 3 years ago

wizard should prompt you for questions when running it. Something in PowerShell might be messing with it? You could try running it in a Linux VM / WSL.

The link command may require additional permissions on your Tuya account (this line in the setup instructions is where they can be found:

On the same page, click "API Group" on the left side. Change the status to Open for the following three API Groups by clicking "Apply" for each line, entering any reason, and clicking "OK": "Authorization Management", "Device Management", "Device Control", "User Management", "Network Management", "Data Service" and "Device Statistics".

).

Fabian-Ser commented 3 years ago

Please check the photo for the permissions:

https://i.imgur.com/PGP3yJE.png

codetheweb commented 3 years ago

That looks correct. The only thing I can think of that would be causing the error message then would be your API key / secret. I'd double check those are correct.

Fabian-Ser commented 3 years ago

I belive those are correct, is it? https://i.imgur.com/JYbofHW.png

codetheweb commented 3 years ago

Oh, I think you're missing the --schema flag. Double check the setup instructions.

Fabian-Ser commented 3 years ago

Indeed, updated my NodeJS to v14, updated the cli and its working now!

Thanks!