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

Protocol 3.4 - not working #168

Open
mvrk69 opened this issue Mar 24, 2024 · 1 comment
Open

Protocol 3.4 - not working #168

mvrk69 opened this issue Mar 24, 2024 · 1 comment

Comments

@mvrk69
Copy link

mvrk69 commented Mar 24, 2024

Hi,

I have some new plugs that use protocol 3.4 and tuya-cli gets stuck when trying to get information from them:

tuya-cli get --ip xxx.xxx.xxx.xxx --id xxxxxxxxxxxxxxxxxxxx --full --protocol-version 3.4

gets stuck running, i need to do ctr+c to stop it.

@albrechtf
Copy link

Additional info: There is no general protocol error. When I adjust the CLI code to output the response of the SET command (which should be used with null value for protocol 3.4 anyway), this works fine. The problem must be in the whole bunch of asynchronous handling in the tuyapi code...

You can change the below line in lib/control.js (commented out in my code block) with a call to set in this way:

  // const properties = await tuya.get({schema: true, cid: options.cid, dps: options.dps});
  const properties = await tuya.set({set: null, dps: options.dps, cid: options.cid});

That works for me.

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

2 participants