Request : HSM water detection to closed or off for valve

How are you looking at it on your phone? Are you looking at the app UI itself?

@tonesto7 added HSM integration to his Homebridge app. If I enable that, it gives control via HomeKit for Arm, Away, Night and Off. When you change Arm-Away or Arm-Home in HSM, it reflects the change in HomeKit.

However, I can completely disable that and it will still go into Arm when I open HSM. I know this is happening because as soon as I open HSM, I'll get a notification immediately if one of my doors is open. I have no delay arm setup on my system.

Please post a screen shot of the HSM ui page.

Sure.

Ah, it's ganked up. Try turning on Disarm All and then turn it off again. There is a known bug about the display when it thinks both Arm Home and Arm Away are set. Fixed in next release. But doing the Disarm All bit should get it back to normal.

OK. It worked, but then would set to disable alerts (OFF in HomeKit) each time I opened the HSM app, but then after a few times it goes back to the previous state. I'll just continue to disarm after opening HSM until the issue is resolved. Thanks for looking into it.

When you open the app, it sends whatever state it is in. So if it is disarmed, it sends hsmStatus:disarmed, etc. It also sends out hsmAlert:disarm at the same time (the purpose of which is to allow other apps to stay synched).

If it is armed-away when you open the app, it will send those same corresponding events.

The bug, which still exists in your version, is that when external apps arm or disarm HSM, it is not updating its state completely. That's what you just saw in your briefly visible screenshot. The new version fixes that issue. I suspect that the behavior you've been seeing is a side effect of that.

1 Like

Sorry about that. Just forgot to remove the phone numbers. Don't mind anyone having mine, it's public, but my wife...that wouldn't be accepted well.

I'll repost the corrected image, even though it's moot now, but just to keep the conversation in context for someone else reading the thread.

Just so you know, I have a photographic memory and your wife's phone number is: xxx-yyy-4321. :sunglasses:

1 Like

:joy: Might want to change photo labs! There’s a flaw in the development.

1 Like

This is working, but there's a very minor issue that still occurs. If you have HSM app open when you change mode via an outside application, it goes back to the old behavior.

So for example, if HSM is in Arm-Away mode when you open the app and then you set it to Arm-Home outside of Hubitat, when you open the HSM app again, it's "janked up" like before, where the Arm-Away/Arm-Home switch isn't there and opening HSM app sets the system to Arm-Away without user interaction. If you set HSM mode to Arm-Home from outside HE, close HSM and re-open it while it's still set to Arm-Home by the other app, then the switch reappears and all is good. If you do the opposite, set Arm-Away from outside HE while HSM is open, then open HSM again, it will be janked again, but won't change the mode to Arm-Home (which seems fine from a security perspective). If you then set Arm-Home from outside HE and reopen HSM, then it will again show the Arm-Home switch in HSM and all will be fine again.

It isn't seriously "janked up", but it is janked still

Argh. I'll look into it, again...

1 Like

There is a contradiction between these two paragraphs. In the first one you say "if you have HSM open", and in the second you say "when you open SHM again". Please clarify the conditions more precisely, as I'm not seeing the behavior you are describing.

I've tried both directions you describe, and don't have it misbehave. So maybe I'm missing something about the order of events you have that make it fail.

Sorry, that was confusing for me just to write!

I too couldn't duplicate it, but I'm guessing you were doing what I just did. Used the "<<App list" link to return and then opened HSM again? It doesn't do it when you do that. If you click "Done" then reopen, you should be able to see the issue. If you still cannot duplicate it, I can make a screen recording of the steps to show it for you.

We figured this out. Obviously, this only happens if the app is open, an event occurs, and then you hit Done. The fix unfortunately entails rewriting a significant amount of code. That will be in the next release.

1 Like

Sorry it won’t be an easy fix. Glad you were able to find the issue though.

It's an edge case, leaving the app open while some other app is running that arms or disarms HSM. The fix isn't difficult.

1 Like

Most definitely is!

This has been fixed in the latest release: Hub Update 1.1.3

If you hit Done it will honor the change to arm setting that occurred from an external source. If you open the app again you would see the changed setting. If you hit refresh on that page, the arm setting of that page would be set (over-ruling the external source).

1 Like