Whenever there was a failure to refresh tokens, the plugin would immediately discard the auth_token, leading to the need to retrieve and register a new PIN at ecobee.com. When stale tokens were being used due to a Vera problem, this was the correct course of action. But in other cases where refreshing the token failed, it is better to try some number of times before giving up and discarding the auth_token. This change tries up to five times to refresh tokens (over a minimum space of 15 minutes), before giving up and requiring a new PIN.
Whenever there was a failure to refresh tokens, the plugin would immediately discard the
auth_token
, leading to the need to retrieve and register a new PIN at ecobee.com. When stale tokens were being used due to a Vera problem, this was the correct course of action. But in other cases where refreshing the token failed, it is better to try some number of times before giving up and discarding theauth_token
. This change tries up to five times to refresh tokens (over a minimum space of 15 minutes), before giving up and requiring a new PIN.