From 3ec8be708a302f82dce645710e1ad30433ca239c Mon Sep 17 00:00:00 2001 From: jackchi Date: Tue, 11 Apr 2017 14:58:12 -0700 Subject: [PATCH 1/5] [ICP-598] Adding Z-Wave device manufacturer --- .../smartthings/dimmer-switch.src/dimmer-switch.groovy | 6 +++--- .../zwave-door-window-sensor.groovy | 3 +++ .../smartthings/zwave-switch.src/zwave-switch.groovy | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy b/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy index 370ecb7..7c658c1 100644 --- a/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy +++ b/devicetypes/smartthings/dimmer-switch.src/dimmer-switch.groovy @@ -23,9 +23,9 @@ metadata { capability "Health Check" capability "Light" - fingerprint mfr:"0063", prod:"4457", deviceJoinName: "GE In-Wall Smart Dimmer " - fingerprint mfr:"0063", prod:"4944", deviceJoinName: "GE In-Wall Smart Dimmer " - fingerprint mfr:"0063", prod:"5044", deviceJoinName: "GE Plug-In Smart Dimmer " + fingerprint mfr:"0063", prod:"4457", deviceJoinName: "GE In-Wall Smart Dimmer" + fingerprint mfr:"0063", prod:"4944", deviceJoinName: "GE In-Wall Smart Dimmer" + fingerprint mfr:"0063", prod:"5044", deviceJoinName: "GE Plug-In Smart Dimmer" fingerprint mfr:"0063", prod:"4944", model:"3034", deviceJoinName: "GE In-Wall Smart Fan Control" } 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 7e448da..f5c8f8f 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,6 +30,9 @@ 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" + } // simulator metadata diff --git a/devicetypes/smartthings/zwave-switch.src/zwave-switch.groovy b/devicetypes/smartthings/zwave-switch.src/zwave-switch.groovy index 0406a1e..7db5f5c 100644 --- a/devicetypes/smartthings/zwave-switch.src/zwave-switch.groovy +++ b/devicetypes/smartthings/zwave-switch.src/zwave-switch.groovy @@ -22,9 +22,9 @@ metadata { capability "Health Check" capability "Light" - fingerprint mfr:"0063", prod:"4952", deviceJoinName: "Z-Wave Wall Switch" - fingerprint mfr:"0063", prod:"5257", deviceJoinName: "Z-Wave Wall Switch" - fingerprint mfr:"0063", prod:"5052", deviceJoinName: "Z-Wave Plug-In Switch" + fingerprint mfr:"0063", prod:"4952", deviceJoinName: "GE Wall Switch" + fingerprint mfr:"0063", prod:"5257", deviceJoinName: "GE Wall Switch" + fingerprint mfr:"0063", prod:"5052", deviceJoinName: "GE Plug-In Switch" fingerprint mfr:"0113", prod:"5257", deviceJoinName: "Z-Wave Wall Switch" } From fb55349db0aaec86facbbcd141e4c0a1f1ef1134 Mon Sep 17 00:00:00 2001 From: jackchi Date: Tue, 11 Apr 2017 17:00:48 -0700 Subject: [PATCH 2/5] [ICP-598] Adding Enerwave Door/Window Sensor --- .../zwave-door-window-sensor.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 f5c8f8f..4edce26 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 @@ -32,7 +32,7 @@ metadata { 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:"011A", prod:"0601", model:"0903", deviceJoinName: "Enerwave Magnetic Door/Window Sensor" } // simulator metadata From a308bff57403239e0aa1bffadbd8df0b9b4550e6 Mon Sep 17 00:00:00 2001 From: Tom Manley Date: Tue, 11 Apr 2017 23:35:49 -0500 Subject: [PATCH 3/5] arrival-sensor-ha: Read battery level on join In configure we were setting up the battery level to be reported every 20 seconds but we weren't reading the attribute so it would take 20 seconds before the battery level was reported. Now we read it during configure so it is updated right away after join. https://smartthings.atlassian.net/browse/DVCSMP-2568 --- .../arrival-sensor-ha.src/arrival-sensor-ha.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/devicetypes/smartthings/arrival-sensor-ha.src/arrival-sensor-ha.groovy b/devicetypes/smartthings/arrival-sensor-ha.src/arrival-sensor-ha.groovy index 9498e69..c434d3d 100644 --- a/devicetypes/smartthings/arrival-sensor-ha.src/arrival-sensor-ha.groovy +++ b/devicetypes/smartthings/arrival-sensor-ha.src/arrival-sensor-ha.groovy @@ -1,5 +1,5 @@ /** - * Copyright 2016 SmartThings + * Copyright 2017 SmartThings * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at: @@ -59,7 +59,7 @@ def updated() { } def configure() { - def cmds = zigbee.batteryConfig(20, 20, 0x01) + def cmds = zigbee.readAttribute(zigbee.POWER_CONFIGURATION_CLUSTER, 0x0020) + zigbee.batteryConfig(20, 20, 0x01) log.debug "configure -- cmds: ${cmds}" return cmds } @@ -166,4 +166,4 @@ def checkPresenceCallback() { if (timeSinceLastCheckin >= theCheckInterval) { handlePresenceEvent(false) } -} \ No newline at end of file +} From 0f2b8c18d2ff23590326a70f5f251a549687e2a8 Mon Sep 17 00:00:00 2001 From: Vinay Rao Date: Thu, 13 Apr 2017 16:06:49 -0700 Subject: [PATCH 4/5] CELL-139 Hue logging to detect hue pairing --- smartapps/smartthings/hue-connect.src/hue-connect.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/smartapps/smartthings/hue-connect.src/hue-connect.groovy b/smartapps/smartthings/hue-connect.src/hue-connect.groovy index 5ded2b2..b343b20 100644 --- a/smartapps/smartthings/hue-connect.src/hue-connect.groovy +++ b/smartapps/smartthings/hue-connect.src/hue-connect.groovy @@ -73,7 +73,7 @@ def bridgeDiscovery(params = [:]) { } ssdpSubscribe() - + log.trace "bridgeRefreshCount: $bridgeRefreshCount" //bridge discovery request every 15 //25 seconds if ((bridgeRefreshCount % 5) == 0) { discoverBridges() @@ -207,6 +207,7 @@ def bulbDiscovery() { } private discoverBridges() { + log.trace "Sending Hue Discovery message to the hub" sendHubCommand(new physicalgraph.device.HubAction("lan discovery urn:schemas-upnp-org:device:basic:1", physicalgraph.device.Protocol.LAN)) } From 5429986e81346d79a1ac0ce1938c0de8b978aace Mon Sep 17 00:00:00 2001 From: Zach Varberg Date: Mon, 17 Apr 2017 11:30:25 -0500 Subject: [PATCH 5/5] Set level on sengled bulbs configure This works around the sengled bulbs not following the ZCL spec and using the value 0xFF as a valid level (the spec says it should be invalid). It does this by manually setting the level of the bulb to 0xFE (SmartThings 100%) when it is configured, or if it previously had a level set, manually setting it to that value. This avoids the issue of the bulb reporting 0xFF and having the library ignore it because it is an invalid value. This resolves: https://smartthings.atlassian.net/browse/ICP-691 --- .../zigbee-dimmer-power.groovy | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/devicetypes/smartthings/zigbee-dimmer-power.src/zigbee-dimmer-power.groovy b/devicetypes/smartthings/zigbee-dimmer-power.src/zigbee-dimmer-power.groovy index 2579423..2b28b6c 100644 --- a/devicetypes/smartthings/zigbee-dimmer-power.src/zigbee-dimmer-power.groovy +++ b/devicetypes/smartthings/zigbee-dimmer-power.src/zigbee-dimmer-power.groovy @@ -114,9 +114,17 @@ def refresh() { def configure() { log.debug "Configuring Reporting and Bindings." - + def cmds = [] + if (device.getDataValue("manufacturer") == "sengled") { + def startLevel = 0xFE + if ((device.currentState("level")?.value != null)) { + startLevel = Math.round(Integer.parseInt(device.currentState("level").value) * 0xFE / 100) + } + // Level Control Cluster, command Move to Level, level start level, transition time 0 + cmds << zigbee.command(zigbee.LEVEL_CONTROL_CLUSTER, 0x00, sprintf("%02X0000", startLevel)) + } // Device-Watch allows 2 check-in misses from device + ping (plus 1 min lag time) // enrolls with default periodic reporting until newer 5 min interval is confirmed sendEvent(name: "checkInterval", value: 2 * 60 * 60 + 1 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID]) - refresh() + cmds + refresh() }