0

I've come across this error with Firebase saying too many requests. I've read the nest api saying that they have limited the number of requests to avoid battery drainage on the device. But on the official nest android app you can switch on/off (changing to heating/off) the thermostat without an issue.

Any idea why this is limited in the developer api?

Mr.Noob
  • 1,005
  • 3
  • 24
  • 58

2 Answers2

2

The API limits the number of requests to preserve battery life and it will also stop accepting requests completely if the battery level drops too low. Take a read through this page on the Nest API site about limitations.

I would expect if you keep flipping the on/off switch in the Android app, it would also quit working after a while. You can pull up the battery state and look at it, so maybe someone will determine what the upper/lower limit is?

jfudgeelder
  • 423
  • 3
  • 13
  • Nest's own apps use a private API to communicate with their service. So the rate limiting is different. For third parties, who may have automated apps accessing the APIs, it is far more important to consider how the user's batteries might be affected. – David W. Keith Jul 21 '14 at 22:17
  • @jfudgeelder but who determines the limits? it doesn't give an exact number in the API does it? – Mr.Noob Jul 22 '14 at 15:31
  • @Mr.Noob No, there is no specific number. In the site I linked, it's a two-part formula but Nest doesn't divulge anything else. The details aren't given but it does list the `429` error it'll return. I would think you'd be best off putting something in your code that will inject a short delay. – jfudgeelder Jul 23 '14 at 00:57
1

I faced this issue with firebase firestore database while reading too much data at once. I don't know exact limit breach but it worked for around 1600 reads in Promise but didn't work for 26000. So my solution was to divide the whole thing in buckets, make their Promise and then read and it worked.

Ronn Wilder
  • 1,228
  • 9
  • 13