Getting the SHM status through the API


(Ryan Idrap) #1

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.

Get Smart Home Monitoring notifications in my third party app
(sidjohn1) #2

( co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #3

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”.

(Ryan Idrap) #4

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

(Joel W) #5

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

( co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #6

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

(Joel W) #7

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

(Matt Martz) #8

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)

( co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #9

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.