I'm trying to get the REST Sensor to work with Nest, using Postman it works perfectly. I have the Authorisation code and the URL. With PRTG I get "expected status 200 OK but got 401 Unauthorized.". From reading the nest site this is likely to be that PRTG isn't following the redirect URL given back to it for the initial response.
https://developer-api.nest.com/devices/thermostats is the URL Sending either Authorisation settings or a custom header with the Bearer code fails.
https://developers.nest.com/reference/error-messages towards the bottom (under 401) implies Nest are using redirection: https://developers.nest.com/guides/api/how-to-handle-redirects supports this.
Does the REST sensor follow redirects? And is there a way of making this work?
Thanks!
Article Comments
Thanks for the clarification.
As a work-around I'm using the curl command in a scheduled task to pull the json file every few minutes and upload that to a local webserver. I'm them querying this with PRTG. Works quite nicely, but not elegantly.
Nov, 2018 - Permalink
Glad you got a workaround going :) If it works and saved you time, elegance doesn't matter :)
PRTG Scheduler |
PRTGapi |
Feature Requests |
WMI Issues |
SNMP Issues
Kind regards,
Stephan Linke, Tech Support Team
Nov, 2018 - Permalink
As of right now, the sensor is not following redirects, unfortunately. It's successor will, but it will take quite some time until it's finished. I'm afraid that you'll need to use PowerShell and Invoke-WebRequest to query the Nest Thermostat(s) for now.
PRTG Scheduler | PRTGapi | Feature Requests | WMI Issues | SNMP Issues
Kind regards,
Stephan Linke, Tech Support Team
Nov, 2018 - Permalink