Smart Zone motion detector (Zone Motion Manager) [Deprecated -- no longer supported]

I built this to solve a number of motion related issues.
–Reduction of false motion events in exterior applications (False Motion Reduction)
–Represent a group of detectors with a single virtual detector (Motion Aggregation)
–Enable a Motion Aggregation zone from various devices, switches, contacts ect (Triggered Activation)

This is a parent/child application (like Smart Lighting) where the motion zones are created and edited from the parent application.
When a new virtual zone is created, a virtual motion sensor is created for that zone. This virtual motion detector represents the states of the physical motion detectors that you configured for that zone.
You can then use that virtual zone device in any applications that accept motion devices.

Three components need to be installed and published in your account:
-Zone Motion Manager, is the parent application smartApp
-zoneMotionChild, is the zone automation child smartApp
-simulatedMotionSensor, is the virtual device template for the motion detector

Once published, go to the marketplace, My Apps and select “Zone Motion Manager”
You do not install zoneMotionChild directly, this is done automatically for you.

For each created Zone:
The child app will be named ‘[zone name] Zone Controller’
A virtual motion sensor will be created and named ‘mZone-[zone name]’

This app has been updated for Git integration.
Add a new repository in your IDE
Owner: MikeMaxwell
Name: ZMM
There are two files in Apps, and one device type.

If your get integration isn’t working the repo is here:
https://github.com/MikeMaxwell/zmm

2.1.0 release notes:
Implementation of a new user-configurable threshold, Minimum Active Threshold, used for the False Motion Reduction zone type.
Previously, all motion detectors in the zone were required to go active within the activation window, in order for the zone to be considered active.
With this change, Minimum Active Threshold is a user-configurable value that defines the minimum number of motion detectors that need to go active in the zone within the activation window, in order for the zone to be considered active. The default is 2 motion detectors.
Credit to @smileyborg for implementing this feature

33 Likes

Maybe you should make this an option too, that is, one or all go inactive to inactivate the zone. I think you’re as likely to get “false negatives” as you are false positives. I have a patio with two overlapping sensors, and I know one or the other goes inactive from time to time, only momentarily or a for a few seconds.

When the app is in “All Sensors” mode, the zone sensor won’t go inactive, unless it’s been active.
So a spastic motion going inactive (without having going active first) won’t have any effect.
I guess I’m not following you on this…

Yes, now I understand. My bad… Cool app, and it should absolutely work for my patio.

I like this a lot. :sunglasses:

Just for reference, typical security systems use 3 sensors not in a straight line for outdoor zone detection. This really reduces the likelihood of directional weather-initiated false alerts, such as a cloud passing over the sun or a warm breeze.

Rainstorms are still a problem, but rainstorms are always a problem with outdoor motion detection . :zap:️:umbrella:️

So you can use this virtual motion zone in SHM?

Yup, that was the whole point. ST can’t tell the difference between a real device and a virtual one.
So in SHM you use the virtual detector, and do not include the real ones for that area.

3 Likes

@JDRoberts
The two that I have set pointing each other, IE 180 degrees apart about the mutual detection axis.
I thought I would need three, but so far two are doing the job.
BTW, you recent post about motion fault detection was the inspiration for making this app!

1 Like

Really great solution for unwanted motion alerts. Im installing Hub v1 to my parents and they really want outdoor sensors to trigger lights over the night (especially in the area of the main door), but I was reluctant due to a lot of false alerts. I thought of doing an app that only if there are an X amount of triggers then turn on the lights. But your approach with the simulated motion sensor, and the configuration of 2/3 sensors facing together (and therefore the ability to include them in SHM), is superb.

@Mike_Maxwell
Mike could you possibly take a picture of the sensors you have mounted and the corresponding space it monitors. From what I have read, no reliable outdoors sensors exist and I would really like to have some ability to be alerted to movement in my driveway, in conjunction with the alert also engaging a camera (which I have yet to purchase).

I am new to ST and expect to have my v2 hub in a few days, so much of this is a learning curve in which custom solutions would be realistic for me to tryout. Your post is intriguing as it seems to suggest that it may be possible after all. Everything I had read to this point, suggested that outside motion sensing was in effect off the table due all the false alarms/alerts.

I still need to educate myself on what you are proposing, but in effect seems to have write some code which significantly cuts down of false alerts.

There is no simple 100% solution for this, and the location(s) of my sensors are sill a work in progress.
In any case, my locations aren’t going to work for you, unless you live in the house next door!

In my case, this solution with two sensors, and a window of 2 seconds has reduced (but not eliminated) the false positives. With the two second window I got one false positive, where normally I would have received 10 during the day and 1 or two at night.
So now I’m testing out a 1 second window, should that not detect any real motion events, then I’m going to have to move my sensors around and try again.

So even with this code, the process is going to be very much one of trial and error based on your specific physical situation.

A more definitive approach to this problem are IR laser beam sensors, these are two part devices, consisting of a transmitter and a receiver array of multiple beams, these are pretty much fool proof when used out doors.

Due to physical and aesthetic constraints I am not able to use these, so I’m left with this proof of concept plaything that I’ve built.

So it sounds pretty customized, alas I am back to the drawing board it seems. The lasers wont really work for me either due to aesthetic configurations as well.

Again being very new to all of this it;s fascinating, my simple 20.00 motion light that turns on two flood lights really works perfectly. On the unit I can adjust the sensor to point directly at the area I want and has a little dial for sensitivity, that it.

If someone walks near my door in the backyard it turns on. I hardly every notice it turning on, without some kind of motion. In essence it works like it should, without a bunch of false motion. I am perplexed why the outdoor sensors I read about on the forums are so unreliable

I use smartthings indoors, but for my outdoor motion triggered lights I use the nonnetworked Mr. beams. Really like these. They’re very well engineered. And come in different brightness models. The very bright ones really are very bright. We use these for pathway lights at two levels, one that catches me in the wheelchair and one that catches someone walking. They aren’t integrated in anyway with smartthings, but if all you want is a light to come on at night when someone walks past it, they’re worth considering.

As far as cameras go, these days most security cameras have their own built-in motion sensors. They generally work very well. So you just need to shop around on those.

There are other use cases for which I do want to integrate with SmartThings. I’d be really happy if my security cameras would integrate with Smartthings So smart things would be alerted to their motion sensors: maybe someday.

Meanwhile, I use a couple of sheltered motion sensors right at the house. The porch would probably be a good place for this. The devices don’t have to be anywhere near as weatherproof if they’re sheltered. I think quite a few people use the fibaros on a porch.

Ideally if you can point the sensors so they are parallel to the house rather than pointing out towards the street, you will get a lot fewer false alarms. That doesn’t fit all use cases obviously, but again it’s usually very workable for a porch situation where you want to catch someone approaching a particular door or window. To me, this is the use case where Mike’s new device type would really be helpful. A couple of sensors, I would probably use three, to create an approach zone right around an entry area.

For driveway detection, though, I would go with infrared beams. They’re just the most practical for that kind of space for most people.

1 Like

It sounds like this is currently possible if you use one of the following supported cameras.

What can I do with SmartThings’ video features?

View live video feeds, monitor your home, and automate event-based notifications and video clip recording. Live video is viewable in the app through Rooms and Things. Clip-based recording is viewable through the Smart Home Monitor SmartApp.
https://support.smartthings.com/hc/en-us/articles/205380804-Video-Integration-with-Hub-v2-FAQ

I’m excited to try this. I’m using a V2 Hub. I created a virtual Motion Sensor and added the app via my apps. I see it under marketplace - My Apps. When I select it nothing happens. I get a spinner for about a second and then nothing. I’ve deleted the app, and recreated it. I also deleted the virtual motion sensor and readded it hoping it would have the app as an available choice when configuring. Any recommendations, did I miss something

Hold off for another day or two.
I’m almost done with a complete re-write.

The re-write includes the following:
-parent app to contain all the configured zones (just like Smart Lighting)
-each child app (zone) will create the virtual motion sensor for you
Three types of motion zones can be created:

–“False motion reduction”
When all motion sensors activate within the Activation Window, the zone will activate.
The zone will deactivate when all motion sensors are inactive.

–“Motion Aggregation”
Any motion sensor will activate this zone.
The zone remains active while motion continues within the Activity Timeout.
The Activity Timeout is restarted on each motion sensor active event."
The zone will deactivate when the Activity Timeout expires.

–“Triggered Activation”
Zone is activated when any motion sensor activates within the Activation Window.
The Activation Window is enabled by the Trigger Devices(s).
The zone remains active while motion continues within the Activity Timeout.
The Activity Timeout is restarted on each motion sensor active event.
The zone will deactivate when the Activity Timeout expires.

4 Likes

This is exactly what I was looking for. I have a large basement with a stairway that separates the 2 halves and 1 single motion sensor will not cover 100% of the basement and unfortunately smarthings does not seem to allow for AND logic, just OR logic which means that even if I add 2 motion sensors to a single SmartLighting app, any one motion sensor will cause the lights to turn off after the timer expires. This of course means if you’re in one portion of the room, the second motion detector will turn off ALL the lights.

It would be nice if the Smart Lighting app or any app that allows for functions based on sensors to control the logic of the state such as ANY ONE, ALL OF the following sensors.

I look forward to the app.

Sounds awesome! Really looking forward to it!

Hi Mike I hope the is covered. The motion sensor I have stay active for 4 mins once they are triggered. I have two motion sensors. One in the front of the house, and one in the back. The front motion sensor goes active in the front of the house when someone arrives. The one on the back goes active as they drive to the rear parking area. I need the logic to be when the motion sensor in the back goes active, and the last report of the one in front of the house is active then set the virtual sensor is active. If one or the of the two sensor goes inactive then the virtual sensor goes inactive… This works because it takes 4 mins to go inactive. I would love to have this work.

well, given the state diagrams I’ve shown above, which zone option do you think would be a better fit?