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

error while using link-wizard and trying to obtain local-key #57

Closed
Minichota opened this issue Aug 13, 2018 · 8 comments
Closed

error while using link-wizard and trying to obtain local-key #57

Minichota opened this issue Aug 13, 2018 · 8 comments

Comments

@Minichota
Copy link

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

@codetheweb
Copy link
Owner

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?

@Minichota
Copy link
Author

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.

@codetheweb
Copy link
Owner

@Minichota please see my above comment. I need more details before I can help.

@Minichota
Copy link
Author

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

@codetheweb
Copy link
Owner

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.

@Gunnthorian
Copy link

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

@codetheweb
Copy link
Owner

@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?

@Gunnthorian
Copy link

Gunnthorian commented Sep 18, 2018

@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.

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

3 participants