MilhouseVH / autoaway.py

Improved auto-away monitoring for Nest Thermostats
15 stars 1 forks source link

Error Running Script #4

Closed wazime closed 7 years ago

wazime commented 10 years ago

I had everything running good, but now I get the following error when the script runs.

2014-03-15 21:11:16.621005: [debug] Calling notify [/usr/bin/notifynest.sh] with arg1 [away], arg2 [0], arg3 [0d 00:00:00] 2014-03-15 21:11:17.349267: #### BEGIN EXCEPTION ##### 2014-03-15 21:11:17.349336: Command '['/usr/bin/notifynest.sh', 'away', '0', '0d 00:00:00']' returned non-zero exit status 1 2014-03-15 21:11:17.349359: Output from notify follows: Updating Nest with away status: away Property occupied for 0d 00:00:00 (0 seconds) Traceback (most recent call last): File "/usr/bin/nest.py", line 324, in main() File "/usr/bin/nest.py", line 280, in main n.login() File "/usr/bin/nest.py", line 96, in login res = urllib2.urlopen(req).read() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 127, in urlopen return _opener.open(url, data, timeout) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 410, in open response = meth(req, response) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 523, in http_response 'http', request, response, code, msg, hdrs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 448, in error return self._call_chain(_args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain result = func(_args) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 531, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 403: FORBIDDEN

2014-03-15 21:11:17.349409: #### END EXCEPTION #####

Any help with this would be great.

MilhouseVH commented 10 years ago

It looks like the problem is with the pynest script being refused access to the Nest server, perhaps Nest have changed their API so that pynest no longer works, or it's just a temporary problem with the Nest API?

Also, are you sure your username/password is working - have you tried logging in to your Nest account using a browser?

Unfortunately I don't have a Nest thermostat or smoke sensor myself, so my ability to test pynest is extremely limited as there are no devices added to my account. However I have been able to authenticate with a username and password using pynest and I'm not experiencing the 403 error that you are seeing - for me it crashes later on as there are no serial numbers, but that's understandable.

So my advice would be to: a) Check your Nest account is working correctly, and any terms of service prompts have been accepted on the account (check the account with a browser) b) Double check the credentials you are passing to pynest are correct c) Contact the author/maintainer of whichever pynest fork you are using for support d) Consider using an alternative script/class to change settings on your Nest account if pynest is no longer supported