Announcement

Collapse
No announcement yet.

Cannot control Nest device

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Cannot control Nest device

    When I try to set (for example) the lower target temperature higher, I most of the time get a 429 HTTP error, which translates into "Too Many Requests".

    Here is the full error from the log:

    Apr-03 0:30:30 Nest DEBUG System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 429 (Too Many Requests). at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSu ccess(Task task) at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSucc ess(Task task) at FirebaseSharp.Firebase.d__3.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task`1.get_Result() at NestSharp.NestClient.SetTargetTemperatureLow(String thermostatId, Double target, String scale) at HSPI_Nest.NestApp.ButtonPress(String buttonName, Double value, Int32 dvref) ---> (Inner Exception #0) System.Net.Http.HttpRequestException: Response status code does not indicate success: 429 (Too Many Requests). at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSu ccess(Task task) at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSucc ess(Task task) at FirebaseSharp.Firebase.d__3.MoveNext()<---

    Apr-03 0:30:30 Nest ERROR One or more errors occurred.

    Apr-03 0:30:29 Nest DEBUG PUT: path=devices/thermostats/gi6tL1If6GjVbuvSpAmA_A_VumSUMP-v payload={"target_temperature_low_c":21.5}

    Apr-03 0:30:29 Device Control Device: Nest Target Temperature Low to + (1001) by/from: CAPI Control Handler

    #2
    the "Too many requests" error means you have exceeded the quota.
    the Nest API apply some rate limits, there is a maximum number of requests one can do for a given period of time. From what I read this maximum is one request per minute with a one hour sliding window, meaning that you can do 60 request in 1 minute but then you won't be able to do anymore request for the next hour.

    for more info read this:
    http://stackoverflow.com/questions/2...mitations-last
    https://developer.nest.com/documenta...ta-rate-limits

    so, wait a day or two, then you should be fine
    and make sure you don't have events that trigger a lot of request to the Nest API (i.e changing target temp, hvac mode, etc...)

    Note that if the device battery is low the same "429 (Too Many Requests)" is sent.

    Comment


      #3
      helpful but...

      thank you for the fast response. this makes some sense, but this behavior makes it difficult to test the system during development - when you are trying different user interfaces.

      Comment

      Working...
      X