From 96d6e5ad3c8b1cbd500c1eff053ce3600be1059e Mon Sep 17 00:00:00 2001 From: John Cocula Date: Wed, 12 Aug 2015 11:57:58 +0100 Subject: [PATCH] v1.3 release --- src/I_Ecobee1.xml | 7 ++++++- src/S_Ecobee1.xml | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/I_Ecobee1.xml b/src/I_Ecobee1.xml index cec7bbd..a086060 100644 --- a/src/I_Ecobee1.xml +++ b/src/I_Ecobee1.xml @@ -104,7 +104,7 @@ decompress_lzo_file() { end -- constants - local PLUGIN_VERSION = "1.2" + local PLUGIN_VERSION = "1.3" local ECOBEE_SID = "urn:ecobee-com:serviceId:Ecobee1" local TEMP_SENSOR_SID = "urn:upnp-org:serviceId:TemperatureSensor1" local TEMP_SETPOINT_HEAT_SID = "urn:upnp-org:serviceId:TemperatureSetpoint1_Heat" @@ -383,6 +383,8 @@ decompress_lzo_file() { local ecobeeLog + local auth_token_failures = 0 + local function loadSession() local session = {} @@ -399,6 +401,8 @@ decompress_lzo_file() { session.auth_token = luup.variable_get(ECOBEE_SID, "auth_token", PARENT_DEVICE) if session.auth_token == "" then session.auth_token = nil end + session.auth_token_failures = auth_token_failures + session.access_token = luup.variable_get(ECOBEE_SID, "access_token", PARENT_DEVICE) if session.access_token == "" then session.access_token = nil end @@ -419,6 +423,7 @@ decompress_lzo_file() { end writeVariableIfChanged(PARENT_DEVICE, ECOBEE_SID, "auth_token", session.auth_token or "") + auth_token_failures = session.auth_token_failures or 0 writeVariableIfChanged(PARENT_DEVICE, ECOBEE_SID, "access_token", session.access_token or "") writeVariableIfChanged(PARENT_DEVICE, ECOBEE_SID, "token_type", session.token_type or "") writeVariableIfChanged(PARENT_DEVICE, ECOBEE_SID, "refresh_token", session.refresh_token or "") diff --git a/src/S_Ecobee1.xml b/src/S_Ecobee1.xml index 2397282..71f693e 100644 --- a/src/S_Ecobee1.xml +++ b/src/S_Ecobee1.xml @@ -8,6 +8,7 @@ currentClimateRef string + yes