Getting the SHM status through the API

Is it possible to get the SHM status (e.g Armed (Away) ) using the API? I don’t want to take action on SHM, just get current status. Can’t find any info on how to do this, but Smarttiles appears to be doing it.

Fair warning … unfortunately the API we (and a few others) are using is completely unofficial and may be pulled by SmartThings at anytime.

if (command == "away") sendLocationEvent(name: "alarmSystemStatus" , value : "away" )
    else if (command == "stay") sendLocationEvent(name: "alarmSystemStatus" , value : "stay" )
    else if (command == "off") sendLocationEvent(name: "alarmSystemStatus" , value : "off" )
def status = location.currentState("alarmSystemStatus")?.value
def message = [off : "Disarmed", away: "Armed (away)", stay: "Armed (stay)"][status] ?: status

SHM has a very specific purpose in the product – i.e., it is one of the primary gateways to subscription services (e.g., Scout and ADT-Canopy integration … and more coming, I’m sure). Hopefully that will still leave room for APIs for the general Developer Community, but … I’d say it “doesn’t look good”.

Code is exactly what I needed. Understood about it being unofficial. Thanks so much.

1 Like

Is this code placed in the custom CSS and how is it implemented?

No. Basic SHM control is available under “More Tiles” as an option…

Thanks I have that set up, misunderstood the whole thing.

1 Like

Is there an alarming / danger state? i.e. can you read or write to SHM and set it to danger / alert / whatever its called (as opposed to off, stay or away)

Not as far as the Community knows or has been told.

It’s pretty obvious that SHM exists as a Trojan Horse to sell add-on subscription features (Scout monitoring, and soon neighbor alerts, etc.). As this is unique ongoing revenue generating features, SmartThings is keeping SHM closed on purpose… at least for the time being. This may change if the revenue products aren’t successful.

I think we expect these types of restrictions on the platform to increase from time to time. SmartThings has to earn money somehow.