Hubitat Safety Monitor API

So it saved fine but does not appear to be changing the HSM armed state.

Strike that @bravenel
It appears that you cannot switch between armAway and armHome. If I disarm first and then set to one of the armed modes it works. Wasn't aware that there were limits on what mode could switch to another.

Ah, that's a bug. Just tried, and got unexpected response.

The bug is trivial to fix. But it won't be in the release coming out today. Next one after that.

When I subscribe:
subscribe(location, ā€œhsmStatusā€, statusHandler)

I'm getting:
Invalid variable name. Must start with a letter but was: ā€œhsmStatusā€ . At [219:25] @ line 219, column 25.

Check your double quotes (as mentioned for the exact same error a few posts above :slight_smile: )

should be

subscribe(location, "hsmStatus", statusHandler)

Oh, thanks. Man I gotta keep an eye on that. Copy and paste from this form always results in that.

2 Likes

Please note a correction to the API shown above. There are two separate intrusion alert values for hsmAlert. "intrusion" means an intrusion alert when armed-away, and "intrusion-home" means an intrusion when armed-home.

@bravenel it would be very nice to have an "armed night" mode, which is commonly available in other security systems :wink:

HSM has ā€œArmed-Homeā€, is that what you are referring to? That is what I use for night time.

home and night would be two different modes, with more sensors active and night but still less than away

Hum every security panel I have used only las Disarm, Away, and Home. This is synonymous with what HSM has. I haven’t seen a 4th mode but I also haven’t upgraded panels in years either so may it’s something new.

There is a third mode and they are pretty common now. Usually night mode is a mode where you are not expecting anyone else coming home so all the door/window sensors are active and have no delay.
Stay mode is similar to night but with delay because you are still expecting someone coming home.
Away is with delay but all motion sensors active.

1 Like

Can we somehow read the current alert, `location.hsmAlert'?

An alert is an event. You can subscribe to it.

subscribe(location, "hsmAlert", handler)

Then your handler can keep the alert value as needed.

1 Like

armNight, armedNight, intrusion-night, correct ?

1 Like

what's hsmSetArm(cancel) ?

I was wrong in the first post I made above. This event is from cancelling alerts.

1 Like

@bravenel, is there any plan to include scenes into HSM? I just setup my first scenes and set one up for alerts and one for emergency but could not find a way to trigger them from HSM.

You can do that now. In HSM for alert select Lights, and Lights to turn on. One of the choices the Scene activator switch. When HSM alerts, it will turn it on, and that will activate the Scene,