milo526 / homebridge-tuya-web

Hoobs and Homebridge plugin for Tuya devices using Home Assistant Tuya Web Api
MIT License
217 stars 93 forks source link

[Feature Request] Device command buffering #604

Closed RFHold closed 1 month ago

RFHold commented 1 month ago

Is your feature request related to a problem? Please describe.

There is a common problem with some devices and the way scenes are set. When I activate scenes that change the color, the color doesn't always change. It seems like these devices do not handle concurrency very well and some commands overwrite the final setting of the light.

Describe the solution you'd like

I would like to be able to enable some sort of command buffering where commands to the same device are held in memory and sent one by one with a configurable delay.

Describe alternatives you've considered

It looks like I can achieve something similar with stateless devices but that would require more manual configuration than I'd like.

Additional context

Logs show 3 separate commands coming in for all 15 of my devices within the span of a second.

I am willing to do this if it would be a desired feature

milo526 commented 1 month ago

Sounds like a good idea; I'm open to PRs

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.