BoschSmartHome / bosch-shc-api-docs

Bosch Smart Home Controller Local REST API
Other
208 stars 44 forks source link

Question: Maximum number of requests #16

Closed UEIMBrady closed 4 years ago

UEIMBrady commented 4 years ago

Hi, I know long polling is encouraged, but what's the actual disadvantage of short polling? There doesn't seem to be rate limiting, is that a change that we should expect? Or is it simply to preserve battery?

cap-rb commented 4 years ago

Hi, the main disadvantages of short polling is that you won’t get state changes in time and it could also happen that you miss some state changes during a short polling time period. That won’t happen with the long polling mechanism. Finally, it is more efficient to use the long polling mechanism.

And don’t worry, you only discharge the battery additionally when you change a state on that edge device, but not by requesting it.

Hope this answers your question

UEIMBrady commented 4 years ago

Awesome, thank you :)