jasonacox / tinytuya

Python API for Tuya WiFi smart devices using a direct local area network (LAN) connection or the cloud (TuyaCloud API).
MIT License
867 stars 157 forks source link

Socket Server status #471

Open Palmke opened 3 months ago

Palmke commented 3 months ago

Hi there,

I have noticed there is a branch that implements a WebSocket when using the server. What is the status of this feature? Is it still being developed, or is it abandoned?

jasonacox commented 3 months ago

Hi @Palmke , I know @uzlonewolf started on that some time ago. It is something on our list to do but we haven't had time to develop it further.

I have also considered switching to a flask + socketio app similar to what I did for TinyLLM chatbot. I think there is a lot we could do with the server. The other possible path includes converting the core of tinytuya to asyncio and using FastAPI and Uvicorn ASGI. It would help to understand what the community would like to see, specifically how they would like to use the server. That would help us focus on the most relevant.

Let us know your thoughts (vote) and of course, let us know if you are interested in contributing PRs as well! 😉

uzlonewolf commented 3 months ago

I still intend on finishing it, but have been super-busy lately and had put it aside temporarily as it sounded like everyone who would have used it had already done their own thing.