diff --git a/devicetypes/fibargroup/fibaro-door-window-sensor-zw5-with-temperature.src/fibaro-door-window-sensor-zw5-with-temperature.groovy b/devicetypes/fibargroup/fibaro-door-window-sensor-zw5-with-temperature.src/fibaro-door-window-sensor-zw5-with-temperature.groovy index 9b98808..406d23c 100644 --- a/devicetypes/fibargroup/fibaro-door-window-sensor-zw5-with-temperature.src/fibaro-door-window-sensor-zw5-with-temperature.groovy +++ b/devicetypes/fibargroup/fibaro-door-window-sensor-zw5-with-temperature.src/fibaro-door-window-sensor-zw5-with-temperature.groovy @@ -39,8 +39,8 @@ metadata { } tileAttribute("device.tamper", key:"SECONDARY_CONTROL") { - attributeState("active", label:'tamper active', backgroundColor:"#53a7c0") - attributeState("inactive", label:'tamper inactive', backgroundColor:"#ffffff") + attributeState("active", label:'tamper active', backgroundColor:"#00A0DC") + attributeState("inactive", label:'tamper inactive', backgroundColor:"#CCCCCC") } } diff --git a/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/fibaro-door-window-sensor-zw5.groovy b/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/fibaro-door-window-sensor-zw5.groovy index 10cefd1..ab49f3b 100644 --- a/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/fibaro-door-window-sensor-zw5.groovy +++ b/devicetypes/fibargroup/fibaro-door-window-sensor-zw5.src/fibaro-door-window-sensor-zw5.groovy @@ -37,8 +37,8 @@ metadata { } tileAttribute("device.tamper", key:"SECONDARY_CONTROL") { - attributeState("active", label:'tamper active', backgroundColor:"#53a7c0") - attributeState("inactive", label:'tamper inactive', backgroundColor:"#ffffff") + attributeState("active", label:'tamper active', backgroundColor:"#00A0DC") + attributeState("inactive", label:'tamper inactive', backgroundColor:"#CCCCCC") } } diff --git a/devicetypes/smartthings/aeon-key-fob.src/aeon-key-fob.groovy b/devicetypes/smartthings/aeon-key-fob.src/aeon-key-fob.groovy index a782169..deb7047 100644 --- a/devicetypes/smartthings/aeon-key-fob.src/aeon-key-fob.groovy +++ b/devicetypes/smartthings/aeon-key-fob.src/aeon-key-fob.groovy @@ -21,6 +21,7 @@ metadata { capability "Battery" fingerprint deviceId: "0x0101", inClusters: "0x86,0x72,0x70,0x80,0x84,0x85" + fingerprint mfr: "0086", prod: "0001", model: "0026", deviceJoinName: "Aeon Panic Button" } simulator { @@ -130,5 +131,12 @@ def updated() { } def initialize() { - sendEvent(name: "numberOfButtons", value: 4) + def zwMap = getZwaveInfo() + def buttons = 4 // Default for Key Fob + + // Only one button for Aeon Panic Button + if (zwMap && zwMap.mfr == "0086" && zwMap.prod == "0001" && zwMap.model == "0026") { + buttons = 1 + } + sendEvent(name: "numberOfButtons", value: buttons) } diff --git a/devicetypes/smartthings/aeon-multisensor-6.src/.st-ignore b/devicetypes/smartthings/aeon-multisensor-6.src/.st-ignore new file mode 100644 index 0000000..71af75c --- /dev/null +++ b/devicetypes/smartthings/aeon-multisensor-6.src/.st-ignore @@ -0,0 +1,2 @@ +.st-ignore +README.md \ No newline at end of file diff --git a/devicetypes/smartthings/aeon-multisensor-6.src/README.md b/devicetypes/smartthings/aeon-multisensor-6.src/README.md new file mode 100644 index 0000000..22015f9 --- /dev/null +++ b/devicetypes/smartthings/aeon-multisensor-6.src/README.md @@ -0,0 +1,43 @@ +# Aeon Multisensor 6 + +Cloud Execution + +Works with: + +* [Aeon Labs MultiSensor 6](https://www.smartthings.com/products/aeon-labs-multisensor-6) + +## Table of contents + +* [Capabilities](#capabilities) +* [Health](#device-health) +* [Troubleshooting](#troubleshooting) + +## Capabilities + +* **Motion Sensor** - can detect motion +* **Temperature Measurement** - defines device measures current temperature +* **Relative Humidity Measurement** - allow reading the relative humidity from devices that support it +* **Illuminance Measurement** - gives the illuminance reading from devices that support it +* **Ultraviolet Index** - gives the ability to get the ultraviolet index from devices that report it +* **Configuration** - _configure()_ command called when device is installed or device preferences updated +* **Sensor** - detects sensor events +* **Battery** - defines device uses a battery +* **Health Check** - indicates ability to get device health notifications + +## Device Health + +Aeon Labs MultiSensor 6 is polled by the hub. +As of hubCore version 0.14.38 the hub sends up reports every 15 minutes regardless of whether the state changed. +Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*15 + 2)mins = 32 mins. +Not to mention after going OFFLINE when the device is plugged back in, it might take a considerable amount of time for +the device to appear as ONLINE again. This is because if this listening device does not respond to two poll requests in a row, +it is not polled for 5 minutes by the hub. This can delay up the process of being marked ONLINE by quite some time. + +* __32min__ checkInterval + +## 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: +* [Aeon Labs MultiSensor 6 Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/206157226) \ No newline at end of file diff --git a/devicetypes/smartthings/aeon-multisensor-6.src/aeon-multisensor-6.groovy b/devicetypes/smartthings/aeon-multisensor-6.src/aeon-multisensor-6.groovy index 56c3568..c789cd9 100644 --- a/devicetypes/smartthings/aeon-multisensor-6.src/aeon-multisensor-6.groovy +++ b/devicetypes/smartthings/aeon-multisensor-6.src/aeon-multisensor-6.groovy @@ -22,6 +22,7 @@ metadata { capability "Configuration" capability "Sensor" capability "Battery" + capability "Health Check" attribute "tamper", "enum", ["detected", "clear"] attribute "batteryStatus", "string" @@ -29,6 +30,7 @@ metadata { fingerprint deviceId: "0x2101", inClusters: "0x5E,0x86,0x72,0x59,0x85,0x73,0x71,0x84,0x80,0x30,0x31,0x70,0x7A", outClusters: "0x5A" fingerprint deviceId: "0x2101", inClusters: "0x5E,0x86,0x72,0x59,0x85,0x73,0x71,0x84,0x80,0x30,0x31,0x70,0x7A,0x5A" + fingerprint mfr:"0086", prod:"0102", model:"0064", deviceJoinName: "Aeon Labs MultiSensor 6" } simulator { @@ -127,7 +129,14 @@ metadata { } } +def installed(){ +// Device-Watch simply pings if no device events received for 32min(checkInterval) + sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) +} + def updated() { +// Device-Watch simply pings if no device events received for 32min(checkInterval) + sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) log.debug "Updated with settings: ${settings}" log.debug "${device.displayName} is now ${device.latestValue("powerSupply")}" @@ -326,6 +335,13 @@ def zwaveEvent(physicalgraph.zwave.Command cmd) { createEvent(descriptionText: cmd.toString(), isStateChange: false) } +/** + * PING is used by Device-Watch in attempt to reach the Device + * */ +def ping() { + secure(zwave.batteryV1.batteryGet()) +} + def configure() { // This sensor joins as a secure device if you double-click the button to include it log.debug "${device.displayName} is configuring its settings" diff --git a/devicetypes/smartthings/ct100-thermostat.src/ct100-thermostat.groovy b/devicetypes/smartthings/ct100-thermostat.src/ct100-thermostat.groovy index 93203fd..ea1e7af 100644 --- a/devicetypes/smartthings/ct100-thermostat.src/ct100-thermostat.groovy +++ b/devicetypes/smartthings/ct100-thermostat.src/ct100-thermostat.groovy @@ -9,6 +9,7 @@ metadata { capability "Configuration" capability "Refresh" capability "Sensor" + capability "Health Check" attribute "thermostatFanState", "string" @@ -18,6 +19,7 @@ metadata { command "quickSetHeat" fingerprint deviceId: "0x08", inClusters: "0x43,0x40,0x44,0x31,0x80,0x85,0x60" + fingerprint mfr:"0098", prod:"6401", model:"0107", deviceJoinName: "2Gig CT100 Programmable Thermostat" } // simulator metadata @@ -106,6 +108,16 @@ metadata { } } +def updated() { + // Device-Watch simply pings if no device events received for 32min(checkInterval) + sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) +} + +def installed() { + // Device-Watch simply pings if no device events received for 32min(checkInterval) + sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID]) +} + def parse(String description) { def result = [] @@ -439,6 +451,14 @@ def setCoolingSetpoint(Double degrees, Integer delay = 30000) { ], delay) } +/** + * PING is used by Device-Watch in attempt to reach the Device + * */ +def ping() { + log.debug "ping() called" + refresh() +} + def configure() { delayBetween([ zwave.thermostatModeV2.thermostatModeSupportedGet().format(), diff --git a/devicetypes/smartthings/fibaro-motion-sensor.src/fibaro-motion-sensor.groovy b/devicetypes/smartthings/fibaro-motion-sensor.src/fibaro-motion-sensor.groovy index 9e2d769..a0c9322 100644 --- a/devicetypes/smartthings/fibaro-motion-sensor.src/fibaro-motion-sensor.groovy +++ b/devicetypes/smartthings/fibaro-motion-sensor.src/fibaro-motion-sensor.groovy @@ -107,8 +107,8 @@ state "configure", label:'', action:"configuration.configure", icon:"st.secondary.configure" } standardTile("acceleration", "device.acceleration") { - state("active", label:'vibration', icon:"st.motion.acceleration.active", backgroundColor:"#53a7c0") - state("inactive", label:'still', icon:"st.motion.acceleration.inactive", backgroundColor:"#ffffff") + state("active", label:'vibration', icon:"st.motion.acceleration.active", backgroundColor:"#00a0dc") + state("inactive", label:'still', icon:"st.motion.acceleration.inactive", backgroundColor:"#cccccc") } diff --git a/devicetypes/smartthings/fortrezz-water-valve.src/fortrezz-water-valve.groovy b/devicetypes/smartthings/fortrezz-water-valve.src/fortrezz-water-valve.groovy index 80ee6a0..5c8901a 100644 --- a/devicetypes/smartthings/fortrezz-water-valve.src/fortrezz-water-valve.groovy +++ b/devicetypes/smartthings/fortrezz-water-valve.src/fortrezz-water-valve.groovy @@ -12,13 +12,13 @@ * */ metadata { - definition (name: "Fortrezz Water Valve", namespace: "smartthings", author: "SmartThings") { + definition (name: "Fortrezz Water Valve", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.watervalve") { capability "Actuator" capability "Health Check" capability "Valve" capability "Refresh" capability "Sensor" - + fingerprint deviceId: "0x1000", inClusters: "0x25,0x72,0x86,0x71,0x22,0x70" fingerprint mfr:"0084", prod:"0213", model:"0215", deviceJoinName: "FortrezZ Water Valve" } @@ -62,22 +62,23 @@ def updated(){ def parse(String description) { log.trace description - def result = null def cmd = zwave.parse(description) if (cmd) { - result = createEvent(zwaveEvent(cmd)) + return zwaveEvent(cmd) } - log.debug "Parse returned ${result?.descriptionText}" - return result + log.debug "Could not parse message" + return null } def zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinaryReport cmd) { def value = cmd.value ? "closed" : "open" - [name: "contact", value: value, descriptionText: "$device.displayName valve is $value"] + + return [createEventWithDebug([name: "contact", value: value, descriptionText: "$device.displayName valve is $value"]), + createEventWithDebug([name: "valve", value: value, descriptionText: "$device.displayName valve is $value"])] } def zwaveEvent(physicalgraph.zwave.Command cmd) { - [:] // Handles all Z-Wave commands we aren't interested in + return createEvent([:]) // Handles all Z-Wave commands we aren't interested in } def open() { @@ -98,3 +99,9 @@ def ping() { def refresh() { zwave.switchBinaryV1.switchBinaryGet().format() } + +def createEventWithDebug(eventMap) { + def event = createEvent(eventMap) + log.debug "Event created with ${event?.descriptionText}" + return event +} 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 131dca4..3109335 100644 --- a/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy +++ b/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy @@ -61,8 +61,8 @@ metadata { tiles(scale: 2) { multiAttributeTile(name: "motion", type: "generic", width: 6, height: 4) { tileAttribute("device.motion", key: "PRIMARY_CONTROL") { - attributeState "active", label: 'motion', icon: "st.motion.motion.active", backgroundColor: "#53a7c0" - attributeState "inactive", label: 'no motion', icon: "st.motion.motion.inactive", backgroundColor: "#ffffff" + attributeState "active", label: 'motion', icon: "st.motion.motion.active", backgroundColor: "#00A0DC" + attributeState "inactive", label: 'no motion', icon: "st.motion.motion.inactive", backgroundColor: "#cccccc" } } valueTile("temperature", "device.temperature", width: 2, height: 2) { 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 2629724..0714794 100644 --- a/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy +++ b/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy @@ -87,8 +87,8 @@ metadata { state("closed", label: 'Closed', icon: "st.contact.contact.closed", backgroundColor: "#00a0dc") } standardTile("acceleration", "device.acceleration", width: 2, height: 2) { - state("active", label: 'Active', icon: "st.motion.acceleration.active", backgroundColor: "#53a7c0") - state("inactive", label: 'Inactive', icon: "st.motion.acceleration.inactive", backgroundColor: "#ffffff") + state("active", label: 'Active', icon: "st.motion.acceleration.active", backgroundColor: "#00a0dc") + state("inactive", label: 'Inactive', icon: "st.motion.acceleration.inactive", backgroundColor: "#cccccc") } valueTile("temperature", "device.temperature", width: 2, height: 2) { state("temperature", label: '${currentValue}°', diff --git a/devicetypes/smartthings/wemo-motion.src/wemo-motion.groovy b/devicetypes/smartthings/wemo-motion.src/wemo-motion.groovy index fe844f2..e094d27 100644 --- a/devicetypes/smartthings/wemo-motion.src/wemo-motion.groovy +++ b/devicetypes/smartthings/wemo-motion.src/wemo-motion.groovy @@ -46,8 +46,8 @@ } standardTile("motion", "device.motion", width: 2, height: 2) { - state("active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#53a7c0") - state("inactive", label:'no motion', icon:"st.motion.motion.inactive", backgroundColor:"#ffffff") + state("active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#00A0DC") + state("inactive", label:'no motion', icon:"st.motion.motion.inactive", backgroundColor:"#CCCCCC") state("offline", label:'${name}', icon:"st.motion.motion.inactive", backgroundColor:"#ff0000") } diff --git a/devicetypes/smartthings/zigbee-lock.src/zigbee-lock.groovy b/devicetypes/smartthings/zigbee-lock.src/zigbee-lock.groovy index b14730d..7e0b572 100644 --- a/devicetypes/smartthings/zigbee-lock.src/zigbee-lock.groovy +++ b/devicetypes/smartthings/zigbee-lock.src/zigbee-lock.groovy @@ -34,7 +34,7 @@ import physicalgraph.zigbee.zcl.DataType fingerprint profileId: "0104", inClusters: "0000,0001,0003,0009,000A,0101,0020", outClusters: "000A,0019", manufacturer: "Yale", model: "YRD210 PB DB", deviceJoinName: "Yale Push Button Deadbolt Lock" fingerprint profileId: "0104", inClusters: "0000,0001,0003,0009,000A,0101,0020", outClusters: "000A,0019", manufacturer: "Yale", model: "YRD220/240 TSDB", deviceJoinName: "Yale Touch Screen Deadbolt Lock" fingerprint profileId: "0104", inClusters: "0000,0001,0003,0009,000A,0101,0020", outClusters: "000A,0019", manufacturer: "Yale", model: "YRL210 PB LL", deviceJoinName: "Yale Push Button Lever Lock" - fingerprint profileId: "0104", inClusters: "0000,0001,0003,0009,000A,0101,0020", outClusters: "000A,0019", manufacturer: "Yale", model: "YRD226/246 TSDB", deviceJoinName: "Yale Touch Screen Deadbolt Lock" + fingerprint profileId: "0104", inClusters: "0000,0001,0003,0009,000A,0101,0020", outClusters: "000A,0019", manufacturer: "Yale", model: "YRD226/246 TSDB", deviceJoinName: "Yale Touch Screen Deadbolt Lock" } tiles(scale: 2) { diff --git a/devicetypes/smartthings/zigbee-valve.src/zigbee-valve.groovy b/devicetypes/smartthings/zigbee-valve.src/zigbee-valve.groovy index 657da69..82ca256 100644 --- a/devicetypes/smartthings/zigbee-valve.src/zigbee-valve.groovy +++ b/devicetypes/smartthings/zigbee-valve.src/zigbee-valve.groovy @@ -83,6 +83,9 @@ def parse(String description) { } } sendEvent(event) + //handle valve attribute + event.name = "valve" + sendEvent(event) } else { def descMap = zigbee.parseDescriptionAsMap(description) diff --git a/devicetypes/smartthings/zwave-door-window-sensor.src/zwave-door-window-sensor.groovy b/devicetypes/smartthings/zwave-door-window-sensor.src/zwave-door-window-sensor.groovy index 4edce26..0cf6d46 100644 --- a/devicetypes/smartthings/zwave-door-window-sensor.src/zwave-door-window-sensor.groovy +++ b/devicetypes/smartthings/zwave-door-window-sensor.src/zwave-door-window-sensor.groovy @@ -30,9 +30,15 @@ metadata { fingerprint deviceId: "0x0701", inClusters: "0x5E,0x86,0x72,0x98", outClusters: "0x5A,0x82" fingerprint deviceId: "0x0701", inClusters: "0x5E,0x80,0x71,0x85,0x70,0x72,0x86,0x30,0x31,0x84,0x59,0x73,0x5A,0x8F,0x98,0x7A", outClusters:"0x20" // Philio multi+ fingerprint mfr:"0086", prod:"0002", model:"001D", deviceJoinName: "Aeon Labs Door/Window Sensor (Gen 5)" - fingerprint mfr:"014A", prod:"0001", model:"0002", deviceJoinName: "Ecolink Door/Window Sensor" fingerprint mfr:"0086", prod:"0102", model:"0070", deviceJoinName: "Aeon Labs Door/Window Sensor 6" + fingerprint mfr:"0086", prod:"0102", model:"0059", deviceJoinName: "Aeon Labs Recessed Door Sensor" + fingerprint mfr:"014A", prod:"0001", model:"0002", deviceJoinName: "Ecolink Door/Window Sensor" + fingerprint mfr:"014A", prod:"0001", model:"0003", deviceJoinName: "Ecolink Tilt Sensor" fingerprint mfr:"011A", prod:"0601", model:"0903", deviceJoinName: "Enerwave Magnetic Door/Window Sensor" + fingerprint mfr:"014F", prod:"2001", model:"0102", deviceJoinName: "Nortek GoControl Door/Window Sensor" + fingerprint mfr:"0063", prod:"4953", model:"3031", deviceJoinName: "Jasco Hinge Pin Door Sensor" + fingerprint mfr:"019A", prod:"0003", model:"0003", deviceJoinName: "Sensative Strips" + } // simulator metadata diff --git a/devicetypes/smartthings/zwave-lock.src/zwave-lock.groovy b/devicetypes/smartthings/zwave-lock.src/zwave-lock.groovy index 38f9e43..50b251f 100644 --- a/devicetypes/smartthings/zwave-lock.src/zwave-lock.groovy +++ b/devicetypes/smartthings/zwave-lock.src/zwave-lock.groovy @@ -26,7 +26,24 @@ metadata { fingerprint deviceId: "0x4003", inClusters: "0x98" fingerprint deviceId: "0x4004", inClusters: "0x98" - fingerprint mfr:"0129", prod:"0002", model:"0000", deviceJoinName: "Yale Key Free Touchscreen Deadbolt" + fingerprint mfr:"0090", prod:"0001", model:"0236", deviceJoinName: "KwikSet SmartCode 910 Deadbolt Door Lock" + fingerprint mfr:"0090", prod:"0003", model:"0238", deviceJoinName: "KwikSet SmartCode 910 Deadbolt Door Lock" + fingerprint mfr:"0090", prod:"0001", model:"0001", deviceJoinName: "KwikSet SmartCode 910 Contemporary Deadbolt Door Lock" + fingerprint mfr:"0090", prod:"0003", model:"0339", deviceJoinName: "KwikSet SmartCode 912 Lever Door Lock" + fingerprint mfr:"0090", prod:"0003", model:"4006", deviceJoinName: "KwikSet SmartCode 914 Deadbolt Door Lock" //backlit version + fingerprint mfr:"0090", prod:"0003", model:"0440", deviceJoinName: "KwikSet SmartCode 914 Deadbolt Door Lock" + fingerprint mfr:"0090", prod:"0001", model:"0642", deviceJoinName: "KwikSet SmartCode 916 Touchscreen Deadbolt Door Lock" + fingerprint mfr:"0090", prod:"0003", model:"0642", deviceJoinName: "KwikSet SmartCode 916 Touchscreen Deadbolt Door Lock" + fingerprint mfr:"003B", prod:"6341", model:"0544", deviceJoinName: "Schlage Camelot Touchscreen Deadbolt Door Lock" + fingerprint mfr:"003B", prod:"6341", model:"5044", deviceJoinName: "Schlage Century Touchscreen Deadbolt Door Lock" + fingerprint mfr:"003B", prod:"634B", model:"504C", deviceJoinName: "Schlage Connected Keypad Lever Door Lock" + fingerprint mfr:"0129", prod:"0002", model:"0800", deviceJoinName: "Yale Touchscreen Deadbolt Door Lock" // YRD120 + fingerprint mfr:"0129", prod:"0002", model:"0000", deviceJoinName: "Yale Touchscreen Deadbolt Door Lock" // YRD220, YRD240 + fingerprint mfr:"0129", prod:"0002", model:"FFFF", deviceJoinName: "Yale Touchscreen Lever Door Lock" // YRD220 + fingerprint mfr:"0129", prod:"0004", model:"0800", deviceJoinName: "Yale Push Button Deadbolt Door Lock" // YRD110 + fingerprint mfr:"0129", prod:"0004", model:"0000", deviceJoinName: "Yale Push Button Deadbolt Door Lock" // YRD210 + fingerprint mfr:"0129", prod:"0001", model:"0000", deviceJoinName: "Yale Push Button Lever Door Lock" // YRD210 + fingerprint mfr:"0129", prod:"8002", model:"0600", deviceJoinName: "Yale Assure Lock with Bluetooth" } simulator { diff --git a/devicetypes/smartthings/zwave-motion-sensor.src/zwave-motion-sensor.groovy b/devicetypes/smartthings/zwave-motion-sensor.src/zwave-motion-sensor.groovy index 3e76677..7cf9ed8 100644 --- a/devicetypes/smartthings/zwave-motion-sensor.src/zwave-motion-sensor.groovy +++ b/devicetypes/smartthings/zwave-motion-sensor.src/zwave-motion-sensor.groovy @@ -29,7 +29,7 @@ metadata { fingerprint mfr: "0060", prod: "0001", model: "0002", deviceJoinName: "Everspring Motion Sensor" // Everspring SP814 fingerprint mfr: "0060", prod: "0001", model: "0003", deviceJoinName: "Everspring Motion Sensor" // Everspring HSP02 fingerprint mfr: "011A", prod: "0601", model: "0901", deviceJoinName: "Enerwave Motion Sensor" // Enerwave ZWN-BPC - fingerprint mfr: "0063", prod: "4953", model: "3133", deviceJoinName: "GE Smart Motion Sensor" + fingerprint mfr: "0063", prod: "4953", model: "3133", deviceJoinName: "GE Portable Smart Motion Sensor" } simulator { diff --git a/devicetypes/smartthings/zwave-plus-motion-temp-sensor.src/zwave-plus-motion-temp-sensor.groovy b/devicetypes/smartthings/zwave-plus-motion-temp-sensor.src/zwave-plus-motion-temp-sensor.groovy index 02d327c..e72dba5 100644 --- a/devicetypes/smartthings/zwave-plus-motion-temp-sensor.src/zwave-plus-motion-temp-sensor.groovy +++ b/devicetypes/smartthings/zwave-plus-motion-temp-sensor.src/zwave-plus-motion-temp-sensor.groovy @@ -37,8 +37,8 @@ metadata { tiles { standardTile("motion", "device.motion", width: 3, height: 2) { - state "active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#53a7c0" - state "inactive", label:'no motion', icon:"st.motion.motion.inactive", backgroundColor:"#ffffff" + state "active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#00A0DC" + state "inactive", label:'no motion', icon:"st.motion.motion.inactive", backgroundColor:"#CCCCCC" } valueTile("temperature", "device.temperature", inactiveLabel: false) { diff --git a/devicetypes/smartthings/zwave-smoke-alarm.src/zwave-smoke-alarm.groovy b/devicetypes/smartthings/zwave-smoke-alarm.src/zwave-smoke-alarm.groovy index a5de607..3acaa8e 100644 --- a/devicetypes/smartthings/zwave-smoke-alarm.src/zwave-smoke-alarm.groovy +++ b/devicetypes/smartthings/zwave-smoke-alarm.src/zwave-smoke-alarm.groovy @@ -22,6 +22,7 @@ metadata { attribute "alarmState", "string" fingerprint deviceId: "0xA100", inClusters: "0x20,0x80,0x70,0x85,0x71,0x72,0x86" + fingerprint mfr:"0138", prod:"0001", model:"0001", deviceJoinName: "First Alert Smoke Detector" fingerprint mfr:"0138", prod:"0001", model:"0002", deviceJoinName: "First Alert Smoke Detector and Carbon Monoxide Alarm (ZCOMBO)" } diff --git a/devicetypes/smartthings/zwave-water-valve.src/zwave-water-valve.groovy b/devicetypes/smartthings/zwave-water-valve.src/zwave-water-valve.groovy index fec1a46..dcfe452 100644 --- a/devicetypes/smartthings/zwave-water-valve.src/zwave-water-valve.groovy +++ b/devicetypes/smartthings/zwave-water-valve.src/zwave-water-valve.groovy @@ -12,7 +12,7 @@ * */ metadata { - definition (name: "Z-Wave Water Valve", namespace: "smartthings", author: "SmartThings") { + definition (name: "Z-Wave Water Valve", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.watervalve") { capability "Actuator" capability "Health Check" capability "Valve" @@ -68,18 +68,19 @@ def updated() { def parse(String description) { log.trace "parse description : $description" - def result = null def cmd = zwave.parse(description, [0x20: 1]) if (cmd) { - result = createEvent(zwaveEvent(cmd)) + return zwaveEvent(cmd) } - log.debug "Parse returned ${result?.descriptionText}" - return result + log.debug "Could not parse message" + return null } def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd) { - def value = cmd.value == 0xFF ? "open" : cmd.value == 0x00 ? "closed" : "unknown" - [name: "contact", value: value, descriptionText: "$device.displayName valve is $value"] + def value = cmd.value == 0xFF ? "open" : cmd.value == 0x00 ? "closed" : "unknown" + + return [createEventWithDebug([name: "contact", value: value, descriptionText: "$device.displayName valve is $value"]), + createEventWithDebug([name: "valve", value: value, descriptionText: "$device.displayName valve is $value"])] } def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) { //TODO should show MSR when device is discovered @@ -89,20 +90,22 @@ def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerS log.debug "productTypeId: ${cmd.productTypeId}" def msr = String.format("%04X-%04X-%04X", cmd.manufacturerId, cmd.productTypeId, cmd.productId) updateDataValue("MSR", msr) - [descriptionText: "$device.displayName MSR: $msr", isStateChange: false] + return createEventWithDebug([descriptionText: "$device.displayName MSR: $msr", isStateChange: false]) } def zwaveEvent(physicalgraph.zwave.commands.deviceresetlocallyv1.DeviceResetLocallyNotification cmd) { - [descriptionText: cmd.toString(), isStateChange: true, displayed: true] + return createEventWithDebug([descriptionText: cmd.toString(), isStateChange: true, displayed: true]) } def zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinaryReport cmd) { def value = cmd.value == 0xFF ? "open" : cmd.value == 0x00 ? "closed" : "unknown" - [name: "contact", value: value, descriptionText: "$device.displayName valve is $value"] + + return [createEventWithDebug([name: "contact", value: value, descriptionText: "$device.displayName valve is $value"]), + createEventWithDebug([name: "valve", value: value, descriptionText: "$device.displayName valve is $value"])] } def zwaveEvent(physicalgraph.zwave.Command cmd) { - [:] // Handles all Z-Wave commands we aren't interested in + return createEvent([:]) // Handles all Z-Wave commands we aren't interested in } def open() { @@ -138,3 +141,9 @@ def refresh() { } delayBetween(commands,100) } + +def createEventWithDebug(eventMap) { + def event = createEvent(eventMap) + log.debug "Event created with ${event?.descriptionText}" + return event +}