Closed Minichota closed 6 years ago
Might be related to the broadcast error. Please update the CLI tool with npm i @tuyapi/cli@1.1.0 -g
and try again.
If it still doesn't work, please post the output of DEBUG=* sudo tuya-cli link-wizard
.
Also, what's the output of node -v
?
well, now I'm getting a timeout error, I'm using the same wifi network that I used with my phone and the tuya app, I'm not sure why I'm getting it.
@Minichota please see my above comment. I need more details before I can help.
Well, when I used to debugger one, it appeared to work... now my only issue is that I'm using a python version of this api and I'm getting timeout errors when attempting to run it. I think I'm done with this part of the process though
Ok. If you're using the Python port, please open future issues at clach04/python-tuya.
I'm closing this for now, feel free to reopen it if you need to.
just found this tuyapi and im trying to get the ids and keys right now but im getting the exact same error as Minichota
? 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? WIFI
? 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
⠇ Registering devices(s)...events.js:167
throw er; // Unhandled 'error' event
^
Error [ERR_SOCKET_CANNOT_SEND]: Unable to send data
at Socket.onListenError (dgram.js:335:22)
at Object.onceWrapper (events.js:273:13)
at Socket.emit (events.js:182:13)
at state.handle.lookup (dgram.js:239:14)
at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
at Socket.onListenError (dgram.js:335:8)
at Object.onceWrapper (events.js:273:13)
[... lines matching original stack trace ...]
at process._tickCallback (internal/process/next_tick.js:63:19)
on macOS HighSierra version 10.13.6
@Gunnthorian what's your NodeJS version? It should be >=8.0.0.
Can you please try running DEBUG=* tuya-cli link-wizard
and then post the output?
@codetheweb my node version is 10.8.0
After running it with the debug the outlet worked (no idea why, I just saw a success message) I will be heading home with more to test and I'll let you know.
update: works fine now, the 2.4ghz networks are just super slow in an apartment complex so setting the devices up is just really hit or miss. As for the error it hasn't shown up again since.
Okay, the issue is something I'm not sure of but its some socket error so I'm pasting the callback
"minichota@Matthew:/mnt/c/Windows/System32$ sudo 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? something-.- ? 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 ⠹ Registering devices(s)...events.js:183 throw er; // Unhandled 'error' event ^
Error [ERR_SOCKET_CANNOT_SEND]: Unable to send data at Socket.onListenError (dgram.js:362:22) at Object.onceWrapper (events.js:315:30) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at _handle.lookup (dgram.js:267:14) at _combinedTickCallback (internal/process/next_tick.js:141:11)" I'm on windows and I'm not sure, I'm using bash to run this, can someone please explain