Require two or more motion for home alert

I have been using the home security alert with doors and motion sensors but my motion sensors seem to misfire in an empty house around once a day.

I could try and replace the motion sensors but I'm wondering if it may also be something like an insect or dust.

I think a better solution would be to require two or more motion triggers within some number of minutes. Does habitat have a way to do that without creating my own app?

Use the built-in app

7 Likes

Awesome! I love the diagrams there. At first I was worried it wouldn't work because my sensors may not stay triggered long enough but the diagram for "Triggered Activation Zone" looks perfect for what I want.

THANK YOU!!

1 Like

Ok. I'm not able to test yet but 2 critical questions:

  1. I see motion sensors can be a trigger, can anyone confirm that? I.e. doesn't have to be a contact to trigger the motion zone

  2. If motion sensor A is the trigger, can motion sensor A also be in the aggregate zone of motion sensors. Or will that activate the zone by being the trigger and then instantly activate the overall aggregate zone?

There is a very easy way to find out:
use 2 virtual motion sensors, and try testing it out...
(you can set a virtual motion sensor to be active whenever you want).

Ah, ok. Great point! I did at least confirm already that the answer for my question 1 is yes. Let me try a virtual motion sensor addition to both groups of motion sensors.

Bad news. If the trigger is also in the zone aggregate group it instantly activated the zone.

I feel this may be a new feature request now. Should I reopen this one here. It's half solved :smile:

I have read that a couple times and am not quite sure what you are trying to do. You are trying to use A in a rule and somehow use the aggregated sensor in that rule also?

Maybe upload a screenshot of your rule so we can see what you are trying to do?

1 Like

Yes, @jdeltoft a screenshot along with a plain explanation of what you want the rule to do will help us provide advice on what we think you need to change to achieve what you want.

Sure! Here is my attempt that isn't working yet:

Let's say "trigger device" is "Motion Basement Window". Then it instantly triggers the "zone activated" also.

These motion sensors are short active times, just like the timing diagrams at Zone Motion Controller | Hubitat Documentation

The reason I can't use the first option called "false motion reduction" is that I don't put my motion sensors double in each area. I put one motion sensor per room generally.

So then I was hoping to use the solution called "triggered activation zone", using all of the motions sensors (1 per room) as triggers. I knew this may fail, because if the trigger device is ALSO in the list of motion sensors for the aggregate "zone" that the trigger device enables, then it will certainly be active the moment this zone is actively looking at the same device.

My ultimate goal is to prevent one sole motion sensor from being able to trigger the security built in app (dust/bug/ambient light), if no other motion sensors fire in the next N minutes.

So my feature request is to ignore the trigger device (maybe for just a short period?) when the trigger starts the "activation window". The issue is that I don't know which sensor is going to false, so I have to include them all as possible "triggers". But then of course they are also all part of the list of zone sensors also.

The additional information you posted about your sensor locations and how you want to utilize them was helpful. I am not sure that this app is quite right for what you want to do. I am not sure what would work better for your situation, I am not aware of an an app that would do this, but there might be one if you search the forums.

My next thought is it seems like you need to dig into things in Rule Machine a bit, maybe a variable and tracking/comparing that over time would solve this? Maybe a custom app of some type? Both of those are above my skill level, maybe someone else could help with that?

Understood. Thanks for the reply! I can check for or create a more complicated solution myself but didn't want to reinvent the wheel either. This also seems like!:

  1. It could be a common use case for two builtin apps
  2. It does also seem like small tweak to an existing app

Is there any way to fork the existing built in app myself?

Thanks!!

The stock apps are not open source.

You could ask for this as a feature request, and the developers may consider adding this functionality.

One other comment. There are other examples I feel are similar. When you set up the built in home security app it has two different groups. Contacts that must be closed before being able to trigger "away" and contacts that ignore current state.

You may want to look at Sensor Groups+:

It keeps track of how many sensors are activated, which may be what you are after.

1 Like

Let me take a look.

In my case I do not expect two sensors to be activated at the same time, but instead near each other in time. As mentioned above, the motion sensors are active for just a few seconds, just like in the timing diagrams in the zone motion controller page.

So this zone motion controller app is 98% of the way there. It just needs one added logical step. Give the option to ignore the trigger device at the start of the green "Zone Activated" period.

I had another thought on this issue... And I'm not suggesting this is a "nice" solution.....

Could you configure a Zone Motion Controller for each motion sensor using the "Motion Aggregation" option, allowing you to configure a timeout which may differ to the individual sensor device. Then you could configure a Zone Motion Controller that references each of the "motion sensors" created by the earlier zones, utilizing the false motion reduction option.

So, if you have 3 motion sensors in a room, setup 3 Zone Motion Controller Apps for each of the three sensors, setting the timeout in each to, let's say 5 minutes (whatever you choose), meaning that if any of the 3 sensors fire and then "cool-off" immdiately, the zone (virtual) sensor will remain active for 5 minutes.

If you then setup a fourth Zone Motion Controller App for the entire room, referencing each of the 3 zone (virtual) devices created as a result of the three apps created above, using the "False Motion Reduction" Zone Type, and a threshold of say 2, then within a 5 minute period at least 2 sensors will need to fire for this zone sensor to report as being active.... I think :slight_smile: . I can't say I have tested it...

Just an idea, and not a perfect solution by any means... More accurate sensors would ultimately be a better solution.

FWIW "zone motion manager" smartapp was created and shared on the SmartThings community many years ago and older versions can be found on Github.

I would have thought you could use the built-in Zone Motion Contoller app to create a motion zone w/a number of motion sensors, use the "False Motion Reduction" option, and then set a reasonable number for the "Minimum Active Threshold" setting.

image

Then use the Zone Motion Controller virtual device the app creates in your automation as your trigger:

Or am I not getting it?

1 Like

The Zone Motion app relies on having multiple sensors in an area, and they each get a vote as to if there really is motion. The problem is the OP has only one sensor in a room. The OP wants to ignore events from that one sensor completely unless that sensor (if I am getting this correct) triggers multiple times in a row. In other words, the first trigger might be dust or an insect, but if it triggers again and again, that is probably a person rather than a random event.

I am going to spend OP's money here, but the best thing probably would be to buy sensors that don't falsely trigger, or to add additional sensors in that room and do the real false trigger reduction method.