cli
cli copied to clipboard
With the special characters in the KEY - Key is missing or incorrect
CLI does not work withe the special characters in the KEY for axample:
DEBUG=* tuya-cli get --ip 192.168.22.23 --id 5722cutted --key v#u+g$s+SjR4f9R0
/opt/homebrew/lib/node_modules/@tuyapi/cli/node_modules/tuyapi/index.js:78
throw new TypeError('Key is missing or incorrect.');
^
TypeError: Key is missing or incorrect.
at new TuyaDevice (/opt/homebrew/lib/node_modules/@tuyapi/cli/node_modules/tuyapi/index.js:78:13)
at parseConfig (/opt/homebrew/lib/node_modules/@tuyapi/cli/lib/control.js:32:9)
at Object.get (/opt/homebrew/lib/node_modules/@tuyapi/cli/lib/control.js:36:15)
at Command.<anonymous> (/opt/homebrew/lib/node_modules/@tuyapi/cli/cli.js:63:11)
at Command.listener [as _actionHandler] (/opt/homebrew/lib/node_modules/@tuyapi/cli/node_modules/commander/index.js:413:31)
at Command._parseCommand (/opt/homebrew/lib/node_modules/@tuyapi/cli/node_modules/commander/index.js:914:14)
at Command._dispatchSubcommand (/opt/homebrew/lib/node_modules/@tuyapi/cli/node_modules/commander/index.js:865:18)
at Command._parseCommand (/opt/homebrew/lib/node_modules/@tuyapi/cli/node_modules/commander/index.js:882:12)
at Command.parse (/opt/homebrew/lib/node_modules/@tuyapi/cli/node_modules/commander/index.js:717:10)
at Object.<anonymous> (/opt/homebrew/lib/node_modules/@tuyapi/cli/cli.js:134:9)
DEBUG=* tuya-cli get --ip 192.168.22.24 --id 63810828fcutted --key j]sg5IHtyOPA)eSu
zsh: parse error near `)
Node.js v22.5.1
What to do? I think this problem presents in the API too. Thanks!