Hubitat® Safety Monitor Interface
Contents
Overview
Hubitat® Safety Monitor (HSM) uses Hubitat Location Events to communicate with other apps. It reports its state using an event named hsmStatus, and custom monitoring rule arming/disarming with hsmRules. It reports alert events with an event named hsmAlert. Apps can set the arm/disarm state of HSM with an event named hsmSetArm.
HSM events and their values
hsmStatus
- armedAway
- Intrusion alerts for Away are armed
- armingAway
- Intrusion Away arming pending exit delay
- Note: For "armingAway", the number of seconds for exit delay is in the event data map as seconds.
- armedHome
- Intrusion alerts for Home are armed
- armingHome
- Intrusion Home arming pending exit delay
- armedNight
- Intrusion alerts for Night are armed
- armingNight
- Intrusion Night arming pending exit delay
- disarmed
- Intrusion alerts are disarmed
- allDisarmed
- Intrusion, smoke, water and custom alerts are disarmed
hsmRules
- armedRule
- descriptionText = Name of HSM Monitoring Rule armed
- disarmedRule
- descriptionText = Name of HSM Monitoring Rule disarmed
hsmAlert
- intrusion
- Intrusion Away alert
- intrusion-home
- Intrusion Home alert
- intrusion-night
- Intrusion Night alert
- smoke
- Smoke alert
- water
- Water alert
- rule
- descriptionText = Name of HSM Monitoring Rule alert
- cancel
- Alerts cancelled
- arming
- Failed to arm due to open contact
hsmSetArm
- armAway
- Arm intrusion alerts for Away
- armHome
- Arm intrusion alerts for Home
- armNight
- Arm intrusion alerts for Night
- disarm
- Disarm intrusion alerts
- disarmAll
- Disarm all alerts, including HSM Monitoring Rules
- armAll
- Arm alerts for smoke, water and all HSM Monitoring Rules
- CancelAlerts
- Stop all in progress alerts
Examples
App subscribes to HSM status
subscribe (location, “hsmStatus”, statusHandler)
App subscribes to HSM Alerts
subscribe (location, “hsmAlerts”, alertHandler)
App arms HSM
sendLocationEvent (name: “hsmSetArm”, value: “armAway”)
Handler example for HSM alerts
def alertHandler(evt) {
log.info “HSM Alert: $evt.value“ + (evt.value == “rule” ? ”, $evt.descriptionText” : “”)
// only has descriptionText for rule alert
}