Skip to content
Open
Show file tree
Hide file tree
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 @@ -41,6 +41,7 @@ metadata {
command "keyD"
command "chime"
command "bypass"
command "soundSiren"
}

tiles(scale: 2) {
Expand Down Expand Up @@ -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
}
}

Expand Down Expand Up @@ -216,6 +218,18 @@ def keyD() {
sendPartitionCommand('speedkey/D')
}

def soundSiren() {
sendPartitionCommand('speedkey/${settings.sirenKey}')
}

def both() {
soundSiren()
}

def siren() {
soundSiren()
}

def getPrettyName()
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down Expand Up @@ -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) {
Expand Down