I use a very cool Google Script I found on Github (source: https://gist.github.com/beezly/9b2de3749d687fdbff3f) to fetch the temperature on my Nest thermostat and log it into a Google Spreadsheet.
It is working great when I run the script manually, but not when I use a time trigger to run it automatically.
When posting the credential to the API on this line:
Line 12: var response = JSON.parse(UrlFetchApp.fetch('https://home.nest.com/user/login', options).getContentText());
The exception raised is:
Request failed for https://home.nest.com/user/login returned code 429. Truncated server response: Too many requests (use muteHttpExceptions option to examine full response) (line 12, file "Code")
I suspect that I'm not the only one using the script, and the Google source IP used by the trigger has exceeded the limit of the Nest API.
Would you have any solution for me? I have considered using a Proxy server, but the UrlFetchApp.fetch
function does not seem to accept it.
Thank you,
PF