From a2baa37901662d226739de0a0156761bb884185a Mon Sep 17 00:00:00 2001 From: Duncan McKee Date: Wed, 6 Jul 2016 17:08:15 -0400 Subject: [PATCH 1/2] DVCSMP-1879 Fix error in Z-Wave Door/Window Sensor throwing exceptions on update --- .../zwave-door-window-sensor.groovy | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 870f106..6a88c27 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 @@ -28,7 +28,6 @@ metadata { fingerprint deviceId: "0x0701", inClusters: "0x5E,0x98" 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 deviceId: "0x0701", inClusters: "0x5E,0x72,0x5A,0x80,0x73,0x84,0x85,0x59,0x71,0x70,0x7A,0x98" // Vision door/window } // simulator metadata @@ -83,12 +82,12 @@ def updated() { cmds = [ command(zwave.manufacturerSpecificV2.manufacturerSpecificGet()), "delay 1200", - zwave.wakeUpV1.wakeUpNoMoreInformation() + zwave.wakeUpV1.wakeUpNoMoreInformation().format() ] } else if (!state.lastbat) { cmds = [] } else { - cmds = [zwave.wakeUpV1.wakeUpNoMoreInformation()] + cmds = [zwave.wakeUpV1.wakeUpNoMoreInformation().format()] } response(cmds) } From d85566bb9814cf5e5aa28228dbf7446d20972f03 Mon Sep 17 00:00:00 2001 From: rappleg Date: Sun, 10 Jul 2016 15:35:12 -0500 Subject: [PATCH 2/2] PRP-172 Fix Hue Connect parse errors on newer versions of Groovy --- .../smartthings/hue-connect.src/hue-connect.groovy | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/smartapps/smartthings/hue-connect.src/hue-connect.groovy b/smartapps/smartthings/hue-connect.src/hue-connect.groovy index d3381f9..3a3b42e 100644 --- a/smartapps/smartthings/hue-connect.src/hue-connect.groovy +++ b/smartapps/smartthings/hue-connect.src/hue-connect.groovy @@ -689,7 +689,7 @@ def parse(childDevice, description) { log.warn "Parsing Body failed - trying again..." poll() } - if (body instanceof java.util.HashMap) { + if (body instanceof java.util.Map) { //poll response def bulbs = getChildDevices() for (bulb in body) { @@ -830,22 +830,22 @@ def setColorTemperature(childDevice, huesettings) { def setColor(childDevice, huesettings) { log.debug "Executing 'setColor($huesettings)'" - + def value = [:] def hue = null def sat = null def xy = null - + if (huesettings.hex != null) { value.xy = getHextoXY(huesettings.hex) } else { if (huesettings.hue != null) value.hue = Math.min(Math.round(huesettings.hue * 65535 / 100), 65535) - if (huesettings.saturation != null) + if (huesettings.saturation != null) value.sat = Math.min(Math.round(huesettings.saturation * 255 / 100), 255) } - - // Default behavior is to turn light on + + // Default behavior is to turn light on value.on = true if (huesettings.level != null) { @@ -853,7 +853,7 @@ def setColor(childDevice, huesettings) { value.on = false else if (huesettings.level == 1) value.bri = 1 - else + else value.bri = Math.min(Math.round(huesettings.level * 255 / 100), 255) } value.alert = huesettings.alert ? huesettings.alert : "none"