diff --git a/devicetypes/redloro-smartthings/honeywell-partition.src/honeywell-partition.groovy b/devicetypes/redloro-smartthings/honeywell-partition.src/honeywell-partition.groovy index 5fe158a..ee10fbf 100644 --- a/devicetypes/redloro-smartthings/honeywell-partition.src/honeywell-partition.groovy +++ b/devicetypes/redloro-smartthings/honeywell-partition.src/honeywell-partition.groovy @@ -41,6 +41,7 @@ metadata { command "keyD" command "chime" command "bypass" + command "soundSiren" } tiles(scale: 2) { @@ -128,6 +129,7 @@ metadata { preferences { input name: "bypassZones", type: "text", title: "Bypass Zones", description: "Comma delimited list of zones to bypass", required: false + input name: "sirenKey", type: "text", title: "Siren Key", description: "Speedy Key (ABCD) to trigger to sound siren", required: false } } @@ -216,6 +218,18 @@ def keyD() { sendPartitionCommand('speedkey/D') } +def soundSiren() { + sendPartitionCommand('speedkey/${settings.sirenKey}') +} + +def both() { + soundSiren() +} + +def siren() { + soundSiren() +} + def getPrettyName() { return [ diff --git a/smartapps/redloro-smartthings/honeywell-security.src/honeywell-security.groovy b/smartapps/redloro-smartthings/honeywell-security.src/honeywell-security.groovy index e911d17..ce489af 100644 --- a/smartapps/redloro-smartthings/honeywell-security.src/honeywell-security.groovy +++ b/smartapps/redloro-smartthings/honeywell-security.src/honeywell-security.groovy @@ -81,6 +81,9 @@ def page1() { section("Smart Home Monitor") { input "enableSHM", "bool", title: "Integrate with Smart Home Monitor", required: true, defaultValue: true + input "armStaySHM", "capability.switch", title: "SHM Arm Stay virtual switch", required: true + input "armAwaySHM", "capability.switch", title: "SHM Arm Away virtual switch", required: true + input "disarmSHM", "capability.switch", title: "SHM Disarm virtual switch", required: true } section("Logging") { @@ -364,13 +367,34 @@ private updateAlarmSystemStatus(partitionstatus) { def lastAlarmSystemStatus = state.alarmSystemStatus if (partitionstatus == "armedstay" || partitionstatus == "armedinstant") { - state.alarmSystemStatus = "stay" + //state.alarmSystemStatus = "stay" + if (armStaySHM.latestState("switch").value == "on") { + //already armed + } else { + armStaySHM.on() + armAwaySHM.off() + disarmSHM.off() + } } if (partitionstatus == "armedaway" || partitionstatus == "armedmax") { - state.alarmSystemStatus = "away" + //state.alarmSystemStatus = "away" + if (armAwaySHM.latestState("switch").value == "on") { + //already armed + } else { + armStaySHM.off() + armAwaySHM.on() + disarmSHM.off() + } } if (partitionstatus == "ready") { - state.alarmSystemStatus = "off" + //state.alarmSystemStatus = "off" + if (disarmSHM.latestState("switch").value == "on") { + //already disarmed + } else { + armStaySHM.off() + armAwaySHM.off() + disarmSHM.on() + } } if (lastAlarmSystemStatus != state.alarmSystemStatus) {