Open boydthomson opened 6 years ago
ran pip uninstall somecomfort and then pip3 install somecomfort and I no longer get the "Unexpected 403 response".
However, I get "somecomfort.client.APIRateLimited: You are being rate-limited. Try waiting a bit." just from requesting device list. I've tried waiting 10 minutes and I still get this error. I've cloned the repo but I'm not an overly experienced python developer and I'm not sure where to begin looking for ways to reduce the rate of API requests.
Installed using pip install somecomfort. Will try cloning and running from source to see if I can get more details.
:~$ somecomfort --devices DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): www.mytotalconnectcomfort.com DEBUG:urllib3.connectionpool:https://www.mytotalconnectcomfort.com:443 "GET /portal HTTP/1.1" 200 4142 DEBUG:urllib3.connectionpool:https://www.mytotalconnectcomfort.com:443 "POST /portal?RememberMe=false&timeOffset=480 HTTP/1.1" 200 4270 DEBUG:urllib3.connectionpool:https://www.mytotalconnectcomfort.com:443 "GET /portal?RememberMe=false&timeOffset=480 HTTP/1.1" 200 4180 INFO:somecomfort:Session refreshed DEBUG:urllib3.connectionpool:https://www.mytotalconnectcomfort.com:443 "GET /portal?RememberMe=false&timeOffset=480 HTTP/1.1" 200 4180 INFO:somecomfort:Session refreshed DEBUG:urllib3.connectionpool:https://www.mytotalconnectcomfort.com:443 "POST /portal/Location/GetLocationListData?filter=&page=1 HTTP/1.1" 403 1233 ERROR:somecomfort:API returned 403 from /Location/GetLocationListData request Traceback (most recent call last): File "/home/boyd/bin/somecomfort", line 11, in
sys.exit(main())
File "/home/boyd/.local/lib/python2.7/site-packages/somecomfort/main.py", line 201, in main
_main(session)
File "/home/boyd/.local/lib/python2.7/site-packages/somecomfort/main.py", line 156, in _main
session=session)
File "/home/boyd/.local/lib/python2.7/site-packages/somecomfort/client.py", line 385, in init
self._discover()
File "/home/boyd/.local/lib/python2.7/site-packages/somecomfort/client.py", line 49, in wrapper
return fn(*args, *kwargs)
File "/home/boyd/.local/lib/python2.7/site-packages/somecomfort/client.py", line 500, in _discover
raw_locations = self._get_locations()
File "/home/boyd/.local/lib/python2.7/site-packages/somecomfort/client.py", line 463, in _get_locations
return self._post_json(url, params=params)
File "/home/boyd/.local/lib/python2.7/site-packages/somecomfort/client.py", line 447, in _post_json
return self._request_json('post', args, **kwargs)
File "/home/boyd/.local/lib/python2.7/site-packages/somecomfort/client.py", line 441, in _request_json
resp.status_code))
somecomfort.client.APIError: Unexpected 403 response from API