Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
metadata {
definition (name: "Motion Detector", namespace: "smartthings", author: "SmartThings") {
capability "Actuator"
capability "Configuration"
capability "Health Check"
capability "Motion Sensor"
capability "Sensor"
Expand Down Expand Up @@ -44,6 +43,11 @@ metadata {

def installed() {
initialize()
if(isAuroraMotionSensor51AU()) {
// Aurora Smart PIR Sensor doesn't report when there is no motion during pairing process
// reports are sent only if there is motion detected, so fake event is needed here
sendEvent(name: "motion", value: "inactive", displayed: false)
}
}

def updated() {
Expand Down Expand Up @@ -85,11 +89,9 @@ def parse(String description) {
}

def isTracked() {
return device.getDataValue("model") == "MotionSensor51AU"
return isAuroraMotionSensor51AU()
}

def configure() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This device uses IAS Zone to report motion, right? I expect you need enrollResponse to get it enrolled so wondering why that's not here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my self published DTH i used zigbee.iasZoneConfig(0,60) - enrollResponse() is called inside that method. Anyway, configure() method is removed here, because it doesn't make a difference (it wasn't in original DTH)

log.debug "configure"
return zigbee.configureReporting(zigbee.IAS_ZONE_CLUSTER, zigbee.ATTRIBUTE_IAS_ZONE_STATUS, 0x19, 0, 180, null) +
zigbee.readAttribute(zigbee.IAS_ZONE_CLUSTER, zigbee.ATTRIBUTE_IAS_ZONE_STATUS)
def isAuroraMotionSensor51AU() {
return device.getDataValue("model") == "MotionSensor51AU"
}