Rate limits , error 'blocked'


#1

Hello

I have a product registered and planning to use 10 Nest cameras (which is the max limit).

I am currently receiving error: ‘blocked’ in the response which I read from the documentation is due to rate limits.

How do I come out of blocked state ?

Also rate limits are applicable for every device that is every camera , or for a product or for the access token of the product ?


#2

Please see the following documentation on data rate limits.

https://developers.nest.com/documentation/cloud/data-rate-limits/


#3

The https://home.nest.com web interface doesn’t appear to have any rate limits. Is that correct?

We’re also wondering if the rate limit is stricter when the app is in development and not approved by Nest yet.
Is the rate higher for approved apps?


#4

Yes, Nest apps do not have a rate limit, because Nest apps do not have any automation and all actions are manually driven. There is no way in the API to differentiate between an app that uses automations and one that manually triggers all changes, therefore the rate limits are in place to protect the devices and systems from excessive changes, primarily due to automations.

There is no difference between rate limits in apps in development versus those in production. In practice, the rate limits very rarely come into affect. They usually only come into play during development and for this reason, we recommend using the Nest Home Simulator, as simulated devices have a much higher rate limit.


#5

Hi Lionell, thank you for your prompt and clarifying reply.

We understand the necessity for the rate limits from a technical perspective, but are afraid it will create a bad user experience on first app launch. To explain, here is our use case:

Although eventually a user will change Nest Thermostat settings on rare occasions, a user who opens the app for the very first time will start clicking around, quickly changing the mode from Eco to Off to Heat, and changing the temperature multiple times within a short time frame, just to see if the app works as expected.

As it stands now, the user will, after only a few clicks, be confronted with a blocked call.

That’s a bad user experience, making them think the app doesn’t work very well, because it is not as responsive as the official Nest app and the Nest web interface, which are, as I understand now, not rate limited.

What is considered best practice in dealing with this?


#6

Hi Emil, I understand your concern and we are looking at ways to improve this. Please keep in that there is physical equipment being controlled and the equipment must be protected. In most cases, we’ve found that users will “test” the behavior but after a few attempts they get over it, so informing them that they have reached a temporary limit and to please try again later, is typically sufficient.


#7

Agreed there --but is there any way for us to track how many requests we have left, while in test? That’d be a neat enhancement from the dev side. I have a similar use case, and agree, but it’d be useful to build in something that said (or constantly said(?) via a dashboard I create something like, “You have 20 more requests left till 7pm” or something that allows me to add those variables for “20” and “7pm”…


#8

Hi Andy,

Thanks for the idea. I’ve filed it as a feature request. We agree that transparency is a good thing. How highly this feature request will get prioritized, I have no idea.

Thanks,
Betsy


#9

Hi @betsyl

We are facing a similar problem, we have “blocked” request but in no way are we sure how many requests are left.

We want to show the NEST app on an EXPO and there will be many requests.

We found that when we send a request every 10 seconds on 8th try we get blocked. We don’t know:

  • how much time do we have to wait before we try again (but we can check that
  • what is the limits and whether they are per hour or per minute or what?

We don’t want to abuse your servers its just that for 2 days we would like to offer a good experience for the customers of our client for which we integrated a NEST app and other IOT integration with Phillips hue with ARKit application.

Thanks,
Mark


#10

Hi Mark,

Thanks for your question.

The recommendation to avoid errors is to limit requests to a maximum of one call per minute. You might be able to make more calls than this. You can experiment to find out what works for you. The rules are complex and differ for read and write. You should be able to make more read calls than write calls in a given time period.

If you hit the limit and are blocked, the wait period is a sliding window where the more you exceeded the limit, the longer the wait period. The maximum wait period before you can make more calls is one hour.

For your demo, is it possible to use the Nest Home Simulator instead of physical Nest devices? Because we set a very high tolerance in virtual devices, your product is not likely to encounter data rate limit error conditions when using the Nest Home Simulator.

Thanks again,
Betsy


#11

Hi @betsyl

Thank you for the response. I am still missing the specifics.

We have made a test with 1 write request /minute and after 10 attemts, 11 one is blocked.

Can I get any specific number? And whether the limit is per hour or per 10 minutes or what? Does it depend on a server load or any other factors?

How can you exceed the limit more or less? Is it not that you exceeded it and automatically the next request is blocked? Or there is a time limit and then it counts the requests after this time and if the limit is exceeded it counts how many requests more were sent than allowed and calculates the time that we will be blocked?

We have NEST on the wall on the EXPO since monday - we will have to use it, the question is just how often…

W


#12

Hi,

The specific recommendation is 1 call per minute.

Thanks,
Betsy


#13

Hi,

Thank you for the answer @betsyl, however as I wrote we have tried that and after 10 attempts of 1 try / minute we are blocked. We have tried one write request every 2 minutes and also we were blocked after a couple of requests, not even 30 minutes went by. As I left work the developer tried to chekc one request every 5 minutes. Any reason why this could be?

I thought that maybe it depends on server load or maybe you see that the request are automatic meaning that the interval between requests is exactly the same so you block it for this reason? If you can comment I would appreciate.

Thanks,
Mark


#14

This limit of calls makes your device useless… I work in home automation industry and after testing your device with Crestron I can 100% say that there is no way in hell my company will be selling or recommending Nest. Can you not enable local control like everybody else ? why does it have to go through your servers. What a crap of a solution.


#15

Appreciate this is quite some time after the original and last posting, but to me is still relevant.

I also understand the reason for the data rate limit, Nest\Google being such a small company want to restrict access to their api!!!

In reality this is stated to protect the device and is based on battery power, so why then when both of my nest thermostats are hard wired into 9v supply and aren’t reliant on battery do i still get stuck with rate limit issues.

1 Update per minute is not acceptable for any User interface, also why then does the Nest App not get stuck with the data rate limit.

Developers need to have a far more transparent and tangible determination other than about 1 per minute, that is wholly unacceptable. At the worst Nest could at least include the available updates within the rest response so that we have a clue when we are going to get blocked.

For all third party developers it makes the nest api nearly useless for updates.

Come on google your better than this, if the nest app is capable of multiple updates without being blocked then clearly it’s not about protecting the device, but protecting the Nest App to ensure we have to use that instead on other integrations