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

Idea: Emulate tuya device with tuyapi #44

Closed
gunnicom opened this issue Jun 22, 2018 · 8 comments
Closed

Idea: Emulate tuya device with tuyapi #44

gunnicom opened this issue Jun 22, 2018 · 8 comments

Comments

@gunnicom
Copy link

I just thought if maybe it is possible/and or a good idea to emulate a tuya device with tuyapi.
So you can listen on port 6668 and get the messages from a local running app like Smart life.
So, you remove your hardware plug to make it inactive, then start an emulation on your PC with the known ID and localKey.

@codetheweb
Copy link
Owner

It's possible, and I'd like to make a virtual stub device for automated tests in the future; but I'm not sure how useful a full-blown emulation would be.

What would you want to use it for?

@gunnicom
Copy link
Author

It was just an idea. No use for now, as i started with tuya device just two days ago. Maybe it will be not useful at all, but if it is easy to implement, maybe someone will find a use for it :D

@codetheweb
Copy link
Owner

Ok.

It's an interesting idea, but I'm going to close this issue for now. If I eventually get around to adding a stub simulated Tuya device for testing I might consider adding something like this as well.

@gunnicom
Copy link
Author

Yes that is ok, as said was just an idea. But got another one already. I try to learn about node red and build a node red node from tuyapi. But i still have no clue how to do it :D

@WisdomSky
Copy link

can someone guide me how to do this? I have a use-case in mind.

@codetheweb
Copy link
Owner

@WisdomSky information in this issue is very outdated. 😛

There's a stub implementation here that you can use.
Also, see this test file for TuyAPI that uses the stub module for some example code.

Please open a new issue if you need further help.

@briggitteorellana
Copy link

Hello ¿how do i install tuyasub???

@codetheweb
Copy link
Owner

Responded to https://github.com/TuyaAPI/cli/issues/89.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants