milo526 / homebridge-tuya-web

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

Q: What is the minimum polling interval? #407

Closed paschalis-mpeis closed 2 years ago

paschalis-mpeis commented 2 years ago

Can we update the documentation a bit regarding the pollingInterval option?

Digging a little bit into this, looks like it doesn't let it go below 10 minutes (TUYA_DISCOVERY_TIMEOUT*1e3)

Can't we set it to something like 10 seconds? Is Tuya platform blocking requests if those happen at a higher frequency?

Scenario:

It is mentioned that if the Homebridge integration is used exclusively, there won't be any needs for polling updates. But that's not the case when a scene is used.

For example in my setup:
  1. I have a Plug A which can be toggled on/off (up to this, it's just fine)
  2. I have a scene exported as a switch, which once clicked it opens Plug A for 30 minutes.

Cheers, Paschalis

milo526 commented 2 years ago

The standard value is set at 600 seconds, this is the fast that Tuya will allow. If you where to set it faster, all request will fail since tuya will block them.