tuyapi: tuya-cli link hangs and times out at "Registering device(s)..."
I’ve followed the setup directions up to step 5, but spinner hangs on Registering devices(s)... and eventually throws ✖ Device(s) failed to be registered! Error: Timed out waiting for devices to connect.
I’m sure I am using the correct inputs because I’m still able to connect it to the Tuya Smart app fine.
I even tried increasing the timeout directly in the source to some really high number, but that didn’t seem to have any effect.
It’s quite curious because, very occasionally (~10% of the tries), when running the tuya-cli link ... command, I will hear my device make noises which match the noises it makes when I successfully connect it to the Tuya Smart app (presumably a test for turning on/off the power). But even after tuya-cli link instigates this, nothing happens and the timeout error is subsequently thrown :\
@codetheweb do you or anyone have advice on how to troubleshoot this? I’m willing to provide any additional info you might need. Thanks!
Desktop (please complete the following information):
- OS: macOS 10.15.3
- Node: 13.7.0
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 79 (13 by maintainers)
@FearNaBoinne Thanks. Also changed from network and now it works!
Remove the square brackets… They’re used in the example to indicate a value, but should NOT be in the actual command… (It’s a standard notation signifying mandatory values…)
(PS: Using English, so others can understand the reply as well)
Just a quick follow up to mine above, try turning off the app on your phone with a Force Stop. I was able to register again with my usual SSID name including capitals so the phone app being off may be the trick we have been looking for. Good luck.
Ensure your RasPi is only connected by WiFi, and not also by cable! (If Eth0 is up, it’ll be preferred, and send the packets out the cable instead of the WiFi… Most APs will not replay the magic packets if they come in over the LAN cable!)
Ensure your RasPi is connected to a 2.4GHz channel, or the device will be unable to see the magic packets.
On the command line issue:
iwconfig wlan0I created a special IoT WiFi SSID on my AP mesh that is 2.4GHz only, and when I use the LINK command, I first log in to the RasPi on the WiFi IP, and then issue an
ifconfig eth0 down, and when I am done, I doifconfig eth0 up…Finally, I have a few Teckin SP21’s here, and gave up on them, but they also do not work reliably with the Tuya App, so I am not buying any Teckin crap anymore!
npm update -g @tuyapi/cli.with the newest update of
tuya-clii’m able to register my devices by following the setup instructions!I also got exactly the same issue. The second setup method does not work either.