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

is there a breaking change at tuya ? #641

Open
geertschneider opened this issue Nov 21, 2023 · 6 comments
Open

is there a breaking change at tuya ? #641

geertschneider opened this issue Nov 21, 2023 · 6 comments

Comments

@geertschneider
Copy link

Describe the bug
I'm trying to connect to my devices through this library. But seems to hang on Error: find() timed out. Is the device powered on and the ID or IP correct?
I'm sure deviceID and localKey are correctly filled in.
I tried the same with CURL (generated by the tuya API explorer), and those requests pass, but trying to connect to the same device via the library fails.

I also tried node-red, which uses the same library under the hood.

Any idea ?

@Apollon77
Copy link
Collaborator

find is using UDP to find the device IPS, so it really depends on your configuration ... make sure UDP is available and correctly routed

@geertschneider
Copy link
Author

Thanks for your reply!

Well I was running node-red in a container, I can imagine the networking might be an issue there...

I didn't look at the code of tuyaapi, I thought the library was just created a developer-friendly wrapper on top of the tuya REST api, and as I could execute the REST API from the node-red container, I was expecting it to work via the tuyaapi as well.

But than I just ran the library from nodeJS from the command line with a basic .find(deviceID,localKey).
The tuya app runs on the same wifi network, and my PC runs without issues, so I would not expect to have to do something special for UDP on my laptop/network?

@kueblc
Copy link
Collaborator

kueblc commented Nov 22, 2023

This library is for communicating with Tuya devices on your local network, it does not interact with the cloud.

@Apollon77
Copy link
Collaborator

in a container

Then use macvlan on the container to have UDP forwarded

@stappersg
Copy link

in a container

Then use macvlan on the container to have UDP forwarded

That makes sense, so now I'm poking @geertschneider

@RoffelKartoffel
Copy link

This library is for communicating with Tuya devices on your local network, it does not interact with the cloud.

Oh My Lord.... thank you for pointing that out. I had the very same problem and stumbled upon this "issue" by chance. This error message realy is not that self-explanatory. 😇

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

5 participants