-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP Response Code 401 means Unauthorized #6
Comments
Mainly refering to this line: https://github.com/kk7ds/somecomfort/blob/master/somecomfort/client.py#L405 |
Definitely agree it's counter-intuitive, but that behavior is based on my experience with it in practice. Their API is really not well-behaved in any way, and they pretty much return 401 for just about everything. Since you can sometimes get a 401 just because you hit something (even like the KeepAlive) too quickly, and then shortly thereafter continue to use the API with the same credentials, it's really hard to tell a useful difference between responses :/ |
Understandable. Wish Honeywell would actually create an official publicly consumable API for their thermostats. Maybe update/change the exception thrown to call out the ambiguous way Honeywell uses 401? |
The exception message is more descriptive but not accurate. "somecomfort.client.APIRateLimited: You are being rate-limited. Try waiting a bit." Yet I can login with a web browser after that. |
Based on the HTTP protocol, a status code of 401 means an unauthorized request was made. However, somecomfort seems to interpret this code to mean the client is being rate-limited by Honeywell's server. I ran into this when I typo-d my password. Seems counter-intuitive to immediately assume 401 means rate-limiting is happening.
The text was updated successfully, but these errors were encountered: