mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-14 13:11:52 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43912b75bd | ||
|
|
82d57a9f0f |
@@ -24,7 +24,10 @@ metadata {
|
|||||||
capability "Temperature Measurement"
|
capability "Temperature Measurement"
|
||||||
capability "Health Check"
|
capability "Health Check"
|
||||||
|
|
||||||
fingerprint deviceId: "0x0701", inClusters: "0x5E, 0x20, 0x86, 0x72, 0x5A, 0x59, 0x85, 0x73, 0x84, 0x80, 0x71, 0x56, 0x70, 0x31, 0x8E, 0x22, 0x30, 0x9C, 0x98, 0x7A", outClusters: ""
|
fingerprint deviceId: "0x0701", inClusters: "0x5E, 0x20, 0x86, 0x72, 0x5A, 0x59, 0x85, 0x73, 0x84, 0x80, 0x71, 0x56, 0x70, 0x31, 0x8E, 0x22, 0x30, 0x9C, 0x98, 0x7A", outClusters: ""
|
||||||
|
|
||||||
|
fingerprint mfr:"010F", prod:"0801", model:"2001"
|
||||||
|
fingerprint mfr:"010F", prod:"0801", model:"1001"
|
||||||
}
|
}
|
||||||
|
|
||||||
simulator {
|
simulator {
|
||||||
|
|||||||
@@ -47,14 +47,14 @@
|
|||||||
capability "Sensor"
|
capability "Sensor"
|
||||||
capability "Battery"
|
capability "Battery"
|
||||||
capability "Health Check"
|
capability "Health Check"
|
||||||
|
command "resetParams2StDefaults"
|
||||||
|
command "listCurrentParams"
|
||||||
|
command "updateZwaveParam"
|
||||||
|
command "test"
|
||||||
|
command "configure"
|
||||||
|
|
||||||
command "resetParams2StDefaults"
|
fingerprint mfr:"010F", prod:"0800", model:"2001"
|
||||||
command "listCurrentParams"
|
fingerprint mfr:"010F", prod:"0800", model:"1001"
|
||||||
command "updateZwaveParam"
|
|
||||||
command "test"
|
|
||||||
command "configure"
|
|
||||||
|
|
||||||
fingerprint deviceId: "0x2001", inClusters: "0x30,0x84,0x85,0x80,0x8F,0x56,0x72,0x86,0x70,0x8E,0x31,0x9C,0xEF,0x30,0x31,0x9C"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
simulator {
|
simulator {
|
||||||
|
|||||||
@@ -152,6 +152,10 @@ def zwaveEvent(physicalgraph.zwave.commands.securityv1.SecurityCommandsSupported
|
|||||||
|
|
||||||
def zwaveEvent(DoorLockOperationReport cmd) {
|
def zwaveEvent(DoorLockOperationReport cmd) {
|
||||||
def result = []
|
def result = []
|
||||||
|
|
||||||
|
unschedule(followupStateCheck)
|
||||||
|
unschedule(stateCheck)
|
||||||
|
|
||||||
def map = [ name: "lock" ]
|
def map = [ name: "lock" ]
|
||||||
if (cmd.doorLockMode == 0xFF) {
|
if (cmd.doorLockMode == 0xFF) {
|
||||||
map.value = "locked"
|
map.value = "locked"
|
||||||
@@ -365,7 +369,7 @@ def zwaveEvent(UserCodeReport cmd) {
|
|||||||
code = state["set$name"] ?: decrypt(state[name]) ?: "****"
|
code = state["set$name"] ?: decrypt(state[name]) ?: "****"
|
||||||
state.remove("set$name".toString())
|
state.remove("set$name".toString())
|
||||||
} else {
|
} else {
|
||||||
map = [ name: "codeReport", value: cmd.userIdentifier, data: [ code: code ] ]
|
map = [ name: "codeReport", value: cmd.userIdentifier, data: [ code: code ], isStateChange: true ]
|
||||||
map.descriptionText = "$device.displayName code $cmd.userIdentifier is set"
|
map.descriptionText = "$device.displayName code $cmd.userIdentifier is set"
|
||||||
map.displayed = (cmd.userIdentifier != state.requestCode && cmd.userIdentifier != state.pollCode)
|
map.displayed = (cmd.userIdentifier != state.requestCode && cmd.userIdentifier != state.pollCode)
|
||||||
map.isStateChange = true
|
map.isStateChange = true
|
||||||
@@ -456,11 +460,12 @@ def zwaveEvent(physicalgraph.zwave.commands.timev1.TimeGet cmd) {
|
|||||||
def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd) {
|
||||||
// The old Schlage locks use group 1 for basic control - we don't want that, so unsubscribe from group 1
|
// The old Schlage locks use group 1 for basic control - we don't want that, so unsubscribe from group 1
|
||||||
def result = [ createEvent(name: "lock", value: cmd.value ? "unlocked" : "locked") ]
|
def result = [ createEvent(name: "lock", value: cmd.value ? "unlocked" : "locked") ]
|
||||||
result << response(zwave.associationV1.associationRemove(groupingIdentifier:1, nodeId:zwaveHubNodeId))
|
def cmds = [
|
||||||
if (state.assoc != zwaveHubNodeId) {
|
zwave.associationV1.associationRemove(groupingIdentifier:1, nodeId:zwaveHubNodeId).format(),
|
||||||
result << response(zwave.associationV1.associationGet(groupingIdentifier:2))
|
"delay 1200",
|
||||||
}
|
zwave.associationV1.associationGet(groupingIdentifier:2).format()
|
||||||
result
|
]
|
||||||
|
[result, response(cmds)]
|
||||||
}
|
}
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
|
||||||
@@ -530,11 +535,18 @@ def unlockwtimeout() {
|
|||||||
lockAndCheck(DoorLockOperationSet.DOOR_LOCK_MODE_DOOR_UNSECURED_WITH_TIMEOUT)
|
lockAndCheck(DoorLockOperationSet.DOOR_LOCK_MODE_DOOR_UNSECURED_WITH_TIMEOUT)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* PING is used by Device-Watch in attempt to reach the Device
|
|
||||||
* */
|
|
||||||
def ping() {
|
def ping() {
|
||||||
refresh()
|
runIn(30, followupStateCheck)
|
||||||
|
secure(zwave.doorLockV1.doorLockOperationGet())
|
||||||
|
}
|
||||||
|
|
||||||
|
def followupStateCheck() {
|
||||||
|
runEvery1Hour(stateCheck)
|
||||||
|
stateCheck()
|
||||||
|
}
|
||||||
|
|
||||||
|
def stateCheck() {
|
||||||
|
sendHubCommand(new physicalgraph.device.HubAction(secure(zwave.doorLockV1.doorLockOperationGet())))
|
||||||
}
|
}
|
||||||
|
|
||||||
def refresh() {
|
def refresh() {
|
||||||
|
|||||||
Reference in New Issue
Block a user