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

general question: local http requests to tuya device? #538

Open
Hans-Maulwurf opened this issue Sep 23, 2024 · 4 comments
Open

general question: local http requests to tuya device? #538

Hans-Maulwurf opened this issue Sep 23, 2024 · 4 comments

Comments

@Hans-Maulwurf
Copy link

Hey guys,

I'm delighted that I found tinytuya, I have a Moes Smart Wifi Dimmer and it looks (for now) that I am able to somehow control and read it via tinytuya. The more I read about tuya environment, I see openAPIs specs and wonder, if it's possible to control the device by pure local http requests. Can somebody point me to a doc or the api spec that is really working directly to the device and not to the cloud?

@Hans-Maulwurf
Copy link
Author

when I'm in the tuya api explorer, I see on the right a curl command with url, e.g.
https://openapi.tuyaeu.com/v2.0/cloud/thing/b...

since tuya devices offer a local api on port 6668, I wonder, how to modify this url to the local ip and send the request to the device

@make-all
Copy link

The curl commands are for the cloud API. The devices locally do not use http, thus the need for this library to communicate with them locally.

@Hans-Maulwurf
Copy link
Author

ok, fair point

@jasonacox
Copy link
Owner

Hi @Hans-Maulwurf, if you want more details on the protocol (how Tuya devices are accessed via the local API), you might like this great write up by @uzlonewolf : #260

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