Skip to content
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

resolve API disconnects #10

Merged
merged 3 commits into from
Nov 30, 2017
Merged

resolve API disconnects #10

merged 3 commits into from
Nov 30, 2017

Conversation

landlord11
Copy link
Contributor

This change resolves the plugin disconnecting from the Ecobee servers. With the current code, any time the Ecobee API servers are offline (for maintenance, network errors, etc.) the refresh and access token are erased. This prevents the plugin from making any future updates without reauthentication.

Instead the tokens shouldn't be removed so the plugin can keep trying to refresh. The access token should only be cleared once the refresh_token is missing. I have been successfully running with this change for ~4 months.

jdhorne and others added 3 commits February 1, 2017 14:15
This change resolves the plugin disconnecting from the Ecobee servers.  Even if there is an authentication error—for example, the Ecobee API servers are down—the tokens shouldn't be removed so the plugin can keep trying to refresh.  The access token should only be cleared once the refresh_token is missing.

The current code will erase the tokens any time the API servers go down, preventing any future refreshes.
@koensayr
Copy link

koensayr commented Nov 7, 2017

This would be great to see merged. I run into this issue myself

@jdhorne jdhorne changed the base branch from master to develop November 30, 2017 01:19
@jdhorne jdhorne merged commit f491be4 into indigo-jay:develop Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants