44ec9da9fb71f81f2d50d4df359f73c4434fb614,services/core/MasterDriverAgent/master_driver/interfaces/ecobee.py,Interface,configure,#Interface#Any#Any#,92
Before Change
self.get_ecobee_data()
self.authorization_stage = "AUTHORIZED"
if self.authorization_stage != "AUTHORIZED":
if self.authorization_stage == "REQUEST_TOKENS":
try:
self.update_authorization()
except (ConnectionError, NewConnectionError) as ce:
_log.error("Error requesting tokens during configuration: {}. Resetting Ecobe authorization".format(
ce))
self.authorization_stage = "UNAUTHORIZED"
if self.authorization_stage == "UNAUTHORIZED":
self.update_authorization()
if not self.poll_greenlet:
After Change
self.parse_config(registry_config_str)
// Fetch any stored configuration values to reuse
self.authorization_stage = "UNAUTHORIZED"
stored_auth_config = self.get_auth_config_from_store()
// Do some minimal checks on auth
if stored_auth_config:
if stored_auth_config.get("AUTH_CODE"):
self.authorization_code = stored_auth_config.get("AUTH_CODE")
self.authorization_stage = "REQUEST_TOKENS"
if stored_auth_config.get("ACCESS_TOKEN") and stored_auth_config.get("REFRESH_TOKEN"):
self.access_token = stored_auth_config.get("ACCESS_TOKEN")
self.refresh_token = stored_auth_config.get("REFRESH_TOKEN")
try:
self.get_ecobee_data()
self.authorization_stage = "AUTHORIZED"
except (RuntimeError, RemoteError):
_log.warning("Ecobee tokens expired, requesting new auth")
self.authorization_stage = "UNAUTHORIZED"
if self.authorization_stage != "AUTHORIZED":
self.update_authorization()
self.get_ecobee_data()
if not self.poll_greenlet:
self.poll_greenlet = self.core.periodic(180, self.get_ecobee_data)
_log.debug("Ecobee configuration complete.")
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: VOLTTRON/volttron
Commit Name: 44ec9da9fb71f81f2d50d4df359f73c4434fb614
Time: 2020-06-22
Author: james.larson@pnnl.gov
File Name: services/core/MasterDriverAgent/master_driver/interfaces/ecobee.py
Class Name: Interface
Method Name: configure
Project Name: VOLTTRON/volttron
Commit Name: f4560aadbf6ff350e916a934b02e60c9292101a4
Time: 2020-06-02
Author: james.larson@pnnl.gov
File Name: services/core/MasterDriverAgent/master_driver/interfaces/ecobee.py
Class Name: Interface
Method Name: configure
Project Name: VOLTTRON/volttron
Commit Name: f4560aadbf6ff350e916a934b02e60c9292101a4
Time: 2020-06-02
Author: james.larson@pnnl.gov
File Name: services/core/MasterDriverAgent/master_driver/interfaces/ecobee.py
Class Name: Interface
Method Name: _set_point
Project Name: VOLTTRON/volttron
Commit Name: 44ec9da9fb71f81f2d50d4df359f73c4434fb614
Time: 2020-06-22
Author: james.larson@pnnl.gov
File Name: services/core/MasterDriverAgent/master_driver/interfaces/ecobee.py
Class Name: Interface
Method Name: _set_point