I'd like a button to perform a special action if HSM is not in an alert state -- can't figure out the RM setup

I'm finally exploring HSM and getting leak sensors set up. I'm using a Zigbee button to cancel any repeating alerts that might go off while I am home. This is working fine.

What I would like to do, for fun, is have the Cancel Alert button on the fridge make the system say something funny if it's pressed while the system is not in an alert state. ("Please do not touch this important button. Thank you.")

In RM, I can test for a water leak state in Conditions, but I can't negate the test, to set up the button playing a sound when there is not a leak alert to cancel.

What am I missing?

The simplest option would be to check if the water leak sensor is in the dry state.

Alternatively there should be a not option when defining a condition.

If you wanted to use some status from HSM, I am not familiar with that myself, so may need others to chime in.

Some screenshots of what you have so far may be useful.

Indeed, though it is a simplification with a cost. I have set my leak sensor in HSM to sound a persistent alarm if it gets wet, even if it then becomes dry. In that scenario HSM would be in an alert state and pressing the button would cancel the alert AND say "please don't touch the button."

OK, that is not a big deal--none of this is a big deal--but I am curious now about how to do it.

In Triggers, here's what is offered for HSM Alerts.

I think what I'd want is the Water trigger, but also a NOT. Or, the addition of a new Alert test for "system is not in alert status."

And, here is what you can do with HSM Status Triggers.

Again, the addition of some kind of "status = nothing happening" test would work.

Inverting a Trigger test seems really useful, perhaps that is possible by another method I'm unaware of. I'm very new to RM.

Based on what you posted originally:

I was thinking that you could trigger the rule with your button press, then have a condition like this, including the NOT option:

I don't see HSM in the list for conditions, but am not sure if that is because I don't have it installed.

I assume so. These are the HSM Conditions I see.

So there is the problem: we have access to HSM Status in Conditions, but the statuses all have to do with arming, not alerts. Developers hate it when product guys say this, but it seems like it would be relatively easy for the team to add the HSM Alerts to Conditions, as they are in Triggers.

I did not think about using the button itself as the trigger, I was fixated on the system state, but it's obvious now. Probably you are right and testing for wetness is the best way forward with the tools at hand.

1 Like

Understand everything is essentially a subset of rule machine and HSM is a very small subset. Some things like that you would be better off with either button controller or button controller/Rule Machine.

I'm not sure if this would directly solve your issue, but I've set up two hub variables that store the last status and last alert from HSM so I can refer to them in rule machine.

I use the hsm_last_alert hub variable in a couple of rules. In one case, I play an alert sound over my speakers when HSM reports 'intrusion - delay'. I loop/repeat the sound while the hsm_last_alert variable contains the word 'delay'. That way the loop ends when the pending alert is either canceled (hsm_last_alert="cancel") or the delay ends (hsm_last_alert="intrusion")

I also use it as a required expression in some rules that I don't want to run while HSM is in an alert status like this:

image

Here is the rule I use to set the variable:

You could modify that to have a rule and hub variable that only stores the water alerts and cancel status if you're only interested in the leak sensors.

This is a good direction, thanks. I knew I had only scratched the surface of what RM could do.