milo526 / homebridge-tuya-web

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

[Feature Request] Device command buffering #604

Closed RFHold closed 5 months ago

RFHold commented 6 months 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 6 months ago

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

github-actions[bot] commented 5 months 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.