diff --git a/devicetypes/keen-home/keen-home-smart-vent.src/keen-home-smart-vent.groovy b/devicetypes/keen-home/keen-home-smart-vent.src/keen-home-smart-vent.groovy index 232378a..9f64b2c 100644 --- a/devicetypes/keen-home/keen-home-smart-vent.src/keen-home-smart-vent.groovy +++ b/devicetypes/keen-home/keen-home-smart-vent.src/keen-home-smart-vent.groovy @@ -274,6 +274,7 @@ private Map makeTemperatureResult(value) { name: 'temperature', value: "" + value, descriptionText: "${linkText} is ${value}°${temperatureScale}", + unit: temperatureScale ] } diff --git a/devicetypes/plaidsystems/spruce-sensor.src/spruce-sensor.groovy b/devicetypes/plaidsystems/spruce-sensor.src/spruce-sensor.groovy index 944ca52..77a5698 100644 --- a/devicetypes/plaidsystems/spruce-sensor.src/spruce-sensor.groovy +++ b/devicetypes/plaidsystems/spruce-sensor.src/spruce-sensor.groovy @@ -254,7 +254,8 @@ private Map getTemperatureResult(value) { return [ name: 'temperature', value: value, - descriptionText: descriptionText + descriptionText: descriptionText, + unit: temperatureScale ] } diff --git a/devicetypes/smartthings/bose-soundtouch.src/bose-soundtouch.groovy b/devicetypes/smartthings/bose-soundtouch.src/bose-soundtouch.groovy index 2d60bf8..38d624c 100644 --- a/devicetypes/smartthings/bose-soundtouch.src/bose-soundtouch.groovy +++ b/devicetypes/smartthings/bose-soundtouch.src/bose-soundtouch.groovy @@ -47,6 +47,9 @@ metadata { command "everywhereJoin" command "everywhereLeave" + + command "forceOff" + command "forceOn" } /** @@ -64,9 +67,9 @@ metadata { } standardTile("switch", "device.switch", width: 1, height: 1, canChangeIcon: true) { - state "on", label: '${name}', action: "switch.off", icon: "st.Electronics.electronics16", backgroundColor: "#79b821", nextState:"turningOff" + state "on", label: '${name}', action: "forceOff", icon: "st.Electronics.electronics16", backgroundColor: "#79b821", nextState:"turningOff" state "turningOff", label:'TURNING OFF', icon:"st.Electronics.electronics16", backgroundColor:"#ffffff" - state "off", label: '${name}', action: "switch.on", icon: "st.Electronics.electronics16", backgroundColor: "#ffffff", nextState:"turningOn" + state "off", label: '${name}', action: "forceOn", icon: "st.Electronics.electronics16", backgroundColor: "#ffffff", nextState:"turningOn" state "turningOn", label:'TURNING ON', icon:"st.Electronics.electronics16", backgroundColor:"#79b821" } valueTile("1", "device.station1", decoration: "flat", canChangeIcon: false) { @@ -140,8 +143,22 @@ metadata { * one place. * */ -def off() { onAction("off") } -def on() { onAction("on") } +def off() { + if (device.currentState("switch")?.value == "on") { + onAction("off") + } +} +def forceOff() { + onAction("off") +} +def on() { + if (device.currentState("switch")?.value == "off") { + onAction("on") + } +} +def forceOn() { + onAction("on") +} def volup() { onAction("volup") } def voldown() { onAction("voldown") } def preset1() { onAction("1") } @@ -240,11 +257,11 @@ def onAction(String user, data=null) { def actions = null switch (user) { case "on": - actions = boseSetPowerState(true) + boseSetPowerState(true) break case "off": boseSetNowPlaying(null, "STANDBY") - actions = boseSetPowerState(false) + boseSetPowerState(false) break case "volume": actions = boseSetVolume(data) diff --git a/devicetypes/smartthings/centralite-thermostat.src/centralite-thermostat.groovy b/devicetypes/smartthings/centralite-thermostat.src/centralite-thermostat.groovy index b6c69a4..a92839f 100644 --- a/devicetypes/smartthings/centralite-thermostat.src/centralite-thermostat.groovy +++ b/devicetypes/smartthings/centralite-thermostat.src/centralite-thermostat.groovy @@ -89,14 +89,17 @@ def parse(String description) { log.debug "TEMP" map.name = "temperature" map.value = getTemperature(descMap.value) + map.unit = temperatureScale } else if (descMap.cluster == "0201" && descMap.attrId == "0011") { log.debug "COOLING SETPOINT" map.name = "coolingSetpoint" map.value = getTemperature(descMap.value) + map.unit = temperatureScale } else if (descMap.cluster == "0201" && descMap.attrId == "0012") { log.debug "HEATING SETPOINT" map.name = "heatingSetpoint" map.value = getTemperature(descMap.value) + map.unit = temperatureScale } else if (descMap.cluster == "0201" && descMap.attrId == "001c") { log.debug "MODE" map.name = "thermostatMode" @@ -169,7 +172,7 @@ def setHeatingSetpoint(degrees) { def degreesInteger = Math.round(degrees) log.debug "setHeatingSetpoint({$degreesInteger} ${temperatureScale})" - sendEvent("name": "heatingSetpoint", "value": degreesInteger) + sendEvent("name": "heatingSetpoint", "value": degreesInteger, "unit": temperatureScale) def celsius = (getTemperatureScale() == "C") ? degreesInteger : (fahrenheitToCelsius(degreesInteger) as Double).round(2) "st wattr 0x${device.deviceNetworkId} 1 0x201 0x12 0x29 {" + hex(celsius * 100) + "}" @@ -180,7 +183,7 @@ def setCoolingSetpoint(degrees) { if (degrees != null) { def degreesInteger = Math.round(degrees) log.debug "setCoolingSetpoint({$degreesInteger} ${temperatureScale})" - sendEvent("name": "coolingSetpoint", "value": degreesInteger) + sendEvent("name": "coolingSetpoint", "value": degreesInteger, "unit": temperatureScale) def celsius = (getTemperatureScale() == "C") ? degreesInteger : (fahrenheitToCelsius(degreesInteger) as Double).round(2) "st wattr 0x${device.deviceNetworkId} 1 0x201 0x11 0x29 {" + hex(celsius * 100) + "}" } diff --git a/devicetypes/smartthings/cree-bulb.src/.st-ignore b/devicetypes/smartthings/cree-bulb.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/cree-bulb.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/cree-bulb.src/README.md b/devicetypes/smartthings/cree-bulb.src/README.md new file mode 100644 index 0000000..2b8093c --- /dev/null +++ b/devicetypes/smartthings/cree-bulb.src/README.md @@ -0,0 +1,36 @@ +# Connected Cree LED Bulb + + + +Works with: + +* [Connected Cree LED Bulb](https://support.smartthings.com/hc/en-us/articles/204258280-Cree-Connected-LED-Bulb) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) + +## Capabilities + +* **Actuator** - represents that a Device has commands +* **Configuration** - _configure()_ command called when device is installed or device preferences updated +* **Polling** - represents that poll() can be implemented for the device +* **Refresh** - _refresh()_ command for status updates +* **Switch** - can detect state (possible values: on/off) +* **Switch Level** - represents current light level, usually 0-100 in percent +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +A Category C6 Connected Cree LED Bulb with maxReportTime of 10 min. +Check-in interval is double the value of maxReportTime for Zigbee device. +This gives the device twice the amount of time to respond before it is marked as offline. +Check-in interval = 2*10 = 20 min + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the device is out of range. +Pairing needs to be tried again by placing the device closer to the hub. +Instructions related to pairing, resetting and removing the device from SmartThings can be found in the following link: +* [Cree Connected LED Bulb Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/204258280-Cree-Connected-LED-Bulb) \ No newline at end of file diff --git a/devicetypes/smartthings/fidure-thermostat.src/fidure-thermostat.groovy b/devicetypes/smartthings/fidure-thermostat.src/fidure-thermostat.groovy index 6de1a36..a731447 100644 --- a/devicetypes/smartthings/fidure-thermostat.src/fidure-thermostat.groovy +++ b/devicetypes/smartthings/fidure-thermostat.src/fidure-thermostat.groovy @@ -682,7 +682,7 @@ def setHeatingSetpoint(degrees) { def temperatureScale = getTemperatureScale() def degreesInteger = degrees as Integer - sendEvent("name":"heatingSetpoint", "value":degreesInteger) + sendEvent("name":"heatingSetpoint", "value":degreesInteger, "unit":temperatureScale) def celsius = (getTemperatureScale() == "C") ? degreesInteger : (fahrenheitToCelsius(degreesInteger) as Double).round(2) "st wattr 0x${device.deviceNetworkId} 1 0x201 0x12 0x29 {" + hex(celsius*100) + "}" @@ -691,7 +691,7 @@ def setHeatingSetpoint(degrees) { def setCoolingSetpoint(degrees) { def degreesInteger = degrees as Integer - sendEvent("name":"coolingSetpoint", "value":degreesInteger) + sendEvent("name":"coolingSetpoint", "value":degreesInteger, "unit":temperatureScale) def celsius = (getTemperatureScale() == "C") ? degreesInteger : (fahrenheitToCelsius(degreesInteger) as Double).round(2) "st wattr 0x${device.deviceNetworkId} 1 0x201 0x11 0x29 {" + hex(celsius*100) + "}" diff --git a/devicetypes/smartthings/hue-bridge.src/hue-bridge.groovy b/devicetypes/smartthings/hue-bridge.src/hue-bridge.groovy index 0986ae8..18e9a25 100644 --- a/devicetypes/smartthings/hue-bridge.src/hue-bridge.groovy +++ b/devicetypes/smartthings/hue-bridge.src/hue-bridge.groovy @@ -62,7 +62,7 @@ def parse(description) { log.trace "HUE BRIDGE, GENERATING EVENT: $map.name: $map.value" results << createEvent(name: "${map.name}", value: "${map.value}") } else { - log.trace "Parsing description" + log.trace "Parsing description" def msg = parseLanMessage(description) if (msg.body) { def contentType = msg.headers["Content-Type"] @@ -72,13 +72,13 @@ def parse(description) { log.info "Bridge response: $msg.body" } else { // Sending Bulbs List to parent" - if (parent.state.inBulbDiscovery) - log.info parent.bulbListHandler(device.hub.id, msg.body) + if (parent.isInBulbDiscovery()) + log.info parent.bulbListHandler(device.hub.id, msg.body) } } else if (contentType?.contains("xml")) { log.debug "HUE BRIDGE ALREADY PRESENT" - parent.hubVerification(device.hub.id, msg.body) + parent.hubVerification(device.hub.id, msg.body) } } } diff --git a/devicetypes/smartthings/smartpower-outlet.src/.st-ignore b/devicetypes/smartthings/smartpower-outlet.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/smartpower-outlet.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/smartpower-outlet.src/README.md b/devicetypes/smartthings/smartpower-outlet.src/README.md new file mode 100644 index 0000000..4dda7bf --- /dev/null +++ b/devicetypes/smartthings/smartpower-outlet.src/README.md @@ -0,0 +1,38 @@ +# SmartPower Outlet + + + +Works with: + +* [Samsung SmartPower Outlet](https://shop.smartthings.com/#!/products/smartpower-outlet) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) + +## Capabilities + +* **Configuration** - _configure()_ command called when device is installed or device preferences updated +* **Actuator** - represents that a Device has commands +* **Switch** - can detect state (possible values: on/off) +* **Refresh** - _refresh()_ command for status updates +* **Power Meter** - detects power meter for device in either w or kw. +* **Health Check** - indicates ability to get device health notifications +* **Sensor** - detects sensor events + +## Device Health + +A Category C1 smart power outlet with maxReportTime of 10 min. +Check-in interval is double the value of maxReportTime for Zigbee device. +This gives the device twice the amount of time to respond before it is marked as offline. +Check-in interval = 2*10 = 20 min + +## Troubleshooting + +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the device is out of range. +Pairing needs to be tried again by placing the device closer to the hub. +Instructions related to pairing, resetting and removing the device from SmartThings can be found in the following links +for the different models: +* [SmartPower Outlet Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/201084854-SmartPower-Outlet) +* [Samsung SmartThings Outlet Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/205957620) \ No newline at end of file diff --git a/devicetypes/smartthings/smartsense-moisture-sensor.src/.st-ignore b/devicetypes/smartthings/smartsense-moisture-sensor.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/smartsense-moisture-sensor.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/smartsense-moisture-sensor.src/README.md b/devicetypes/smartthings/smartsense-moisture-sensor.src/README.md new file mode 100644 index 0000000..c346957 --- /dev/null +++ b/devicetypes/smartthings/smartsense-moisture-sensor.src/README.md @@ -0,0 +1,44 @@ +# Smartsense Moisture Sensor + + + +Works with: + +* [Samsung SmartThings Moisture Sensor](https://shop.smartthings.com/#!/products/samsung-smartthings-water-leak-sensor) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Battery](#battery-specification) + +## Capabilities + +* **Configuration** - _configure()_ command called when device is installed or device preferences updated +* **Battery** - defines device uses a battery +* **Refresh** - _refresh()_ command for status updates +* **Temperature Measurement** - defines device measures current temperature +* **Water Sensor** - can detect presence of water (dry or wet) +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +A Category C2 moisture sensor with maxReportTime of 1 hr. +Check-in interval is double the value of maxReportTime for Zigbee device. +This gives the device twice the amount of time to respond before it is marked as offline. +Check-in interval = 2*60 = 120 min + +## Battery Specification + +One CR2 3V battery required. + +## Troubleshooting + +If the sensor doesn't pair when trying from the SmartThings mobile app, it is possible that the sensor is out of range. +Pairing needs to be tried again by placing the sensor closer to the hub. +Instructions related to pairing, resetting and removing the different sensors from SmartThings can be found in the following links +for the different models: +* [SmartSense Moisture Sensor Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/202847044-SmartSense-Moisture-Sensor) +* [Samsung SmartThings Water Leak Sensor Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/205957630) +Other troubleshooting tips are listed as follows: +* [Troubleshooting: Samsung SmartThings Water Leak Sensor won’t pair after removing pull-tab](https://support.smartthings.com/hc/en-us/articles/204966616-Troubleshooting-Samsung-SmartThings-device-won-t-pair-after-removing-pull-tab) diff --git a/devicetypes/smartthings/smartsense-moisture-sensor.src/smartsense-moisture-sensor.groovy b/devicetypes/smartthings/smartsense-moisture-sensor.src/smartsense-moisture-sensor.groovy index 7de68d1..2c859da 100644 --- a/devicetypes/smartthings/smartsense-moisture-sensor.src/smartsense-moisture-sensor.groovy +++ b/devicetypes/smartthings/smartsense-moisture-sensor.src/smartsense-moisture-sensor.groovy @@ -259,7 +259,8 @@ private Map getTemperatureResult(value) { name: 'temperature', value: value, descriptionText: descriptionText, - translatable: true + translatable: true, + unit: temperatureScale ] } diff --git a/devicetypes/smartthings/smartsense-motion-sensor.src/README.md b/devicetypes/smartthings/smartsense-motion-sensor.src/README.md index 82bff3f..d177cc6 100644 --- a/devicetypes/smartthings/smartsense-motion-sensor.src/README.md +++ b/devicetypes/smartthings/smartsense-motion-sensor.src/README.md @@ -9,7 +9,8 @@ Works with: ## Table of contents * [Capabilities](#capabilities) -* [Health]($health) +* [Health](#device-health) +* [Battery](#battery-specification) ## Capabilities @@ -21,10 +22,24 @@ Works with: ## Device Health -A Category C2 motion sensor that has 120min check-in interval - - +A Category C2 motion sensor with maxReportTime of 1 hr. +Check-in interval is double the value of maxReportTime for Zigbee device. +This gives the device twice the amount of time to respond before it is marked as offline. +Check-in interval = 2*60 = 120 min +## Battery Specification +One CR2477 (for Samsung SmartThings Motion Sensor) / CR123A (SmartSense Motion Sensor) 3V battery is required. +## Troubleshooting +If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the sensor is out of range. +Pairing needs to be tried again by placing the sensor closer to the hub. +Instructions related to pairing, resetting and removing the different motion sensors from SmartThings can be found in the following links +for the different models: +* [SmartSense Motion Sensor (original model) Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/200903280-SmartSense-Motion-Sensor-original-model-) +* [SmartSense Motion Sensor (2014 model) Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/203077520-SmartSense-Motion-Sensor-2014-model-) +* [Samsung SmartThings Motion Sensor (2015 model) Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/205957580-Samsung-SmartThings-Motion-Sensor-2015-model-) +Other troubleshooting tips are listed as follows: +* [Troubleshooting: Samsung SmartThings Motion Sensor is stuck showing "Motion Detected" or "No Motion"](https://support.smartthings.com/hc/en-us/articles/200961130-Troubleshooting-Samsung-SmartThings-Motion-Sensor-is-stuck-showing-Motion-Detected-or-No-Motion-) +* [Troubleshooting: Samsung SmartThings Motion Sensor won’t pair after removing pull-tab](https://support.smartthings.com/hc/en-us/articles/204966616-Troubleshooting-Samsung-SmartThings-device-won-t-pair-after-removing-pull-tab) diff --git a/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy b/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy index bb9acb7..2a6751e 100644 --- a/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy +++ b/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy @@ -274,7 +274,8 @@ private Map getTemperatureResult(value) { name: 'temperature', value: value, descriptionText: descriptionText, - translatable: true + translatable: true, + unit: temperatureScale ] } diff --git a/devicetypes/smartthings/smartsense-motion-temp-sensor.src/smartsense-motion-temp-sensor.groovy b/devicetypes/smartthings/smartsense-motion-temp-sensor.src/smartsense-motion-temp-sensor.groovy index b05e9e7..65ce83a 100644 --- a/devicetypes/smartthings/smartsense-motion-temp-sensor.src/smartsense-motion-temp-sensor.groovy +++ b/devicetypes/smartthings/smartsense-motion-temp-sensor.src/smartsense-motion-temp-sensor.groovy @@ -226,7 +226,8 @@ private Map getTemperatureResult(value) { return [ name: 'temperature', value: value, - descriptionText: descriptionText + descriptionText: descriptionText, + unit: temperatureScale ] } diff --git a/devicetypes/smartthings/smartsense-multi-sensor.src/.st-ignore b/devicetypes/smartthings/smartsense-multi-sensor.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/smartsense-multi-sensor.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/smartsense-multi-sensor.src/README.md b/devicetypes/smartthings/smartsense-multi-sensor.src/README.md new file mode 100644 index 0000000..809a192 --- /dev/null +++ b/devicetypes/smartthings/smartsense-multi-sensor.src/README.md @@ -0,0 +1,45 @@ +# Smartsense Multi Sensor + + + +Works with: + +* [Samsung SmartThings Multi Sensor](https://shop.smartthings.com/#!/products/smartsense-multi) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Battery](#battery-specification) + +## Capabilities + +* **Three Axis** - monitors the state of a single axis +* **Configuration** - _configure()_ command called when device is installed or device preferences updated +* **Battery** - defines device uses a battery +* **Sensor** - detects sensor events +* **Contact Sensor** - can detect contact (possible values: open,closed) +* **Acceleration Sensor** - allows for acceleration detection. +* **Refresh** - _refresh()_ command for status updates +* **Temperature Measurement** - defines device measures current temperature +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +A Category C2 multi sensor with maxReportTime of 1 hr. +Check-in interval is double the value of maxReportTime for Zigbee device. +This gives the device twice the amount of time to respond before it is marked as offline. +Check-in interval = 2*60 = 120 min + +## Battery Specification + +One CR2450 (for Samsung SmartThings Multipurpose Sensor) battery / Two AAAA (for SmartSense Multi Sensor) batteries required. + +## Troubleshooting + +If the sensor doesn't pair when trying from the SmartThings mobile app, it is possible that the sensor is out of range. +Pairing needs to be tried again by placing the sensor closer to the hub. +Other troubleshooting tips are listed as follows: +* [Troubleshooting: Samsung SmartThings Multipurpose Sensor is stuck on "open" or "closed"](https://support.smartthings.com/hc/en-us/articles/200955940-Troubleshooting-Samsung-SmartThings-Multipurpose-Sensor-is-stuck-on-open-or-closed-) +* [Troubleshooting: Temperature reading for the Samsung SmartThings Multipurpose Sensor is off](https://support.smartthings.com/hc/en-us/articles/200756845-Troubleshooting-Temperature-reading-for-the-Samsung-SmartThings-Multipurpose-Sensor-is-off) +* [Troubleshooting: Samsung SmartThings Multipurpose Sensor won’t pair after removing pull-tab](https://support.smartthings.com/hc/en-us/articles/204966616-Troubleshooting-Samsung-SmartThings-device-won-t-pair-after-removing-pull-tab) \ No newline at end of file diff --git a/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy b/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy index ad3c60d..735312b 100644 --- a/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy +++ b/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy @@ -333,10 +333,11 @@ private Map getTemperatureResult(value) { '{{ device.displayName }} was {{ value }}°F' return [ - name: 'temperature', - value: value, - descriptionText: descriptionText, - translatable: true + name: 'temperature', + value: value, + descriptionText: descriptionText, + translatable: true, + unit: temperatureScale ] } diff --git a/devicetypes/smartthings/smartsense-open-closed-accelerometer-sensor.src/smartsense-open-closed-accelerometer-sensor.groovy b/devicetypes/smartthings/smartsense-open-closed-accelerometer-sensor.src/smartsense-open-closed-accelerometer-sensor.groovy index ac82584..f8ff1e0 100644 --- a/devicetypes/smartthings/smartsense-open-closed-accelerometer-sensor.src/smartsense-open-closed-accelerometer-sensor.groovy +++ b/devicetypes/smartthings/smartsense-open-closed-accelerometer-sensor.src/smartsense-open-closed-accelerometer-sensor.groovy @@ -223,9 +223,10 @@ def getTemperature(value) { } def descriptionText = "${linkText} was ${value}°${temperatureScale}" return [ - name: 'temperature', - value: value, - descriptionText: descriptionText + name: 'temperature', + value: value, + descriptionText: descriptionText, + unit: temperatureScale ] } diff --git a/devicetypes/smartthings/smartsense-open-closed-sensor.src/.st-ignore b/devicetypes/smartthings/smartsense-open-closed-sensor.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/smartsense-open-closed-sensor.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/smartsense-open-closed-sensor.src/README.md b/devicetypes/smartthings/smartsense-open-closed-sensor.src/README.md new file mode 100644 index 0000000..4cf3bf3 --- /dev/null +++ b/devicetypes/smartthings/smartsense-open-closed-sensor.src/README.md @@ -0,0 +1,41 @@ +# Smartsense Open/Closed Sensor + + + +Works with: + +* [Samsung SmartThings Open/Closed Sensor](https://shop.smartthings.com/#!/packs/smartsense-open-closed-sensor/) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Battery](#battery-specification) + +## Capabilities + +* **Configuration** - _configure()_ command called when device is installed or device preferences updated +* **Battery** - defines device uses a battery +* **Contact Sensor** - can detect contact (possible values: open,closed) +* **Refresh** - _refresh()_ command for status updates +* **Temperature Measurement** - defines device measures current temperature +* **Health Check** - indicates ability to get device health notifications +* **Sensor** - detects sensor events + +## Device Health + +A Category C2 open/closed sensor with maxReportTime of 1 hr. +Check-in interval is double the value of maxReportTime for Zigbee device. +This gives the device twice the amount of time to respond before it is marked as offline. +Check-in interval = 2*60 = 120 min + +## Battery Specification + +One CR2 3V battery required. + +## Troubleshooting + +If the sensor doesn't pair when trying from the SmartThings mobile app, it is possible that the sensor is out of range. +Pairing needs to be tried again by placing the sensor closer to the hub. +Instructions related to pairing, resetting and removing the sensor from SmartThings can be found in the following link: +* [SmartSense Open/Closed Sensor Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/202836844-SmartSense-Open-Closed-Sensor) \ No newline at end of file diff --git a/devicetypes/smartthings/smartsense-open-closed-sensor.src/smartsense-open-closed-sensor.groovy b/devicetypes/smartthings/smartsense-open-closed-sensor.src/smartsense-open-closed-sensor.groovy index f9b24e8..3cbac84 100644 --- a/devicetypes/smartthings/smartsense-open-closed-sensor.src/smartsense-open-closed-sensor.groovy +++ b/devicetypes/smartthings/smartsense-open-closed-sensor.src/smartsense-open-closed-sensor.groovy @@ -226,7 +226,8 @@ private Map getTemperatureResult(value) { return [ name: 'temperature', value: value, - descriptionText: descriptionText + descriptionText: descriptionText, + unit: temperatureScale ] } diff --git a/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/.st-ignore b/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/.st-ignore new file mode 100644 index 0000000..f78b46e --- /dev/null +++ b/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md diff --git a/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/README.md b/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/README.md new file mode 100644 index 0000000..3d6d3c8 --- /dev/null +++ b/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/README.md @@ -0,0 +1,41 @@ +# SmartSense Temp/Humidity Sensor + + + +Works with: + +* [Samsung SmartSense Temp/Humidity Sensor](https://shop.smartthings.com/#!/products/smartsense-temp-humidity-sensor) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Battery](#battery-specification) + +## Capabilities + +* **Configuration** - _configure()_ command called when device is installed or device preferences updated +* **Battery** - defines device uses a battery +* **Relative Humidity Measurement** - defines device measures relative humidity +* **Refresh** - _refresh()_ command for status updates +* **Temperature Measurement** - defines device measures current temperature +* **Health Check** - indicates ability to get device health notifications +* **Sensor** - detects sensor events + +## Device Health + +A Category C2 SmartSense Temp/Humidity Sensor with maxReportTime of 1 hr. +Check-in interval is double the value of maxReportTime for Zigbee device. +This gives the device twice the amount of time to respond before it is marked as offline. +Check-in interval = 2*60 = 120 min + +## Battery Specification + +One CR2 battery is required. + +## Troubleshooting + +If the sensor doesn't pair when trying from the SmartThings mobile app, it is possible that the sensor is out of range. +Pairing needs to be tried by placing the sensor closer to the hub. +Instructions related to pairing, resetting and removing the sensor from SmartThings can be found in the following link: +* [Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/203040294) \ No newline at end of file diff --git a/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/smartsense-temp-humidity-sensor.groovy b/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/smartsense-temp-humidity-sensor.groovy index cbdb78b..00e660c 100644 --- a/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/smartsense-temp-humidity-sensor.groovy +++ b/devicetypes/smartthings/smartsense-temp-humidity-sensor.src/smartsense-temp-humidity-sensor.groovy @@ -233,7 +233,8 @@ private Map getTemperatureResult(value) { return [ name: 'temperature', value: value, - descriptionText: descriptionText + descriptionText: descriptionText, + unit: temperatureScale ] } diff --git a/devicetypes/smartthings/tyco-door-window-sensor.src/tyco-door-window-sensor.groovy b/devicetypes/smartthings/tyco-door-window-sensor.src/tyco-door-window-sensor.groovy index 4121630..e8f1e46 100644 --- a/devicetypes/smartthings/tyco-door-window-sensor.src/tyco-door-window-sensor.groovy +++ b/devicetypes/smartthings/tyco-door-window-sensor.src/tyco-door-window-sensor.groovy @@ -213,7 +213,8 @@ private Map getTemperatureResult(value) { return [ name: 'temperature', value: value, - descriptionText: descriptionText + descriptionText: descriptionText, + unit: temperatureScale ] } diff --git a/devicetypes/smartthings/zigbee-white-color-temperature-bulb.src/zigbee-white-color-temperature-bulb.groovy b/devicetypes/smartthings/zigbee-white-color-temperature-bulb.src/zigbee-white-color-temperature-bulb.groovy index 2154599..de8424d 100644 --- a/devicetypes/smartthings/zigbee-white-color-temperature-bulb.src/zigbee-white-color-temperature-bulb.groovy +++ b/devicetypes/smartthings/zigbee-white-color-temperature-bulb.src/zigbee-white-color-temperature-bulb.groovy @@ -36,6 +36,7 @@ metadata { fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "LIGHTIFY RT Tunable White", deviceJoinName: "OSRAM LIGHTIFY LED Recessed Kit RT 5/6 Tunable White" fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "Classic A60 TW", deviceJoinName: "OSRAM LIGHTIFY LED Tunable White 60W" fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "LIGHTIFY A19 Tunable White", deviceJoinName: "OSRAM LIGHTIFY LED Tunable White 60W" + fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "Classic B40 TW - LIGHTIFY", deviceJoinName: "OSRAM LIGHTIFY Classic B40 Tunable White" } // UI tile definitions diff --git a/smartapps/juano2310/jawbone-button-notifier.src/jawbone-button-notifier.groovy b/smartapps/juano2310/jawbone-button-notifier.src/jawbone-button-notifier.groovy index 9ea4f3e..41b7211 100644 --- a/smartapps/juano2310/jawbone-button-notifier.src/jawbone-button-notifier.groovy +++ b/smartapps/juano2310/jawbone-button-notifier.src/jawbone-button-notifier.groovy @@ -62,7 +62,7 @@ def initialize() { } def sendit(evt) { - log.debug "$evt.value: $evt, $settings" + log.debug "$evt.value: $evt" sendMessage() } @@ -80,6 +80,6 @@ def sendMessage() { sendSms phone3, msg } if (!phone1 && !phone2 && !phone3) { - sendPush msg + sendPush msg } } diff --git a/smartapps/smartthings/hue-connect.src/hue-connect.groovy b/smartapps/smartthings/hue-connect.src/hue-connect.groovy index e62d363..9ca7773 100644 --- a/smartapps/smartthings/hue-connect.src/hue-connect.groovy +++ b/smartapps/smartthings/hue-connect.src/hue-connect.groovy @@ -758,6 +758,10 @@ def isValidSource(macAddress) { return (vbridges?.find {"${it.value.mac}" == macAddress}) != null } +def isInBulbDiscovery() { + return state.inBulbDiscovery +} + ///////////////////////////////////// //CHILD DEVICE METHODS ///////////////////////////////////// diff --git a/smartapps/smartthings/life360-connect.src/life360-connect.groovy b/smartapps/smartthings/life360-connect.src/life360-connect.groovy index cf07750..c4f2b8e 100644 --- a/smartapps/smartthings/life360-connect.src/life360-connect.groovy +++ b/smartapps/smartthings/life360-connect.src/life360-connect.groovy @@ -74,8 +74,6 @@ def authPage() def redirectUrl = oauthInitUrl() - log.debug "RedirectURL = ${redirectUrl}" - return dynamicPage(name: "Credentials", title: "Life360", nextPage:"listCirclesPage", uninstall: uninstallOption, install:false) { section { href url:redirectUrl, style:"embedded", required:false, title:"Life360", description:description @@ -257,8 +255,6 @@ def initializeLife360Connection() { def oauthClientId = appSettings.clientId def oauthClientSecret = appSettings.clientSecret - log.debug "Installed with settings: ${settings}" - initialize() def username = settings.username @@ -269,8 +265,6 @@ def initializeLife360Connection() { def basicCredentials = "${oauthClientId}:${oauthClientSecret}" def encodedCredentials = basicCredentials.encodeAsBase64().toString() - log.debug "Encoded Creds: ${encodedCredentials}" - // call life360, get OAUTH token using password flow, save // curl -X POST -H "Authorization: Basic cFJFcXVnYWJSZXRyZTRFc3RldGhlcnVmcmVQdW1hbUV4dWNyRUh1YzptM2ZydXBSZXRSZXN3ZXJFQ2hBUHJFOTZxYWtFZHI0Vg==" @@ -284,8 +278,6 @@ def initializeLife360Connection() { "username=${username}&"+ "password=${password}" - log.debug "Post Body: ${postBody}" - def result = null try { @@ -295,7 +287,6 @@ def initializeLife360Connection() { } if (result.data.access_token) { state.life360AccessToken = result.data.access_token - log.debug "Access Token = ${state.life360AccessToken}" return true; } log.debug "Response=${result.data}" @@ -533,8 +524,6 @@ def createCircleSubscription() { def postBody = "url=${hookUrl}" - log.debug "Post Body: ${postBody}" - def result = null try { @@ -586,8 +575,6 @@ def updated() { // log.debug "After Find Attempt." - log.debug "Member Id = ${member.id}, Name = ${member.firstName} ${member.lastName}, Email Address = ${member.loginEmail}" - // log.debug "External Id=${app.id}:${member.id}" // create the device diff --git a/smartapps/smartthings/notify-me-when.src/notify-me-when.groovy b/smartapps/smartthings/notify-me-when.src/notify-me-when.groovy index f124260..3b286a8 100644 --- a/smartapps/smartthings/notify-me-when.src/notify-me-when.groovy +++ b/smartapps/smartthings/notify-me-when.src/notify-me-when.groovy @@ -48,9 +48,9 @@ preferences { } section("Via a push notification and/or an SMS message"){ input("recipients", "contact", title: "Send notifications to") { - input "phone", "phone", title: "Phone Number (for SMS, optional)", required: false + input "phone", "phone", title: "Enter a phone number to get SMS", required: false paragraph "If outside the US please make sure to enter the proper country code" - input "pushAndPhone", "enum", title: "Both Push and SMS?", required: false, options: ["Yes", "No"] + input "pushAndPhone", "enum", title: "Notify me via Push Notification", required: false, options: ["Yes", "No"] } } section("Minimum time between messages (optional, defaults to every message)") { @@ -111,19 +111,24 @@ private sendMessage(evt) { if (location.contactBookEnabled) { sendNotificationToContacts(msg, recipients, options) } else { - if (!phone || pushAndPhone != 'No') { - log.debug 'sending push' - options.method = 'push' - //sendPush(msg) - } if (phone) { options.phone = phone - log.debug 'sending SMS' - //sendSms(phone, msg) + if (pushAndPhone != 'No') { + log.debug 'Sending push and SMS' + options.method = 'both' + } else { + log.debug 'Sending SMS' + options.method = 'phone' + } + } else if (pushAndPhone != 'No') { + log.debug 'Sending push' + options.method = 'push' + } else { + log.debug 'Sending nothing' + options.method = 'none' } sendNotification(msg, options) } - if (frequency) { state[evt.deviceId] = now() }