Closed wmbrown2 closed 6 years ago
Everything looks good.
Judging by the other thread, there seems to be a common issue but I have no idea what it is. I doubt this will do anything, but can you try updating your Node version to >=10?
Also, npm -v tuya-cli
spits out the version of NPM, not the package. Try npm list @tuyapi/cli -g
to get the package's version (should be 1.2.0).
I updated node to v10.10.0 and confirmed that @tuyapi/cli is version 1.2.0. The result was the same.
The debug output is attached. timeout_debug.txt
Is this common issue you mentioned a relatively new issue that has emerged? Also, does the wizard contact tuya at the beginning to use its API? I ask only because it looks like there is a concept of requesting authorization to call their cloud API from a third-party cloud. It is found in Dashboard > User > Account - Cloud API Authorization.
Not really a new issue, just popped up as people other than me started using it.
The linking process does contact Tuya to get an access token for device setup. The authorization part of the cloud package is not at fault; if it was Tuya would return an error not a result.
What's the general area in which you live (i.e. the EU, US, Africa, etc.)? What's your timezone?
I am on the east coast of US hoping to dodge Florence!
My ultimate goal is to build off of your work to integrate this with Smartthings, but I have to get it working first!
Well, until I get more data from other people to try to figure out this issue, there's not much I can do. Can you post a link to the product page of your device?
I completely understand.
Smart plug, Gosund Mini Wifi Outlet Compatible with Alexa, Google Home & IFTTT, No Hub Required, Remote Control your home appliances from Anywhere, ETL Certified (4 packs) https://www.amazon.com/dp/B079MFTYMV/ref=cm_sw_r_cp_api_KURMBb0TGJRBZ
Created a short survey in an attempt to collect more data, I'd appreciate it if you took it: https://codetheweb.typeform.com/to/rTXsWg. Thanks.
I'm having the same issue. I filled out the survey just now.
? Do you want to save devices that are successfully linked? Yes
✖ Device(s) failed to be registered!
Error: Timed out wating for device(s) to connect to cloud
at Promise (/usr/local/lib/node_modules/@tuyapi/cli/node_modules/@tuyapi/cloud/index.js:275:12)
I received a note from someone who said they had a similar issue until they updated their device's firmware. Can you please try adding your device back to the app, updating the firmware, and then attempting to use the link wizard again?
I updated the firmware but that wasn't the issue. This is my first time setting up a Raspberry Pi for smart home use and so I believe I made a noob mistake in that I installed this cli on my main computer, rather than the raspberry pi itself. Once I ran it from the PI, it registered just fine!
Hmm, it should have worked on both computers. What OS is your main computer? Does it have a wireless adapter, or is it connected to your network over ethernet? @enkia
I'm running macOS Sierra 10.13.6. I tried on an iMac as well as on a Macbook to get closer to the PI. Both timed out and are connected wirelessly using the same network as the PI, yep.
What's the NodeJS version on all 3 computers?
Apologies for the late response!
Macbook: v10.4.1 iMac: v10.6.0
I had trouble with timeouts while adding my 2 plug devices after changing my network SSID. Used the same pi 3 I used before but had no luck this time. Upgraded everything but still got timeouts. Started to fill out the survey and didn't realize I only tried while the pi was connected to ethernet (same subnet in the end though). Switched to wifi on the pi and it worked ... got different private local keys from before though?
@StoatsCoding the local keys are different every time you run the linking process. Are you saying that the Pi had to be connected via WiFi to your network for it to work?
I can confirm that changing to wifi in place of a wired connection for the pi was successful. Previously I had the exact symptom that was mentioned above.
I'm having the same problem, and it happens whether my PC (windows 10) is on a wired or wireless connection.
C:\WINDOWS\system32>tuya-cli link-wizard
? Make the indicator light on your device flash.
For most devices, this means holding down the main button.
Press return when it's blinking. Yes
? What's your WiFi called? R
? What's the password for your WiFi? [hidden]
? How many devices do you want to link? 1
? Do you want to save devices that are successfully linked? Yes
× Device(s) failed to be registered!
Error: Timed out wating for device(s) to connect to cloud
at Promise (C:\Users\erich\AppData\Roaming\npm\node_modules\@tuyapi\cli\node_modules\@tuyapi\cloud\index.js:275:12)
at
Here is my debug... tuya_cli debug.txt
Still not sure what the issue is, sorry @erichter2018. I'm going to try and do some digging tonight.
Moving thread to #65.
I have been trying for a few hours to successfully register a plug that I am able to setup via the smartlife app. I have read through a few of the threads and tried everything that was suggested. Attached is output of the program. Is there anything within the file that points to an obvious oversight of mine?
Although this should not have been an issue I removed satellite APs from my mesh network and ensured that my computer was connected to my network via 2.4Ghz. I cannot think of anything else that would be different between my phone's access to the network and my computer's.
node v8.11.4
$ npm -v tuya-cli 5.6.0
tuya_cli_link_timeout.txt