How to set Smart Home Monitor status from SmartApp

Is it possible to change the Smart Home Monitor status from a SmartApp? I am currently using a custom SmartApp which activates on a specific mode and runs a specific routine, which sets the SHM status. I would prefer to do this in the SmartApp code instead of having these extra SmartApps and Routines, but I dont see any documentation about Smart Home Monitor. Is this possible?

It’s not documented yet but these work.

sendLocationEvent(name: "alarmSystemStatus", value: "away")
sendLocationEvent(name: "alarmSystemStatus", value: "stay")
sendLocationEvent(name: "alarmSystemStatus", value: "off")

Awesome, that does indeed work! On a related note, do you know if it is possible to subscribe to changes in SHM so I can keep the SmartApp and SHM in sync?

1 Like

Arm state change should be:

subscribe(location, "alarmSystemStatus", alarmHandler)

def alarmHandler(evt) {
  log.debug "Alarm Handler value: ${evt.value}"
  log.debug "alarm state: ${location.currentState("alarmSystemStatus")?.value}"

@AndyRawson is this something that still works, and can it be used in a device handler? I wanted to add the lines so that when I arm/disarm/arm stay my home alarm, it changes the state in SHM to match since it seems SHM can affect your phone’s presence status.

No it can’t / doesn’t… What are experiencing??

Hmmm, weird. I’m noticing that while I’m at work (Approx 12 miles from my geo fence), I keep getting set to “Home” somehow because my “I left the house” rule in Rule Machine keeps firing every few hours. Incidentally, I always look at the SHM when I load the app and it says “Disarmed,” even though it gets “armed” as part of the leave home rule.

I initially wasn’t sure it was related to rule machine. Maybe I have gremlins?

I haven’t checked lately but I believe it still works. Here is the uncommitted SHM developer documentation page. This usage is of course officially unsupported and could be changed any time.

1 Like

SHM is a known gremlin still…

So I had gathered! Since I just got everything setup, it’s hard to know where to point the finger sometimes :-p

1 Like

Yup… But it’s not hard to know which finger to point :speak_no_evil:.

1 Like

looks like the event does no longer have the name: alarmSystemStatus or Security… did someone find out the new name?

just for the record, this is what I used:

Nothing has changed that we are aware of. SHM works from ActionTiles as it always has.

that’s correct but the event seems to be renamed now so the smart app I pasted above stopped working… maybe someone knows how to find out the new name now.


Why do you think it is renamed?

We are still using: location.currentState("alarmSystemStatus")

Hello to all ,

been using HA for a few years , never had the time to fully search for something like this , but sadly with new SM app maybe this is not working anymore , or is it ??

The state of my entity never gives any state , has the code changed or do i need an update to any string in the code , or does this not work any more ???

The legacy SHM was deprecated and fully disabled earlier this year. The new app thay was built as a replacement usea the new API’s and from what i understand isn’t avaliable to interact with legacy Smartapps that use the old IDE.