From 76b3c34d5fa07777494cb9e043196eb77a7e24b5 Mon Sep 17 00:00:00 2001 From: Jack Chi Date: Mon, 14 Nov 2016 11:49:30 -0800 Subject: [PATCH] Revert "DVCSMP-2179 added device watch for ecobee based on the code from lyric" --- .../ecobee-thermostat.groovy | 23 +------------------ .../ecobee-connect.src/ecobee-connect.groovy | 1 - 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/devicetypes/smartthings/ecobee-thermostat.src/ecobee-thermostat.groovy b/devicetypes/smartthings/ecobee-thermostat.src/ecobee-thermostat.groovy index 198fc0a..adf6433 100644 --- a/devicetypes/smartthings/ecobee-thermostat.src/ecobee-thermostat.groovy +++ b/devicetypes/smartthings/ecobee-thermostat.src/ecobee-thermostat.groovy @@ -23,7 +23,6 @@ metadata { capability "Sensor" capability "Refresh" capability "Relative Humidity Measurement" - capability "Health Check" command "generateEvent" command "raiseSetpoint" @@ -39,7 +38,6 @@ metadata { attribute "maxCoolingSetpoint", "number" attribute "minCoolingSetpoint", "number" attribute "deviceTemperatureUnit", "string" - attribute "deviceAlive", "enum", ["true", "false"] } tiles { @@ -122,21 +120,6 @@ metadata { } -void installed() { - // The device refreshes every 5 minutes by default so if we miss 2 refreshes we can consider it offline - // Using 12 minutes because in testing, device health team found that there could be "jitter" - sendEvent(name: "checkInterval", value: 60 * 12, data: [protocol: "cloud", hubHardwareId: device.hub.hardwareID], displayed: false) -} - -// Device Watch will ping the device to proactively determine if the device has gone offline -// If the device was online the last time we refreshed, trigger another refresh as part of the ping. -def ping() { - def isAlive = device.currentValue("deviceAlive") == "true" ? true : false - if (isAlive) { - refresh() - } -} - // parse events into attributes def parse(String description) { log.debug "Parsing '${description}'" @@ -181,11 +164,7 @@ def generateEvent(Map results) { } else if (name=="humidity") { isChange = isStateChange(device, name, value.toString()) event << [value: value.toString(), isStateChange: isChange, displayed: false, unit: "%"] - } else if (name == "deviceAlive") { - isChange = isStateChange(device, name, value.toString()) - event['isStateChange'] = isChange - event['displayed'] = false - } else { + } else { isChange = isStateChange(device, name, value.toString()) isDisplayed = isChange event << [value: value.toString(), isStateChange: isChange, displayed: isDisplayed] diff --git a/smartapps/smartthings/ecobee-connect.src/ecobee-connect.groovy b/smartapps/smartthings/ecobee-connect.src/ecobee-connect.groovy index 9b4c178..d8c2179 100644 --- a/smartapps/smartthings/ecobee-connect.src/ecobee-connect.groovy +++ b/smartapps/smartthings/ecobee-connect.src/ecobee-connect.groovy @@ -842,7 +842,6 @@ private void storeThermostatData(thermostats) { minCoolingSetpoint: (stat.settings.coolRangeLow / 10), maxCoolingSetpoint: (stat.settings.coolRangeHigh / 10), autoMode: stat.settings.autoHeatCoolFeatureEnabled, - deviceAlive: stat.runtime.connected == true ? "true" : "false", auxHeatMode: (stat.settings.hasHeatPump) && (stat.settings.hasForcedAir || stat.settings.hasElectric || stat.settings.hasBoiler), temperature: (stat.runtime.actualTemperature / 10), heatingSetpoint: stat.runtime.desiredHeat / 10,