Compare commits
39 Commits
PROD_2017.
...
PROD_2017.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75d828202d | ||
|
|
c2dba0caa1 | ||
|
|
9f68ff0608 | ||
|
|
3708e944d6 | ||
|
|
ed0ae5e5bb | ||
|
|
c4a9d88014 | ||
|
|
5408c1671c | ||
|
|
230f699600 | ||
|
|
eb98ab7ba0 | ||
|
|
f6a25e97fe | ||
|
|
441c15f1bb | ||
|
|
132f77045f | ||
|
|
493fd82333 | ||
|
|
f270d5f0c7 | ||
|
|
0f4721b79b | ||
|
|
dcfcb225f1 | ||
|
|
e7237ffbd3 | ||
|
|
63a75c1b25 | ||
|
|
94141713b7 | ||
|
|
c7028efc0c | ||
|
|
1f2a8b6e71 | ||
|
|
b887f25a1f | ||
|
|
0f6e66d544 | ||
|
|
1751a8a5b9 | ||
|
|
00150c76bc | ||
|
|
b5abb6b152 | ||
|
|
b9b4f69bb4 | ||
|
|
9b1f7e1e88 | ||
|
|
35f684f382 | ||
|
|
40dc40f55d | ||
|
|
ebc3ee1ede | ||
|
|
a996caed45 | ||
|
|
484d8dfbb6 | ||
|
|
ea53f11270 | ||
|
|
65d7feac8f | ||
|
|
712f2ad3dd | ||
|
|
ea9daaf18d | ||
|
|
42d1a31d20 | ||
|
|
6f4d689048 |
@@ -39,8 +39,8 @@ metadata {
|
||||
}
|
||||
|
||||
tileAttribute("device.tamper", key:"SECONDARY_CONTROL") {
|
||||
attributeState("active", label:'tamper active', backgroundColor:"#00A0DC")
|
||||
attributeState("inactive", label:'tamper inactive', backgroundColor:"#CCCCCC")
|
||||
attributeState("detected", label:'tampered', backgroundColor:"#00A0DC")
|
||||
attributeState("clear", label:'tamper clear', backgroundColor:"#CCCCCC")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,6 +66,20 @@ metadata {
|
||||
}
|
||||
}
|
||||
|
||||
def installed() {
|
||||
sendEvent(name: "tamper", value: "clear", displayed: false)
|
||||
}
|
||||
|
||||
def updated() {
|
||||
def tamperValue = device.latestValue("tamper")
|
||||
|
||||
if (tamperValue == "active") {
|
||||
sendEvent(name: "tamper", value: "detected", displayed: false)
|
||||
} else if (tamperValue == "inactive") {
|
||||
sendEvent(name: "tamper", value: "clear", displayed: false)
|
||||
}
|
||||
}
|
||||
|
||||
// parse events into attributes
|
||||
def parse(String description) {
|
||||
log.debug "Parsing '${description}'"
|
||||
@@ -129,27 +143,27 @@ def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cm
|
||||
case 22:
|
||||
map.name = "contact"
|
||||
map.value = "open"
|
||||
map.descriptionText = "${device.displayName}: is open"
|
||||
map.descriptionText = "${device.displayName} is open"
|
||||
break
|
||||
|
||||
case 23:
|
||||
map.name = "contact"
|
||||
map.value = "closed"
|
||||
map.descriptionText = "${device.displayName}: is closed"
|
||||
map.descriptionText = "${device.displayName} is closed"
|
||||
break
|
||||
}
|
||||
} else if (cmd.notificationType == 7) {
|
||||
switch (cmd.event) {
|
||||
case 0:
|
||||
map.name = "tamper"
|
||||
map.value = "inactive"
|
||||
map.descriptionText = "${device.displayName}: tamper alarm has been deactivated"
|
||||
map.value = "clear"
|
||||
map.descriptionText = "Tamper alert cleared"
|
||||
break
|
||||
|
||||
case 3:
|
||||
map.name = "tamper"
|
||||
map.value = "active"
|
||||
map.descriptionText = "${device.displayName}: tamper alarm activated"
|
||||
map.value = "detected"
|
||||
map.descriptionText = "Tamper alert: sensor removed or covering opened"
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -229,18 +243,34 @@ def zwaveEvent(physicalgraph.zwave.commands.deviceresetlocallyv1.DeviceResetLoca
|
||||
log.info "${device.displayName}: received command: $cmd - device has reset itself"
|
||||
}
|
||||
|
||||
def zwaveEvent(physicalgraph.zwave.commands.sensorbinaryv2.SensorBinaryReport cmd) {
|
||||
def map = [:]
|
||||
map.value = cmd.sensorValue ? "open" : "closed"
|
||||
map.name = "contact"
|
||||
if (map.value == "open") {
|
||||
map.descriptionText = "${device.displayName} is open"
|
||||
}
|
||||
else {
|
||||
map.descriptionText = "${device.displayName} is closed"
|
||||
}
|
||||
createEvent(map)
|
||||
}
|
||||
|
||||
def zwaveEvent(physicalgraph.zwave.Command cmd) {
|
||||
log.debug "Catchall reached for cmd: $cmd"
|
||||
}
|
||||
|
||||
def configure() {
|
||||
log.debug "Executing 'configure'"
|
||||
|
||||
def cmds = []
|
||||
|
||||
cmds += zwave.wakeUpV2.wakeUpIntervalSet(seconds:21600, nodeid: zwaveHubNodeId)//FGK's default wake up interval
|
||||
cmds += zwave.manufacturerSpecificV2.manufacturerSpecificGet()
|
||||
cmds += zwave.manufacturerSpecificV2.deviceSpecificGet()
|
||||
cmds += zwave.versionV1.versionGet()
|
||||
cmds += zwave.batteryV1.batteryGet()
|
||||
cmds += zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 1, scale: 0)
|
||||
cmds += zwave.associationV2.associationSet(groupingIdentifier:1, nodeId: [zwaveHubNodeId])
|
||||
cmds += zwave.sensorBinaryV2.sensorBinaryGet()
|
||||
cmds += zwave.associationV2.associationSet(groupingIdentifier:1, nodeId: [zwaveHubNodeId])
|
||||
cmds += zwave.wakeUpV2.wakeUpNoMoreInformation()
|
||||
|
||||
encapSequence(cmds, 500)
|
||||
|
||||
@@ -37,8 +37,8 @@ metadata {
|
||||
}
|
||||
|
||||
tileAttribute("device.tamper", key:"SECONDARY_CONTROL") {
|
||||
attributeState("active", label:'tamper active', backgroundColor:"#00A0DC")
|
||||
attributeState("inactive", label:'tamper inactive', backgroundColor:"#CCCCCC")
|
||||
attributeState("detected", label:'tampered', backgroundColor:"#00A0DC")
|
||||
attributeState("clear", label:'tamper clear', backgroundColor:"#CCCCCC")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,20 @@ metadata {
|
||||
}
|
||||
}
|
||||
|
||||
def installed() {
|
||||
sendEvent(name: "tamper", value: "clear", displayed: false)
|
||||
}
|
||||
|
||||
def updated() {
|
||||
def tamperValue = device.latestValue("tamper")
|
||||
|
||||
if (tamperValue == "active") {
|
||||
sendEvent(name: "tamper", value: "detected", displayed: false)
|
||||
} else if (tamperValue == "inactive") {
|
||||
sendEvent(name: "tamper", value: "clear", displayed: false)
|
||||
}
|
||||
}
|
||||
|
||||
// parse events into attributes
|
||||
def parse(String description) {
|
||||
log.debug "Parsing '${description}'"
|
||||
@@ -114,27 +128,27 @@ def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cm
|
||||
case 22:
|
||||
map.name = "contact"
|
||||
map.value = "open"
|
||||
map.descriptionText = "${device.displayName}: is open"
|
||||
map.descriptionText = "${device.displayName} is open"
|
||||
break
|
||||
|
||||
case 23:
|
||||
map.name = "contact"
|
||||
map.value = "closed"
|
||||
map.descriptionText = "${device.displayName}: is closed"
|
||||
map.descriptionText = "${device.displayName} is closed"
|
||||
break
|
||||
}
|
||||
} else if (cmd.notificationType == 7) {
|
||||
switch (cmd.event) {
|
||||
case 0:
|
||||
map.name = "tamper"
|
||||
map.value = "inactive"
|
||||
map.descriptionText = "${device.displayName}: tamper alarm has been deactivated"
|
||||
map.value = "clear"
|
||||
map.descriptionText = "Tamper alert cleared"
|
||||
break
|
||||
|
||||
case 3:
|
||||
map.name = "tamper"
|
||||
map.value = "active"
|
||||
map.descriptionText = "${device.displayName}: tamper alarm activated"
|
||||
map.value = "detected"
|
||||
map.descriptionText = "Tamper alert: sensor removed or covering opened"
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -198,6 +212,23 @@ def zwaveEvent(physicalgraph.zwave.commands.deviceresetlocallyv1.DeviceResetLoca
|
||||
log.info "${device.displayName}: received command: $cmd - device has reset itself"
|
||||
}
|
||||
|
||||
def zwaveEvent(physicalgraph.zwave.commands.sensorbinaryv2.SensorBinaryReport cmd) {
|
||||
def map = [:]
|
||||
map.value = cmd.sensorValue ? "open" : "closed"
|
||||
map.name = "contact"
|
||||
if (map.value == "open") {
|
||||
map.descriptionText = "${device.displayName} is open"
|
||||
}
|
||||
else {
|
||||
map.descriptionText = "${device.displayName} is closed"
|
||||
}
|
||||
createEvent(map)
|
||||
}
|
||||
|
||||
def zwaveEvent(physicalgraph.zwave.Command cmd) {
|
||||
log.debug "Catchall reached for cmd: $cmd"
|
||||
}
|
||||
|
||||
def configure() {
|
||||
log.debug "Executing 'configure'"
|
||||
// Device wakes up every 4 hours, this interval allows us to miss one wakeup notification before marking offline
|
||||
@@ -206,12 +237,11 @@ def configure() {
|
||||
def cmds = []
|
||||
|
||||
cmds += zwave.wakeUpV2.wakeUpIntervalSet(seconds:21600, nodeid: zwaveHubNodeId)//FGK's default wake up interval
|
||||
cmds += zwave.manufacturerSpecificV2.manufacturerSpecificGet()
|
||||
cmds += zwave.manufacturerSpecificV2.deviceSpecificGet()
|
||||
cmds += zwave.versionV1.versionGet()
|
||||
cmds += zwave.batteryV1.batteryGet()
|
||||
cmds += zwave.associationV2.associationSet(groupingIdentifier:1, nodeId: [zwaveHubNodeId])
|
||||
cmds += zwave.wakeUpV2.wakeUpNoMoreInformation()
|
||||
cmds += zwave.sensorBinaryV2.sensorBinaryGet()
|
||||
cmds += zwave.wakeUpV2.wakeUpNoMoreInformation()
|
||||
|
||||
encapSequence(cmds, 500)
|
||||
}
|
||||
|
||||
@@ -39,8 +39,8 @@ metadata {
|
||||
}
|
||||
|
||||
tileAttribute("device.tamper", key:"SECONDARY_CONTROL") {
|
||||
attributeState("active", label:'tamper active', backgroundColor:"#cccccc")
|
||||
attributeState("inactive", label:'tamper inactive', backgroundColor:"#00A0DC")
|
||||
attributeState("detected", label:'tampered', backgroundColor:"#cccccc")
|
||||
attributeState("clear", label:'tamper clear', backgroundColor:"#00A0DC")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,6 +66,20 @@ metadata {
|
||||
}
|
||||
}
|
||||
|
||||
def installed() {
|
||||
sendEvent(name: "tamper", value: "clear", displayed: false)
|
||||
}
|
||||
|
||||
def updated() {
|
||||
def tamperValue = device.latestValue("tamper")
|
||||
|
||||
if (tamperValue == "active") {
|
||||
sendEvent(name: "tamper", value: "detected", displayed: false)
|
||||
} else if (tamperValue == "inactive") {
|
||||
sendEvent(name: "tamper", value: "clear", displayed: false)
|
||||
}
|
||||
}
|
||||
|
||||
// parse events into attributes
|
||||
def parse(String description) {
|
||||
log.debug "Parsing '${description}'"
|
||||
@@ -158,11 +172,6 @@ def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.DeviceSpecifi
|
||||
if (!device.currentState("temperature")) {
|
||||
response_cmds << encap(zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 1, scale: 0))
|
||||
}
|
||||
if (!getDataValue("version") && !zwaveInfo.ver) {
|
||||
log.debug "Requesting Version Report"
|
||||
response_cmds << "delay 500"
|
||||
response_cmds << encap(zwave.versionV1.versionGet())
|
||||
}
|
||||
response_cmds << "delay 1000"
|
||||
response_cmds << encap(zwave.wakeUpV2.wakeUpNoMoreInformation())
|
||||
[[:], response(response_cmds)]
|
||||
@@ -214,14 +223,14 @@ def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cm
|
||||
switch (cmd.event) {
|
||||
case 0:
|
||||
map.name = "tamper"
|
||||
map.value = "inactive"
|
||||
map.descriptionText = "${device.displayName}: tamper alarm has been deactivated"
|
||||
map.value = "clear"
|
||||
map.descriptionText = "Tamper aleart cleared"
|
||||
break
|
||||
|
||||
case 3:
|
||||
map.name = "tamper"
|
||||
map.value = "active"
|
||||
map.descriptionText = "${device.displayName}: tamper alarm activated"
|
||||
map.value = "detected"
|
||||
map.descriptionText = "Tamper alert: sensor removed or covering opened"
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -247,6 +256,10 @@ def zwaveEvent(physicalgraph.zwave.commands.deviceresetlocallyv1.DeviceResetLoca
|
||||
log.info "${device.displayName}: received command: $cmd - device has reset itself"
|
||||
}
|
||||
|
||||
def zwaveEvent(physicalgraph.zwave.Command cmd) {
|
||||
log.debug "Catchall reached for cmd: $cmd"
|
||||
}
|
||||
|
||||
def configure() {
|
||||
log.debug "Executing 'configure'"
|
||||
// Device wakes up every 4 hours, this interval of 8h 2m allows us to miss one wakeup notification before marking offline
|
||||
@@ -259,6 +272,7 @@ def configure() {
|
||||
|
||||
cmds << zwave.associationV2.associationSet(groupingIdentifier:1, nodeId: [zwaveHubNodeId])
|
||||
cmds << zwave.batteryV1.batteryGet() // other queries sent as response to BatteryReport
|
||||
cmds << zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 1)
|
||||
|
||||
encapSequence(cmds, 200)
|
||||
}
|
||||
|
||||
@@ -39,8 +39,8 @@ metadata {
|
||||
}
|
||||
|
||||
tileAttribute("device.tamper", key:"SECONDARY_CONTROL") {
|
||||
attributeState("active", label:'tamper active', backgroundColor:"#00a0dc")
|
||||
attributeState("inactive", label:'tamper inactive', backgroundColor:"#cccccc")
|
||||
attributeState("detected", label:'tampered', backgroundColor:"#00a0dc")
|
||||
attributeState("clear", label:'tamper clear', backgroundColor:"#cccccc")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +70,20 @@ metadata {
|
||||
}
|
||||
}
|
||||
|
||||
def installed() {
|
||||
sendEvent(name: "tamper", value: "clear", displayed: false)
|
||||
}
|
||||
|
||||
def updated() {
|
||||
def tamperValue = device.latestValue("tamper")
|
||||
|
||||
if (tamperValue == "active") {
|
||||
sendEvent(name: "tamper", value: "detected", displayed: false)
|
||||
} else if (tamperValue == "inactive") {
|
||||
sendEvent(name: "tamper", value: "clear", displayed: false)
|
||||
}
|
||||
}
|
||||
|
||||
// parse events into attributes
|
||||
def parse(String description) {
|
||||
log.debug "Parsing '${description}'"
|
||||
@@ -150,26 +164,26 @@ def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cm
|
||||
case 0:
|
||||
if (cmd.eventParameter[0] == 3) {
|
||||
map.name = "tamper"
|
||||
map.value = "inactive"
|
||||
map.descriptionText = "${device.displayName}: tamper alarm has been deactivated"
|
||||
map.value = "clear"
|
||||
map.descriptionText = "Tamper alert cleared"
|
||||
}
|
||||
if (cmd.eventParameter[0] == 8) {
|
||||
map.name = "motion"
|
||||
map.value = "inactive"
|
||||
map.descriptionText = "${device.displayName}: motion has stopped"
|
||||
map.descriptionText = "${device.displayName} motion has stopped"
|
||||
}
|
||||
break
|
||||
|
||||
case 3:
|
||||
map.name = "tamper"
|
||||
map.value = "active"
|
||||
map.descriptionText = "${device.displayName}: tamper alarm activated"
|
||||
map.value = "detected"
|
||||
map.descriptionText = "Tamper alert: sensor removed or covering opened"
|
||||
break
|
||||
|
||||
case 8:
|
||||
map.name = "motion"
|
||||
map.value = "active"
|
||||
map.descriptionText = "${device.displayName}: motion detected"
|
||||
map.descriptionText = "${device.displayName} detected motion"
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -239,6 +253,23 @@ def zwaveEvent(physicalgraph.zwave.commands.deviceresetlocallyv1.DeviceResetLoca
|
||||
log.info "${device.displayName}: received command: $cmd - device has reset itself"
|
||||
}
|
||||
|
||||
def zwaveEvent(physicalgraph.zwave.commands.sensorbinaryv2.SensorBinaryReport cmd) {
|
||||
def map = [:]
|
||||
map.value = cmd.sensorValue ? "active" : "inactive"
|
||||
map.name = "motion"
|
||||
if (map.value == "active") {
|
||||
map.descriptionText = "${device.displayName} detected motion"
|
||||
}
|
||||
else {
|
||||
map.descriptionText = "${device.displayName} motion has stopped"
|
||||
}
|
||||
createEvent(map)
|
||||
}
|
||||
|
||||
def zwaveEvent(physicalgraph.zwave.Command cmd) {
|
||||
log.debug "Catchall reached for cmd: $cmd"
|
||||
}
|
||||
|
||||
def configure() {
|
||||
log.debug "Executing 'configure'"
|
||||
// Device-Watch simply pings if no device events received for 8 hrs & 2 minutes
|
||||
@@ -247,14 +278,13 @@ def configure() {
|
||||
def cmds = []
|
||||
|
||||
cmds += zwave.wakeUpV2.wakeUpIntervalSet(seconds: 7200, nodeid: zwaveHubNodeId)//FGMS' default wake up interval
|
||||
cmds += zwave.manufacturerSpecificV2.manufacturerSpecificGet()
|
||||
cmds += zwave.manufacturerSpecificV2.deviceSpecificGet()
|
||||
cmds += zwave.versionV1.versionGet()
|
||||
cmds += zwave.associationV2.associationSet(groupingIdentifier:1, nodeId:[zwaveHubNodeId])
|
||||
cmds += zwave.batteryV1.batteryGet()
|
||||
cmds += zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 1, scale: 0)
|
||||
cmds += zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 3, scale: 1)
|
||||
cmds += zwave.wakeUpV2.wakeUpNoMoreInformation()
|
||||
cmds += zwave.sensorBinaryV2.sensorBinaryGet()
|
||||
cmds += zwave.wakeUpV2.wakeUpNoMoreInformation()
|
||||
|
||||
encapSequence(cmds, 500)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import groovy.json.JsonOutput
|
||||
import groovy.json.JsonOutput
|
||||
|
||||
/**
|
||||
* Copyright 2015 SmartThings
|
||||
*
|
||||
@@ -36,12 +38,13 @@ metadata {
|
||||
status "button 4 held": "command: 2001, payload: 8D"
|
||||
status "wakeup": "command: 8407, payload: "
|
||||
}
|
||||
tiles {
|
||||
standardTile("button", "device.button", width: 2, height: 2) {
|
||||
state "default", label: "", icon: "st.unknown.zwave.remote-controller", backgroundColor: "#ffffff"
|
||||
tiles(scale: 2) {
|
||||
multiAttributeTile(name: "rich-control") {
|
||||
tileAttribute("device.button", key: "PRIMARY_CONTROL") {
|
||||
attributeState "default", label: ' ', action: "", icon: "st.unknown.zwave.remote-controller", backgroundColor: "#ffffff"
|
||||
}
|
||||
}
|
||||
main "button"
|
||||
details(["button"])
|
||||
childDeviceTiles("outlets")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +57,6 @@ def parse(String description) {
|
||||
if(cmd) results += zwaveEvent(cmd)
|
||||
if(!results) results = [ descriptionText: cmd, displayed: false ]
|
||||
}
|
||||
// log.debug("Parsed '$description' to $results")
|
||||
return results
|
||||
}
|
||||
|
||||
@@ -69,9 +71,16 @@ def zwaveEvent(physicalgraph.zwave.commands.wakeupv1.WakeUpNotification cmd) {
|
||||
|
||||
def buttonEvent(button, held) {
|
||||
button = button as Integer
|
||||
String childDni = "${device.deviceNetworkId}/${button}"
|
||||
def child = childDevices.find{it.deviceNetworkId == childDni}
|
||||
if (!child) {
|
||||
log.error "Child device $childDni not found"
|
||||
}
|
||||
if (held) {
|
||||
child?.sendEvent(name: "button", value: "held", data: [buttonNumber: 1], descriptionText: "$child.displayName was held", isStateChange: true)
|
||||
createEvent(name: "button", value: "held", data: [buttonNumber: button], descriptionText: "$device.displayName button $button was held", isStateChange: true)
|
||||
} else {
|
||||
child?.sendEvent(name: "button", value: "pushed", data: [buttonNumber: 1], descriptionText: "$child.displayName was pushed", isStateChange: true)
|
||||
createEvent(name: "button", value: "pushed", data: [buttonNumber: button], descriptionText: "$device.displayName button $button was pushed", isStateChange: true)
|
||||
}
|
||||
}
|
||||
@@ -113,14 +122,34 @@ def configure() {
|
||||
|
||||
def installed() {
|
||||
initialize()
|
||||
createChildDevices()
|
||||
}
|
||||
|
||||
def updated() {
|
||||
initialize()
|
||||
if (!childDevices) {
|
||||
createChildDevices()
|
||||
}
|
||||
else if (device.label != state.oldLabel) {
|
||||
childDevices.each {
|
||||
def segs = it.deviceNetworkId.split("/")
|
||||
def newLabel = "${device.displayName} button ${segs[-1]}"
|
||||
it.setLabel(newLabel)
|
||||
}
|
||||
state.oldLabel = device.label
|
||||
}
|
||||
}
|
||||
|
||||
def initialize() {
|
||||
// Device only goes OFFLINE when Hub is off
|
||||
sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "zwave", scheme:"untracked"]), displayed: false)
|
||||
sendEvent(name: "numberOfButtons", value: 4)
|
||||
sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "zwave", scheme:"untracked"]), displayed: false)
|
||||
}
|
||||
|
||||
private void createChildDevices() {
|
||||
state.oldLabel = device.label
|
||||
for (i in 1..4) {
|
||||
addChildDevice("Child Button", "${device.deviceNetworkId}/${i}", null,
|
||||
[completedSetup: true, label: "${device.displayName} button ${i}",
|
||||
isComponent: true, componentName: "button$i", componentLabel: "Button $i"])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,14 +60,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])
|
||||
sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
|
||||
|
||||
response(secure(zwave.basicV1.basicGet()))
|
||||
}
|
||||
|
||||
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])
|
||||
sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
|
||||
|
||||
if(!state.sound) state.sound = 1
|
||||
if(!state.volume) state.volume = 3
|
||||
|
||||
34
devicetypes/smartthings/child-button.src/child-button.groovy
Normal file
34
devicetypes/smartthings/child-button.src/child-button.groovy
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Child Button
|
||||
*
|
||||
* 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:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
|
||||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing permissions and limitations under the License.
|
||||
*
|
||||
*/
|
||||
metadata {
|
||||
definition (name: "Child Button", namespace: "smartthings", author: "SmartThings") {
|
||||
capability "Button"
|
||||
capability "Holdable Button"
|
||||
capability "Sensor"
|
||||
}
|
||||
|
||||
tiles(scale: 2) {
|
||||
multiAttributeTile(name: "rich-control") {
|
||||
tileAttribute("device.button", key: "PRIMARY_CONTROL") {
|
||||
attributeState "default", label: ' ', action: "", icon: "st.unknown.zwave.remote-controller", backgroundColor: "#ffffff"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def installed() {
|
||||
sendEvent(name: "numberOfButtons", value: 1)
|
||||
}
|
||||
@@ -87,6 +87,8 @@ 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])
|
||||
|
||||
response(refresh())
|
||||
}
|
||||
|
||||
def updated(){
|
||||
|
||||
@@ -169,6 +169,15 @@ def zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv5.SensorMultilevelR
|
||||
map
|
||||
}
|
||||
|
||||
def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd)
|
||||
{
|
||||
def map = [:]
|
||||
map.name = "water"
|
||||
map.value = cmd.value ? "wet" : "dry"
|
||||
map.descriptionText = "${device.displayName} is ${map.value}"
|
||||
map
|
||||
}
|
||||
|
||||
def getTemperature(value) {
|
||||
if(location.temperatureScale == "C"){
|
||||
return value
|
||||
|
||||
@@ -34,6 +34,9 @@ metadata {
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008", outClusters: "0003, 0006, 0008, 0019, 0406", manufacturer: "Leviton", model: "DL6HD", deviceJoinName: "Leviton Dimmer Switch"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008", outClusters: "0003, 0006, 0008, 0019, 0406", manufacturer: "Leviton", model: "DL3HL", deviceJoinName: "Leviton Lumina RF Plug-In Dimmer"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008", outClusters: "0003, 0006, 0008, 0019, 0406", manufacturer: "Leviton", model: "DL1KD", deviceJoinName: "Leviton Lumina RF Dimmer Switch"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, 0B05, FC01, FC08", outClusters: "0003, 0019", manufacturer: "LEDVANCE", model: "A19 W 10 year", deviceJoinName: "SYLVANIA Smart 10Y A19 Soft White"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B05, FC01", outClusters: "0003, 0019", manufacturer: "LEDVANCE", model: "BR30 W 10 year", deviceJoinName: "SYLVANIA Smart 10Y BR30 Soft White"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B05, FC01", outClusters: "0003, 0019", manufacturer: "LEDVANCE", model: "PAR38 W 10 year", deviceJoinName: "SYLVANIA Smart 10Y PAR38 Soft White"
|
||||
}
|
||||
|
||||
tiles(scale: 2) {
|
||||
@@ -137,4 +140,4 @@ def configure() {
|
||||
|
||||
// OnOff minReportTime 0 seconds, maxReportTime 5 min. Reporting interval if no activity
|
||||
refresh() + zigbee.onOffConfig(0, 300) + zigbee.levelConfig()
|
||||
}
|
||||
}
|
||||
@@ -40,6 +40,9 @@ metadata {
|
||||
fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0008,0300,0B04,FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "LIGHTIFY BR RGBW", deviceJoinName: "SYLVANIA Smart BR30 RGBW"
|
||||
fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0008,0300,0B04,FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "LIGHTIFY RT RGBW", deviceJoinName: "SYLVANIA Smart RT5/6 RGBW"
|
||||
fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0008,0300,0B04,FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "LIGHTIFY FLEX OUTDOOR RGBW", deviceJoinName: "SYLVANIA Smart Outdoor RGBW Flex"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B05, FC01, FC08", outClusters: "0003, 0019", manufacturer: "LEDVANCE", model: "RT HO RGBW", deviceJoinName: "SYLVANIA Smart RT HO RGBW"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B05, FC01", outClusters: "0019", manufacturer: "LEDVANCE", model: "A19 RGBW", deviceJoinName: "SYLVANIA Smart A19 RGBW"
|
||||
|
||||
}
|
||||
|
||||
// UI tile definitions
|
||||
@@ -230,4 +233,4 @@ def installed() {
|
||||
sendEvent(name: "level", value: 100)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,13 @@ metadata {
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "LIGHTIFY A19 Tunable White", deviceJoinName: "SYLVANIA Smart A19 Tunable White"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "Classic B40 TW - LIGHTIFY", deviceJoinName: "OSRAM LIGHTIFY Classic B40 Tunable White"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0702, 0B05", outClusters: "0019", manufacturer: "sengled", model: "Z01-A19NAE26", deviceJoinName: "Sengled Element plus"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, 0B05, FC01, FC08", outClusters: "0003, 0019", manufacturer: "LEDVANCE", model: "A19 TW 10 year", deviceJoinName: "SYLVANIA Smart 10Y A19 TW"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "LIGHTIFY Conv Under Cabinet TW", deviceJoinName: "SYLVANIA Smart Convertible Under Cabinet"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "ColorstripRGBW", deviceJoinName: "SYLVANIA Smart Convertible Under Cabinet"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "LIGHTIFY Edge-lit Flushmount TW", deviceJoinName: "SYLVANIA Smart Edge-lit Flushmount TW"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B05, FC01", outClusters: "0003, 0019", manufacturer: "LEDVANCE", model: "MR16 TW", deviceJoinName: "SYLVANIA Smart MR16 Tunable White"
|
||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "LIGHTIFY Surface TW", deviceJoinName: "SYLVANIA Smart Surface Tunable White"
|
||||
|
||||
}
|
||||
|
||||
// UI tile definitions
|
||||
@@ -185,4 +192,4 @@ def installed() {
|
||||
sendEvent(name: "level", value: 100)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,7 @@ metadata {
|
||||
//fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 1000", outClusters: "0000,0019", manufacturer: "CREE", model: "Connected A-19 60W Equivalent", deviceJoinName: "Cree Connected Bulb"
|
||||
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 1000, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "Classic A60 W clear", deviceJoinName: "OSRAM LIGHTIFY LED Smart Connected Light"
|
||||
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 1000, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "Classic A60 W clear - LIGHTIFY", deviceJoinName: "OSRAM LIGHTIFY LED Smart Connected Light"
|
||||
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 1000, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "CLA60 OFD OSRAM", deviceJoinName: "OSRAM LIGHTIFY LED Classic A60 Dimming"
|
||||
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 1000", outClusters: "0019", manufacturer: "Philips", model: "LWB006", deviceJoinName: "Philips Hue White"
|
||||
}
|
||||
|
||||
|
||||
@@ -29,9 +29,11 @@ metadata {
|
||||
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 1000", outClusters: "0019"
|
||||
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 1000", outClusters: "0019", "manufacturer":"OSRAM", "model":"Classic A60 RGBW", deviceJoinName: "OSRAM LIGHTIFY LED Classic A60 RGBW"
|
||||
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "PAR 16 50 RGBW - LIGHTIFY", deviceJoinName: "OSRAM LIGHTIFY RGBW PAR 16 50"
|
||||
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 1000, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "CLA60 RGBW OSRAM", deviceJoinName: "OSRAM LIGHTIFY LED Classic A60 RGBW"
|
||||
fingerprint profileId: "C05E", inClusters: "0000,0003,0004,0005,0006,0008,0300,1000,FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "Flex RGBW", deviceJoinName: "OSRAM LIGHTIFY Flex RGBW"
|
||||
fingerprint profileId: "C05E", inClusters: "0000,0003,0004,0005,0006,0008,0300,1000,FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "Gardenpole RGBW-Lightify", deviceJoinName: "OSRAM LIGHTIFY Gardenpole RGBW"
|
||||
fingerprint profileId: "C05E", inClusters: "0000,0003,0004,0005,0006,0008,0300,1000,FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "LIGHTIFY Outdoor Flex RGBW", deviceJoinName: "OSRAM LIGHTIFY Outdoor Flex RGBW"
|
||||
fingerprint profileId: "C05E", inClusters: "0000,0003,0004,0005,0006,0008,0300,1000,FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "LIGHTIFY Indoor Flex RGBW", deviceJoinName: "OSRAM LIGHTIFY Indoor Flex RGBW"
|
||||
}
|
||||
|
||||
// UI tile definitions
|
||||
|
||||
@@ -33,6 +33,7 @@ metadata {
|
||||
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 1000, 0B04, FC0F", outClusters: "0019", "manufacturer":"OSRAM", "model":"Classic A60 TW", deviceJoinName: "OSRAM LIGHTIFY LED Classic A60 Tunable White"
|
||||
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 1000, FC0F", outClusters: "0019", "manufacturer":"OSRAM", "model":"PAR16 50 TW", deviceJoinName: "OSRAM LIGHTIFY LED PAR16 50 Tunable White"
|
||||
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 1000, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "Classic B40 TW - LIGHTIFY", deviceJoinName: "OSRAM LIGHTIFY Classic B40 Tunable White"
|
||||
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 0300, 1000, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "CLA60 TW OSRAM", deviceJoinName: "OSRAM LIGHTIFY LED Classic A60 Tunable White"
|
||||
}
|
||||
|
||||
// UI tile definitions
|
||||
|
||||
@@ -80,12 +80,12 @@ 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])
|
||||
sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
|
||||
}
|
||||
|
||||
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])
|
||||
sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
|
||||
}
|
||||
|
||||
def getCommandClassVersions() {
|
||||
|
||||
@@ -63,12 +63,12 @@ metadata {
|
||||
|
||||
def installed(){
|
||||
// Device-Watch simply pings if no device events received for checkInterval duration of 32min = 2 * 15min + 2min lag time
|
||||
sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
|
||||
sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
|
||||
}
|
||||
|
||||
def updated(){
|
||||
// Device-Watch simply pings if no device events received for checkInterval duration of 32min = 2 * 15min + 2min lag time
|
||||
sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
|
||||
sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
|
||||
}
|
||||
|
||||
def getCommandClassVersions() {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -370,6 +370,7 @@ public def start(source) {
|
||||
setLevelsInState()
|
||||
|
||||
atomicState.running = true
|
||||
atomicState.runCounter = 0
|
||||
|
||||
atomicState.start = new Date().getTime()
|
||||
|
||||
@@ -384,6 +385,7 @@ public def stop(source) {
|
||||
|
||||
atomicState.running = false
|
||||
atomicState.start = 0
|
||||
atomicState.runCounter = 0
|
||||
|
||||
unschedule("healthCheck")
|
||||
}
|
||||
@@ -519,14 +521,24 @@ private increment() {
|
||||
return
|
||||
}
|
||||
|
||||
if (atomicState.runCounter == null) {
|
||||
atomicState.runCounter = 1
|
||||
} else {
|
||||
atomicState.runCounter = atomicState.runCounter + 1
|
||||
}
|
||||
def percentComplete = completionPercentage()
|
||||
|
||||
if (percentComplete > 99) {
|
||||
percentComplete = 99
|
||||
}
|
||||
|
||||
updateDimmers(percentComplete)
|
||||
|
||||
if (atomicState.runCounter > 100) {
|
||||
log.error "Force stopping Gentle Wakeup due to too many increments"
|
||||
// If increment has already been called 100 times, then stop regardless of state
|
||||
percentComplete = 100
|
||||
} else {
|
||||
updateDimmers(percentComplete)
|
||||
}
|
||||
if (percentComplete < 99) {
|
||||
|
||||
def runAgain = stepDuration()
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
* ---------------------+----------------+--------------------------+------------------------------------
|
||||
*/
|
||||
|
||||
include 'asynchttp_v1'
|
||||
|
||||
definition(
|
||||
name: "IFTTT",
|
||||
namespace: "smartthings",
|
||||
@@ -251,7 +249,9 @@ def deviceHandler(evt) {
|
||||
def deviceInfo = state[evt.deviceId]
|
||||
if (deviceInfo) {
|
||||
try {
|
||||
asynchttp_v1.post([uri: deviceInfo.callbackUrl, path: '', body: [evt: [deviceId: evt.deviceId, name: evt.name, value: evt.value]]])
|
||||
httpPostJson(uri: deviceInfo.callbackUrl, path: '', body: [evt: [deviceId: evt.deviceId, name: evt.name, value: evt.value]]) {
|
||||
log.debug "[PROD IFTTT] Event data successfully posted"
|
||||
}
|
||||
} catch (groovyx.net.http.ResponseParseException e) {
|
||||
log.debug("Error parsing ifttt payload ${e}")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user