From f45ab690455b113c09fbd352166b7690376ec451 Mon Sep 17 00:00:00 2001 From: Tom Manley Date: Wed, 1 Mar 2017 00:32:52 -0600 Subject: [PATCH 1/2] smartsense-motion-sensor: fix motion event reporting for some devices The motion event reporting for any device that used the Occupancy Sensor cluster for reporting motion was broken. I'm not sure if any devices using this DTH actually use this cluster. I think all the officially supported devices report motion throug the IAS Zone cluster. https://smartthings.atlassian.net/browse/DVCSMP-2484 --- .../smartsense-motion-sensor.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 a93e927..362d1b8 100644 --- a/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy +++ b/devicetypes/smartthings/smartsense-motion-sensor.src/smartsense-motion-sensor.groovy @@ -107,8 +107,8 @@ def parse(String description) { } } else if (descMap.clusterInt == 0x0406 && descMap.attrInt == 0x0000) { def value = descMap.value.endsWith("01") ? "active" : "inactive" - log.warn "Doing a read attr motion event" - resultMap = getMotionResult(value) + log.debug "Doing a read attr motion event" + map = getMotionResult(value) } } } From 1ed57aab454ea34177e0539de295db0ece7a142e Mon Sep 17 00:00:00 2001 From: Vinay Rao Date: Wed, 1 Mar 2017 11:01:00 -0800 Subject: [PATCH 2/2] Revert "MSA-1408: initial submission for Curb" --- .../curb-control.src/curb-control.groovy | 103 ------------------ 1 file changed, 103 deletions(-) delete mode 100644 smartapps/curb-v2/curb-control.src/curb-control.groovy diff --git a/smartapps/curb-v2/curb-control.src/curb-control.groovy b/smartapps/curb-v2/curb-control.src/curb-control.groovy deleted file mode 100644 index f098bc9..0000000 --- a/smartapps/curb-v2/curb-control.src/curb-control.groovy +++ /dev/null @@ -1,103 +0,0 @@ -/** - * Curb Control - * - * Copyright 2016 Savanni D'Gerinel - * - */ -definition( - name: "Curb Control", - namespace: "curb-v2", - author: "Savanni D'Gerinel", - description: "Control point for Curb/SmartThings integration", - category: "Green Living", - iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png", - iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png", - iconX3Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png", - oauth: true) - - -preferences { - section("Allow Endpoint to Control These Things...") { - input "switches", "capability.switch", title: "Which Switches?", multiple: true, required: false - } -} - -mappings { - - path("/switches") { - action: [ - GET: "listSwitches" - ] - } - path("/switches/:id") { - action: [ - GET: "showSwitch" - ] - } - path("/switches/:id/:command") { - action: [ - PUT: "updateSwitch" - ] - } -} - -def installed() {} - -def updated() {} - - -//switches -def listSwitches() { - switches.collect{device(it,"switch")} -} - -def showSwitch() { - show(switches, "switch") -} -void updateSwitch() { - update(switches) -} - - -def deviceHandler(evt) {} - -private void update(devices) { - log.debug "update, request: params: ${params}, devices: $devices.id" - - - //def command = request.JSON?.command - def command = params.command - //let's create a toggle option here - if (command) - { - def device = devices.find { it.id == params.id } - if (!device) { - httpError(404, "Device not found") - } else { - if(command == "toggle") - { - if(device.currentValue('switch') == "on") - device.off(); - else - device.on();; - } - } - } -} - -private show(devices, type) { - def device = devices.find { it.id == params.id } - if (!device) { - httpError(404, "Device not found") - } - else { - def attributeName = type == "motionSensor" ? "motion" : type - def s = device.currentState(attributeName) - [id: device.id, label: device.displayName, value: s?.value, unitTime: s?.date?.time, type: type] - } -} - - -private device(it, type) { - it ? [id: it.id, label: it.label, type: type] : null -}