codetheweb / tuyapi

🌧 An easy-to-use API for devices that use Tuya's cloud services. Documentation: https://codetheweb.github.io/tuyapi.
MIT License
2.06k stars 339 forks source link

Error when attempting to link #52

Closed dedvalson closed 6 years ago

dedvalson commented 6 years ago

Hi,

I am unable to link successfully using either tuyapi-cli link-wizardor by using the sample dev.js script code shown at https://github.com/TuyaAPI/link.

I did have to add 255.255.255.255 broadcasthost to my hosts file to get past the first error, but I consistently arrive at the error:

- Registering devices(s)...
× Device(s) failed to be registered!
Error: Timed out wating for device(s) to connect to cloud
    at Promise (...\@tuyapi\cli\node_modules\@tuyapi\cloud\index.js:275:12)
    at <anonymous>

I am seeing consistent results on two different computers (Windows 10 running Cygwin and Mac running OSX) and with two different devices.

Does the brand of the devices (smart plugs) matter? They both link successfully using the Tuya android apps.

Any suggestions?

Thanks, Don

dedvalson commented 6 years ago

It looks like I solved my own problem.

When I created an account at Tuya, they sent me an email wanting me to confirm my account email. The website didn't tell me that it was sending me an email and I didn't notice it in my inbox for a while. Once I noticed it I clicked on the link Tyya sent me to confirm the email and suddenly everything works.

Thanks, Don

codetheweb commented 6 years ago

Huh, sorry about that. I don't remember getting a confirmation email.

I'll look into it and add it as a step to the setup process if necessary.