From d1849653a50b5284c5a1a09a38eafd89e72a5e11 Mon Sep 17 00:00:00 2001 From: desertblade Date: Fri, 11 Dec 2015 09:33:24 -0800 Subject: [PATCH 1/8] Changed Presence naming To see if it will fix the crash on iOS --- nest.devicetype.groovy | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/nest.devicetype.groovy b/nest.devicetype.groovy index a9335ef..7c07f62 100644 --- a/nest.devicetype.groovy +++ b/nest.devicetype.groovy @@ -1,8 +1,9 @@ /** * Nest Direct * - * Author: dianoga7@3dgo.net - * Code: https://github.com/smartthings-users/device-type.nest + * Author: dianoga7@3dgo.net, desertblade@gmail.com + * Original Code: https://github.com/smartthings-users/device-type.nest + * Modified Code: * * INSTALLATION * ========================================= @@ -21,7 +22,7 @@ * Custom Commands: * away * present - * setPresence + * setNestPresence * heatingSetpointUp * heatingSetpointDown * coolingSetpointUp @@ -83,7 +84,7 @@ metadata { command "away" command "present" - command "setPresence" + command "setNestPresence" command "heatingSetpointUp" command "heatingSetpointDown" command "coolingSetpointUp" @@ -153,7 +154,7 @@ metadata { state "default", label:'${currentValue}%', unit:"Humidity" } - standardTile("presence", "device.presence", inactiveLabel: false, decoration: "flat") { + standardTile("nestPresence", "device.nestPresence", inactiveLabel: false, decoration: "flat") { state "present", label:'${name}', action:"away", icon: "st.Home.home2" state "not present", label:'away', action:"present", icon: "st.Transportation.transportation5" } @@ -197,8 +198,8 @@ metadata { // To expose buttons, comment out the first detials line below and uncomment the second details line below. // To expose sliders, uncomment the first details line below and comment out the second details line below. - details(["temperature", "thermostatOperatingState", "humidity", "thermostatMode", "thermostatFanMode", "presence", "heatingSetpoint", "heatSliderControl", "coolingSetpoint", "coolSliderControl", "temperatureUnit", "refresh"]) - // details(["temperature", "thermostatOperatingState", "humidity", "thermostatMode", "thermostatFanMode", "presence", "heatingSetpointDown", "heatingSetpoint", "heatingSetpointUp", "coolingSetpointDown", "coolingSetpoint", "coolingSetpointUp", "temperatureUnit", "refresh"]) + //details(["temperature", "thermostatOperatingState", "humidity", "thermostatMode", "thermostatFanMode", "nestPresence", "heatingSetpoint", "heatSliderControl", "coolingSetpoint", "coolSliderControl", "temperatureUnit", "refresh"]) + details(["temperature", "thermostatOperatingState", "humidity", "thermostatMode", "thermostatFanMode", "nestPresence", "heatingSetpointDown", "heatingSetpoint", "heatingSetpointUp", "coolingSetpointDown", "coolingSetpoint", "coolingSetpointUp", "temperatureUnit", "refresh"]) // ============================================================ @@ -400,18 +401,18 @@ def setThermostatFanMode(mode) { } def away() { - setPresence('away') - sendEvent(name: 'presence', value: 'not present') + setNestPresence('away') + sendEvent(name: 'nestPresence', value: 'not present') } def present() { - setPresence('present') - sendEvent(name: 'presence', value: 'present') + setNestPresence('present') + sendEvent(name: 'nestPresence', value: 'present') } -def setPresence(status) { +def setNestPresence(status) { log.debug "Status: $status" - api('presence', ['away': status == 'away', 'away_timestamp': new Date().getTime(), 'away_setter': 0]) { + api('nestPresence', ['away': status == 'away', 'away_timestamp': new Date().getTime(), 'away_setter': 0]) { poll() } } @@ -480,15 +481,15 @@ def poll() { break; } - switch (device.latestValue('presence')) { + switch (device.latestValue('nestPresence')) { case "present": if (data.structure.away == 'away') { - sendEvent(name: 'presence', value: 'not present') + sendEvent(name: 'nestPresence', value: 'not present') } break; case "not present": if (data.structure.away == 'present') { - sendEvent(name: 'presence', value: 'present') + sendEvent(name: 'nestPresence', value: 'present') } break; } @@ -517,7 +518,7 @@ def api(method, args = [], success = {}) { 'fan_mode': [uri: "/v2/put/device.${settings.serial}", type: 'post'], 'thermostat_mode': [uri: "/v2/put/shared.${settings.serial}", type: 'post'], 'temperature': [uri: "/v2/put/shared.${settings.serial}", type: 'post'], - 'presence': [uri: "/v2/put/structure.${data.structureId}", type: 'post'] + 'nestPresence': [uri: "/v2/put/structure.${data.structureId}", type: 'post'] ] def request = methods.getAt(method) @@ -597,4 +598,4 @@ def cToF(temp) { def fToC(temp) { return ((temp - 32) / 1.8).toDouble() -} \ No newline at end of file +} From a95898528d0fa0d120b94efc0f434e0e4079de2b Mon Sep 17 00:00:00 2001 From: desertblade Date: Fri, 11 Dec 2015 09:35:49 -0800 Subject: [PATCH 2/8] Needed to update link --- nest.devicetype.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nest.devicetype.groovy b/nest.devicetype.groovy index 7c07f62..f8919d7 100644 --- a/nest.devicetype.groovy +++ b/nest.devicetype.groovy @@ -3,7 +3,7 @@ * * Author: dianoga7@3dgo.net, desertblade@gmail.com * Original Code: https://github.com/smartthings-users/device-type.nest - * Modified Code: + * Modified Code: https://github.com/desertblade/device-type.nest * * INSTALLATION * ========================================= From 57a46a2a442a2d418196890b177526fae58f8b1f Mon Sep 17 00:00:00 2001 From: desertblade Date: Fri, 11 Dec 2015 11:00:45 -0800 Subject: [PATCH 3/8] Cleaned up some stuff Removed stuff to make it easier to merge --- nest.devicetype.groovy | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nest.devicetype.groovy b/nest.devicetype.groovy index f8919d7..87835f0 100644 --- a/nest.devicetype.groovy +++ b/nest.devicetype.groovy @@ -1,9 +1,8 @@ /** * Nest Direct * - * Author: dianoga7@3dgo.net, desertblade@gmail.com + * Author: dianoga7@3dgo.net * Original Code: https://github.com/smartthings-users/device-type.nest - * Modified Code: https://github.com/desertblade/device-type.nest * * INSTALLATION * ========================================= From 9d36e29c5fe9eafd2b089750ab037e31a3b1da8b Mon Sep 17 00:00:00 2001 From: desertblade Date: Fri, 11 Dec 2015 11:01:16 -0800 Subject: [PATCH 4/8] Update nest.devicetype.groovy --- nest.devicetype.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nest.devicetype.groovy b/nest.devicetype.groovy index 87835f0..1b8d9ec 100644 --- a/nest.devicetype.groovy +++ b/nest.devicetype.groovy @@ -2,7 +2,7 @@ * Nest Direct * * Author: dianoga7@3dgo.net - * Original Code: https://github.com/smartthings-users/device-type.nest + * Code: https://github.com/smartthings-users/device-type.nest * * INSTALLATION * ========================================= From 7ed8089b642944518f16c2d41b4225396edb42bb Mon Sep 17 00:00:00 2001 From: desertblade Date: Fri, 11 Dec 2015 11:46:26 -0800 Subject: [PATCH 5/8] Adding Humidity --- nest.devicetype.groovy | 81 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 15 deletions(-) diff --git a/nest.devicetype.groovy b/nest.devicetype.groovy index 1b8d9ec..933f111 100644 --- a/nest.devicetype.groovy +++ b/nest.devicetype.groovy @@ -90,8 +90,12 @@ metadata { command "coolingSetpointDown" command "setFahrenheit" command "setCelsius" + command "setHumiditySetpoint" + command "humiditySetpointUp" + command "humiditySetpointDown" attribute "temperatureUnit", "string" + attribute "humiditySetpoint", "number" } simulator { @@ -152,6 +156,10 @@ metadata { valueTile("humidity", "device.humidity", inactiveLabel: false) { state "default", label:'${currentValue}%', unit:"Humidity" } + + valueTile("humiditySetpoint", "humiditySetpoint", inactiveLabel: false) { + state "default", label:'${currentValue}%', unit:"Humidity", backgroundColor:"#308014" + } standardTile("nestPresence", "device.nestPresence", inactiveLabel: false, decoration: "flat") { state "present", label:'${name}', action:"away", icon: "st.Home.home2" @@ -174,6 +182,10 @@ metadata { state "setCoolingSetpoint", label:'Set temperature to', action:"thermostat.setCoolingSetpoint" } + controlTile("humiditySliderControl", "humiditySetpoint", "slider", height: 1, width: 2, inactiveLabel: false) { + state "setHumiditySetpoint", label:'Set humidity to', action:"thermostat.setHumiditySetpoint" + } + standardTile("heatingSetpointUp", "device.heatingSetpoint", canChangeIcon: false, inactiveLabel: false, decoration: "flat") { state "heatingSetpointUp", label:' ', action:"heatingSetpointUp", icon:"st.thermostat.thermostat-up", backgroundColor:"#bc2323" } @@ -189,6 +201,14 @@ metadata { standardTile("coolingSetpointDown", "device.coolingSetpoint", canChangeIcon: false, inactiveLabel: false, decoration: "flat") { state "coolingSetpointDown", label:' ', action:"coolingSetpointDown", icon:"st.thermostat.thermostat-down", backgroundColor:"#1e9cbb" } + + standardTile("humiditySetpointUp", "humiditySetpoint", canChangeIcon: false, inactiveLabel: false, decoration: "flat") { + state "humiditySetpointUp", label:' ', action:"humiditySetpointUp", icon:"st.thermostat.thermostat-up", backgroundColor:"#1e9cbb" + } + + standardTile("humiditySetpointDown", "device.humiditySetpoint", canChangeIcon: false, inactiveLabel: false, decoration: "flat") { + state "humiditySetpointDown", label:' ', action:"humiditySetpointDown", icon:"st.thermostat.thermostat-down", backgroundColor:"#1e9cbb" + } main(["temperature", "thermostatOperatingState", "humidity"]) @@ -197,8 +217,8 @@ metadata { // To expose buttons, comment out the first detials line below and uncomment the second details line below. // To expose sliders, uncomment the first details line below and comment out the second details line below. - //details(["temperature", "thermostatOperatingState", "humidity", "thermostatMode", "thermostatFanMode", "nestPresence", "heatingSetpoint", "heatSliderControl", "coolingSetpoint", "coolSliderControl", "temperatureUnit", "refresh"]) - details(["temperature", "thermostatOperatingState", "humidity", "thermostatMode", "thermostatFanMode", "nestPresence", "heatingSetpointDown", "heatingSetpoint", "heatingSetpointUp", "coolingSetpointDown", "coolingSetpoint", "coolingSetpointUp", "temperatureUnit", "refresh"]) + //details(["temperature", "thermostatOperatingState", "humidity", "thermostatMode", "thermostatFanMode", "nestPresence", "heatingSetpoint", "heatSliderControl", "coolingSetpoint", "coolSliderControl", "humiditySetpoint", "humiditySliderControl", "temperatureUnit", "refresh"]) + details(["temperature", "thermostatOperatingState", "humidity", "thermostatMode", "thermostatFanMode", "nestPpresence", "heatingSetpointDown", "heatingSetpoint", "heatingSetpointUp", "coolingSetpointDown", "coolingSetpoint", "coolingSetpointUp", "humiditySetpointDown", "humiditySetpoint", "humiditySetpointUp", "temperatureUnit","refresh"]) // ============================================================ @@ -206,6 +226,13 @@ metadata { } +// update preferences +def updated() { + log.debug "Updated" + // reset the authentication + data.auth = null +} + // parse events into attributes def parse(String description) { @@ -215,7 +242,7 @@ def parse(String description) { def setHeatingSetpoint(temp) { def latestThermostatMode = device.latestState('thermostatMode') def temperatureUnit = device.latestValue('temperatureUnit') - + switch (temperatureUnit) { case "celsius": if (temp) { @@ -274,7 +301,7 @@ def coolingSetpointDown(){ def setCoolingSetpoint(temp) { def latestThermostatMode = device.latestState('thermostatMode') def temperatureUnit = device.latestValue('temperatureUnit') - + switch (temperatureUnit) { case "celsius": if (temp) { @@ -344,6 +371,27 @@ def setCelsius() { poll() } +def humiditySetpointUp(){ + int newSetpoint = device.latestValue("humiditySetpoint") + 1 + log.debug "Setting humidity set point up to: ${newSetpoint}" + setHumiditySetpoint(newSetpoint) +} + +def humiditySetpointDown(){ + int newSetpoint = device.latestValue('humiditySetpoint') - 1 + log.debug "Setting humidity set point down to: ${newSetpoint}" + setHumiditySetpoint(newSetpoint) +} + +def setHumiditySetpoint(humiditySP) { + if (humiditySP > 0) { + api('humidity', ['target_humidity': humiditySP]) { + sendEvent(name: 'humiditySetpoint', value: humiditySetpoint, unit: Humidity) + } + } + poll() +} + def off() { setThermostatMode('off') } @@ -427,17 +475,19 @@ def poll() { data.device.fan_mode = data.device.fan_mode == 'duty-cycle'? 'circulate' : data.device.fan_mode data.structure.away = data.structure.away ? 'away' : 'present' - log.debug(data.shared) - + log.debug("data.shared: " + data.shared) + def humidity = data.device.current_humidity + def humiditySetpoint = Math.round(data.device.target_humidity) def temperatureType = data.shared.target_temperature_type def fanMode = data.device.fan_mode - def heatingSetpoint = '--' - def coolingSetpoint = '--' + def heatingSetpoint = 0 + def coolingSetpoint = 0 temperatureType = temperatureType == 'range' ? 'auto' : temperatureType sendEvent(name: 'humidity', value: humidity) + sendEvent(name: 'humiditySetpoint', value: humiditySetpoint, unit: Humidity) sendEvent(name: 'thermostatFanMode', value: fanMode) sendEvent(name: 'thermostatMode', value: temperatureType) @@ -447,7 +497,7 @@ def poll() { case "celsius": def temperature = Math.round(data.shared.current_temperature) def targetTemperature = Math.round(data.shared.target_temperature) - + if (temperatureType == "cool") { coolingSetpoint = targetTemperature } else if (temperatureType == "heat") { @@ -463,8 +513,8 @@ def poll() { break; default: def temperature = Math.round(cToF(data.shared.current_temperature)) - def targetTemperature = Math.round(cToF(data.shared.target_temperature)) - + def targetTemperature = Math.round(cToF(data.shared.target_temperature)) + if (temperatureType == "cool") { coolingSetpoint = targetTemperature } else if (temperatureType == "heat") { @@ -480,15 +530,15 @@ def poll() { break; } - switch (device.latestValue('nestPresence')) { + switch (device.latestValue('presence')) { case "present": if (data.structure.away == 'away') { - sendEvent(name: 'nestPresence', value: 'not present') + sendEvent(name: 'presence', value: 'not present') } break; case "not present": if (data.structure.away == 'present') { - sendEvent(name: 'nestPresence', value: 'present') + sendEvent(name: 'presence', value: 'present') } break; } @@ -517,7 +567,8 @@ def api(method, args = [], success = {}) { 'fan_mode': [uri: "/v2/put/device.${settings.serial}", type: 'post'], 'thermostat_mode': [uri: "/v2/put/shared.${settings.serial}", type: 'post'], 'temperature': [uri: "/v2/put/shared.${settings.serial}", type: 'post'], - 'nestPresence': [uri: "/v2/put/structure.${data.structureId}", type: 'post'] + 'nestPresence': [uri: "/v2/put/structure.${data.structureId}", type: 'post'], + 'humidity': [uri: "/v2/put/device.${settings.serial}", type: 'post'], ] def request = methods.getAt(method) From 801377f91bd8fed1f9554d966bebfbb1fed7cbdf Mon Sep 17 00:00:00 2001 From: desertblade Date: Fri, 11 Dec 2015 19:36:52 -0800 Subject: [PATCH 6/8] Removing Humidity Have a separate branch for that --- nest.devicetype.groovy | 81 ++++++++---------------------------------- 1 file changed, 15 insertions(+), 66 deletions(-) diff --git a/nest.devicetype.groovy b/nest.devicetype.groovy index 933f111..1b8d9ec 100644 --- a/nest.devicetype.groovy +++ b/nest.devicetype.groovy @@ -90,12 +90,8 @@ metadata { command "coolingSetpointDown" command "setFahrenheit" command "setCelsius" - command "setHumiditySetpoint" - command "humiditySetpointUp" - command "humiditySetpointDown" attribute "temperatureUnit", "string" - attribute "humiditySetpoint", "number" } simulator { @@ -156,10 +152,6 @@ metadata { valueTile("humidity", "device.humidity", inactiveLabel: false) { state "default", label:'${currentValue}%', unit:"Humidity" } - - valueTile("humiditySetpoint", "humiditySetpoint", inactiveLabel: false) { - state "default", label:'${currentValue}%', unit:"Humidity", backgroundColor:"#308014" - } standardTile("nestPresence", "device.nestPresence", inactiveLabel: false, decoration: "flat") { state "present", label:'${name}', action:"away", icon: "st.Home.home2" @@ -182,10 +174,6 @@ metadata { state "setCoolingSetpoint", label:'Set temperature to', action:"thermostat.setCoolingSetpoint" } - controlTile("humiditySliderControl", "humiditySetpoint", "slider", height: 1, width: 2, inactiveLabel: false) { - state "setHumiditySetpoint", label:'Set humidity to', action:"thermostat.setHumiditySetpoint" - } - standardTile("heatingSetpointUp", "device.heatingSetpoint", canChangeIcon: false, inactiveLabel: false, decoration: "flat") { state "heatingSetpointUp", label:' ', action:"heatingSetpointUp", icon:"st.thermostat.thermostat-up", backgroundColor:"#bc2323" } @@ -201,14 +189,6 @@ metadata { standardTile("coolingSetpointDown", "device.coolingSetpoint", canChangeIcon: false, inactiveLabel: false, decoration: "flat") { state "coolingSetpointDown", label:' ', action:"coolingSetpointDown", icon:"st.thermostat.thermostat-down", backgroundColor:"#1e9cbb" } - - standardTile("humiditySetpointUp", "humiditySetpoint", canChangeIcon: false, inactiveLabel: false, decoration: "flat") { - state "humiditySetpointUp", label:' ', action:"humiditySetpointUp", icon:"st.thermostat.thermostat-up", backgroundColor:"#1e9cbb" - } - - standardTile("humiditySetpointDown", "device.humiditySetpoint", canChangeIcon: false, inactiveLabel: false, decoration: "flat") { - state "humiditySetpointDown", label:' ', action:"humiditySetpointDown", icon:"st.thermostat.thermostat-down", backgroundColor:"#1e9cbb" - } main(["temperature", "thermostatOperatingState", "humidity"]) @@ -217,8 +197,8 @@ metadata { // To expose buttons, comment out the first detials line below and uncomment the second details line below. // To expose sliders, uncomment the first details line below and comment out the second details line below. - //details(["temperature", "thermostatOperatingState", "humidity", "thermostatMode", "thermostatFanMode", "nestPresence", "heatingSetpoint", "heatSliderControl", "coolingSetpoint", "coolSliderControl", "humiditySetpoint", "humiditySliderControl", "temperatureUnit", "refresh"]) - details(["temperature", "thermostatOperatingState", "humidity", "thermostatMode", "thermostatFanMode", "nestPpresence", "heatingSetpointDown", "heatingSetpoint", "heatingSetpointUp", "coolingSetpointDown", "coolingSetpoint", "coolingSetpointUp", "humiditySetpointDown", "humiditySetpoint", "humiditySetpointUp", "temperatureUnit","refresh"]) + //details(["temperature", "thermostatOperatingState", "humidity", "thermostatMode", "thermostatFanMode", "nestPresence", "heatingSetpoint", "heatSliderControl", "coolingSetpoint", "coolSliderControl", "temperatureUnit", "refresh"]) + details(["temperature", "thermostatOperatingState", "humidity", "thermostatMode", "thermostatFanMode", "nestPresence", "heatingSetpointDown", "heatingSetpoint", "heatingSetpointUp", "coolingSetpointDown", "coolingSetpoint", "coolingSetpointUp", "temperatureUnit", "refresh"]) // ============================================================ @@ -226,13 +206,6 @@ metadata { } -// update preferences -def updated() { - log.debug "Updated" - // reset the authentication - data.auth = null -} - // parse events into attributes def parse(String description) { @@ -242,7 +215,7 @@ def parse(String description) { def setHeatingSetpoint(temp) { def latestThermostatMode = device.latestState('thermostatMode') def temperatureUnit = device.latestValue('temperatureUnit') - + switch (temperatureUnit) { case "celsius": if (temp) { @@ -301,7 +274,7 @@ def coolingSetpointDown(){ def setCoolingSetpoint(temp) { def latestThermostatMode = device.latestState('thermostatMode') def temperatureUnit = device.latestValue('temperatureUnit') - + switch (temperatureUnit) { case "celsius": if (temp) { @@ -371,27 +344,6 @@ def setCelsius() { poll() } -def humiditySetpointUp(){ - int newSetpoint = device.latestValue("humiditySetpoint") + 1 - log.debug "Setting humidity set point up to: ${newSetpoint}" - setHumiditySetpoint(newSetpoint) -} - -def humiditySetpointDown(){ - int newSetpoint = device.latestValue('humiditySetpoint') - 1 - log.debug "Setting humidity set point down to: ${newSetpoint}" - setHumiditySetpoint(newSetpoint) -} - -def setHumiditySetpoint(humiditySP) { - if (humiditySP > 0) { - api('humidity', ['target_humidity': humiditySP]) { - sendEvent(name: 'humiditySetpoint', value: humiditySetpoint, unit: Humidity) - } - } - poll() -} - def off() { setThermostatMode('off') } @@ -475,19 +427,17 @@ def poll() { data.device.fan_mode = data.device.fan_mode == 'duty-cycle'? 'circulate' : data.device.fan_mode data.structure.away = data.structure.away ? 'away' : 'present' - log.debug("data.shared: " + data.shared) - + log.debug(data.shared) + def humidity = data.device.current_humidity - def humiditySetpoint = Math.round(data.device.target_humidity) def temperatureType = data.shared.target_temperature_type def fanMode = data.device.fan_mode - def heatingSetpoint = 0 - def coolingSetpoint = 0 + def heatingSetpoint = '--' + def coolingSetpoint = '--' temperatureType = temperatureType == 'range' ? 'auto' : temperatureType sendEvent(name: 'humidity', value: humidity) - sendEvent(name: 'humiditySetpoint', value: humiditySetpoint, unit: Humidity) sendEvent(name: 'thermostatFanMode', value: fanMode) sendEvent(name: 'thermostatMode', value: temperatureType) @@ -497,7 +447,7 @@ def poll() { case "celsius": def temperature = Math.round(data.shared.current_temperature) def targetTemperature = Math.round(data.shared.target_temperature) - + if (temperatureType == "cool") { coolingSetpoint = targetTemperature } else if (temperatureType == "heat") { @@ -513,8 +463,8 @@ def poll() { break; default: def temperature = Math.round(cToF(data.shared.current_temperature)) - def targetTemperature = Math.round(cToF(data.shared.target_temperature)) - + def targetTemperature = Math.round(cToF(data.shared.target_temperature)) + if (temperatureType == "cool") { coolingSetpoint = targetTemperature } else if (temperatureType == "heat") { @@ -530,15 +480,15 @@ def poll() { break; } - switch (device.latestValue('presence')) { + switch (device.latestValue('nestPresence')) { case "present": if (data.structure.away == 'away') { - sendEvent(name: 'presence', value: 'not present') + sendEvent(name: 'nestPresence', value: 'not present') } break; case "not present": if (data.structure.away == 'present') { - sendEvent(name: 'presence', value: 'present') + sendEvent(name: 'nestPresence', value: 'present') } break; } @@ -567,8 +517,7 @@ def api(method, args = [], success = {}) { 'fan_mode': [uri: "/v2/put/device.${settings.serial}", type: 'post'], 'thermostat_mode': [uri: "/v2/put/shared.${settings.serial}", type: 'post'], 'temperature': [uri: "/v2/put/shared.${settings.serial}", type: 'post'], - 'nestPresence': [uri: "/v2/put/structure.${data.structureId}", type: 'post'], - 'humidity': [uri: "/v2/put/device.${settings.serial}", type: 'post'], + 'nestPresence': [uri: "/v2/put/structure.${data.structureId}", type: 'post'] ] def request = methods.getAt(method) From 7655ae6320f8ab56575a8e7d3edea601d8d7414d Mon Sep 17 00:00:00 2001 From: desertblade Date: Fri, 22 Jan 2016 10:12:05 -0800 Subject: [PATCH 7/8] Removing that Nest is a Presenece Sensor --- nest.devicetype.groovy | 1 - 1 file changed, 1 deletion(-) diff --git a/nest.devicetype.groovy b/nest.devicetype.groovy index 1b8d9ec..6da11f9 100644 --- a/nest.devicetype.groovy +++ b/nest.devicetype.groovy @@ -78,7 +78,6 @@ metadata { capability "Relative Humidity Measurement" capability "Thermostat" capability "Temperature Measurement" - capability "Presence Sensor" capability "Sensor" command "away" From f67e9d0f2a743472b7c7f3ce0433fa99ae45ba58 Mon Sep 17 00:00:00 2001 From: desertblade Date: Fri, 18 Mar 2016 09:36:43 -0700 Subject: [PATCH 8/8] Update README.md --- README.md | 50 ++------------------------------------------------ 1 file changed, 2 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index 0f52629..b39187d 100644 --- a/README.md +++ b/README.md @@ -1,51 +1,5 @@ # Nest Device Type -http://build.smartthings.com/projects/smartnest/ +Please use the updated SmartApp found here: -Now SmartThings can talk to your Nest thermostat. +https://github.com/tonesto7/nest-manager -Note: this is technically against the Nest TOS. So use at your own risk. - -## Installation - -1. Create a new device type (https://graph.api.smartthings.com/ide/devices) - * Name: Nest - * Author: dianoga7@3dgo.net - * Namespace: smartthings-users - * Capabilities: - * Polling - * Relative Humidity Measurement - * Thermostat - * Temperature Measurement - * Presence Sensor - * Sensor - * Custom Attributes: - * temperatureUnit - * Custom Commands: - * away - * present - * setPresence - * heatingSetpointUp - * heatingSetpointDown - * coolingSetpointUp - * coolingSetpointDown - * setFahrenheit - * setCelsius - -1. Publish the device type (next to Save button) > For Me - -1. If you want to switch from slider controls to buttons, comment out the slider details line and uncomment the button details line. - -1. Create a new device (https://graph.api.smartthings.com/device/list) - * Name: Your Choice - * Device Network Id: Your Choice - * Type: Nest (should be the last option) - * Location: Choose the correct location - * Hub/Group: Leave blank - -1. Update device preferences - * Click on the new device to see the details. - * Click the edit button next to Preferences - * Fill in your information. - * To find your serial number, login to http://home.nest.com. Click on the thermostat you want to control. Under settings, go to Technical Info. Your serial number is the second item. - -1. That's it, you're done.