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

Not properly recognizing expired token response? #44

Closed
jimboca opened this issue Apr 3, 2019 · 2 comments
Closed

Not properly recognizing expired token response? #44

jimboca opened this issue Apr 3, 2019 · 2 comments

Comments

@jimboca
Copy link
Collaborator

jimboca commented Apr 3, 2019

019-04-03 08:52:08,163 [Controller] [DEBUG] Ecobee Controller:get: Sending: url=https://api.ecobee.com/1/thermostat payload={'json': '{"sel
ection": {"selectionType": "thermostats", "includeVersion": true, "includeProgram": true, "includeWeather": true, "includeUtility": true, "i
ncludeRuntime": true, "includeAlerts": true, "includeEquipmentStatus": true, "includeSensors": true, "includeSettings": true, "includeLocati
on": true, "includeEvents": true, "includeExtendedRuntime": true, "selectionMatch": "411956665463"}}'}
2019-04-03 08:52:10,451 [Controller] [WARNING] /usr/lib/python3.5/socket.py:647: ResourceWarning: unclosed <socket.socket fd=7, family=Addre
ssFamily.AF_INET, type=2049, proto=6, laddr=('192.168.86.92', 59608), raddr=('216.220.61.235', 443)>
2019-04-03 08:52:10,453 [Controller] [DEBUG] Ecobee Controller:get:  Got: code=500
2019-04-03 08:52:10,454 [Controller] [ERROR] Ecobee Controller:get: Unknown response 500: https://api.ecobee.com/1/thermostat {
  "status": {
    "code": 14,
    "message": "Authentication token has expired. Refresh your tokens. "
  }
}
2019-04-03 08:52:10,456 [Controller] [DEBUG] ECO_CTR:Ecobee Controller:getThermostatSelection: done
2019-04-03 08:52:10,457 [Controller] [ERROR] Failed to get updated data for thermostat: Development(411956665463)
2019-04-03 08:55:02,969 [Controller] [DEBUG] controller:longPoll
2019-04-03 08:55:02,970 [Controller] [DEBUG] heartbeat hb=1
2019-04-03 08:55:02,972 [Controller] [DEBUG] controller:updateThermostats:
2019-04-03 08:55:02,975 [Controller] [INFO ] Tokens have expired. Refreshing...
@jimboca
Copy link
Collaborator Author

jimboca commented Apr 4, 2019

and check when it expires:

2019-04-04 07:34:42,068 [NodeServer] [ERROR] Ecobee Controller:reponse:post: Unauthorized: https://api.ecobee.com/token?grant_type=ecobeePin&client_id=19j5o2QheoDIYeuwPGOCWV80hI07lbDC&code=BqbquL5wirXkBhUTz5g4aQe0islZmTdv: text: {
  "error": "authorization_expired",
  "error_description": "The authorization has expired waiting for user to authorize.",
  "error_uri": "https://tools.ietf.org/html/rfc6749#section-5.2"
}

@jimboca
Copy link
Collaborator Author

jimboca commented Apr 21, 2019

Fixed in 2.1.2

@jimboca jimboca closed this as completed Apr 21, 2019
jimboca added a commit that referenced this issue Apr 21, 2019
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

No branches or pull requests

1 participant