Too many Notifications from a simple RM4 Rule

My Rule is doing what I am looking for but needs some refinement.

I keep getting the 'OFF' notification when either Person 1 or Person 2 leaves on their own. Likewise, when the proper conditions are met, I also get two notifications. On checking the system, it is always in the correct state, but it is possible that it has been through both the 'ON' and the 'OFF' state before I get to see it.

I have had several goes at trying to sort it out, but none have worked successfully. Any help would be much appreciated.

I feel like maybe your rule allows for too much slosh. So add more restrictions or layers, maybe?

I actually do something similar with mode. My system is set up much differently than yours, although I'm only judging that by your one rule, so probably a completely inaccurate assumption.
HSM changes state according to mode. Home/Away/Night/Quiet time

I also use these states with my rules. It works quite nicely. A lot of my rules aren't based solely on state, so other restrictions can vary due to time of day. I'll explain the modes so that you understand them.
Home: that's obvious - at least one person home and no one in bed
Away: Again obvious - everyone is gone - hsm armed away
Quiet time - at least one person in bed. HSM Armed home (smoke/CO2)
Night - everyone in bed - hsm armed

Presence is managed with life360. it's been pretty accurate as of late. (They've fixed it). It is recommended that you use more than one presence sensor to avoid false reports, but know that the wifi may turn off on your phone when it's sleeping making that somewhat sketchy as well. Your choice as to what you want for triggers.

So my notifications work on mode
here is the rule to show me what mode my home is in, which determines how the house is armed.
image

I know it's not a straight up answer. But I wanted to respond to your question with how I deal with things in my environment. Maybe this will help you with that box we all seem to get stuck in every once in a while.
[EDIT]
I feel like maybe presence is hopping on you.

2 Likes

Insert another ELSE-IF statement before the ELSE statement for Person1 or Person2 present.
ELSE-IF Person1 OR Person2 present AND Security System ON
Off: Security System.

You might want to add an AND condition to the IF statement as well.
IF Time between X and Y AND Alarm OFF THEN
Do stuff

I think you could actually get rid of the last ELSE statement as well then.

I think that would be the easiest way to fix what you already have. There are a bunch of ways to do this.

1 Like

I would break this down into what turns the system on and what turns if off and add the state of the security system so you only receive one notice. It's important to use sub-expressions in your IF statements too.

IF (Security System off AND (Time is 22:00 OR Person One, Person Two all not present)) THEN
    On:  Security System
    Notify
ELSE-IF (Security System on AND (Time is 8:00 OR Person One, Person Two any present)) THEN
    Off:  Security System
    Notify
END IF

I'm not sure how you plan to handle if person one and two are away fom a few day. I don't think you want to disable at 8:00 in that case but this should be a good starting point.

3 Likes

april.brandtAmbassador

(Too many Notifications from a simple RM4 Rule)

I feel like maybe your rule allows for too much slosh.

Thank you for all the detail and explanation here. I need to gen up on the use of Mode. It's obviously a very useful function. Thank you.


JNS

(Too many Notifications from a simple RM4 Rule)

2h

Insert another ELSE-IF statement before the ELSE statement for Person1 or Person2 present.
ELSE-IF Person1 OR Person2 present AND Security System ON
Off: Security System.

You might want to add an AND condition to the IF statement as well.
IF Time between X and Y AND Alarm OFF THEN
Do stuff

Thank you for all the detail and explanation here. I need to gen up on the use of Mode. It's obviously a very useful function. Thank you.

pseudonymOwner


I will try another rule based on your suggestion. Thanks.

Your suggested method has worked perfectly.

I haven't been able to test it for a prolonged period. I'm not sure why it might not work.
Will the [quote="pseudonym, post:4, topic:28851"]
OR Person One, Person Two all not present)) THEN On: Security System
[/quote] not keep the system on?

Thank you, Dave

Are you referring to my comment about person one and two being away for a few days?

If so, the ELSE-IF will turn the security systems off at 8:00 even if both are gone because of the OR. If you make it an AND then a person arriving home won't turn off the security system unless it's 8:00. I think there's a way rewrite the first ELSE-IF and add a second ELSE-IF to cover the case where both are away for a few days.

OK, I see why, now.

I'll give it some further time and have something ready to test for when the need arises.

Thanks again.