- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 347
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
Can't reach device #446
Comments
You'll get more meaningful support if you include details about your problem and follow the template given when opening an issue. Please include a code sample, debug logs, something we can use to understand what the issue is. |
const TuyAPI = require('tuyapi'); const device = new TuyAPI({ // Find device on network // Add event listeners device.on('disconnected', () => { device.on('error', error => { device.on('dp-refresh', data => { device.on('data', data => { }); // Disconnect after 10 seconds |
When i do node ./tuya.js (the files name) it says error connection timeout i have looked around at other issues and they all say to try to ping it and when I do it doesnt respond. |
If it doesn't respond to pings it almost certainly won't work with TuyAPI. Your network is probably misconfigured somewhere. Are both the device and your computer on the same subnet with no firewall between them? |
@codetheweb im running it from a vps |
That won't work, both devices need to be on the same local network. If you need to use a VPS for your application, you may want to try controlling your devices through the cloud API. |
@codetheweb what is the difference between the cloud api and what i was trying to use. |
Also what do i use for the username and password. |
Hello i need help with something.When i try to run this it gives me an error connection time out.Also when i try to ping the lights ip it doesn't respond.The reason i am trying to fix this is because i am trying to make a command for my discord bot that changes the color of the light.
The text was updated successfully, but these errors were encountered: