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


(Mike Maxwell) #1

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


Multiple motion sensors required to trigger intrusion alarm
Best Motion Sensor
Double Tripping Sensor before Alarm Sounds?
More false alarms on my original ST motion sensor
Motion Sensor triggering with no motion?
CoRE - Get peer assistance here with setting up Pistons
Old question, looking for current answer...grouping similar items
Motion sensor too sensative
How to set up a notification with event triggered by two device sequentially?
In room detection of Occupancy
Motion sensor inactivity turns lights off too early (2016 discussion)
Motion dector sending false alarms
Motion senser in dark room
Ability to disable motion sensing for certain modes?
Outdoor Motion Detection
App that toggles a switch on/off when something is opened?
Double Tripping Sensor before Alarm Sounds?
Reading logs to determine why my switches trigger
Adding multiple sencor
Backyard monitoring?
Turn off after specific duration of inactivity on motion sensor?
SHM and Guests - Working out what to do
GE Link dropping like flies
Motion Sensor (Tip)
ST Motion Sensor - False Motion Alerts
Samsung Smartthings Motion Sensor randomly goes off
One house 6 studios
Motion sensor tripped by bugs, animals...beam sensor?
ST SmartSense Motion Sensor false positives since Sep update?
Motion sensor reports motion when no one is moving. Should I call a priest?
Custom motion alert app?
2 doors open (not 1) triggers immediate Echo/Google voice warning?
Lowes Iris Motion detector work through glass?
[BETA] New smartapp Automation-Director choose almost any triggers and assign actions
Outdoor motion sensor lighting
Outdoor motion sensor lighting
Ideas? Outbuilding Auto Arm/Disarm
Motion sensor sprinkler?
Is there a smartapp that works with smart home monitor to dismiss alerts?
Zone motion manager--code no longer works?
Zone motion manager--code no longer works?
Ideas for Motion Sensor for Kids Bathroom Lights/Fan?
A better sensor for lighting stairwells
CoRE capture() / recordClip() with ARLO wireless camera
How can I make Alexa detect a sensor status and carry out an action based on it? (Garage Door use case)
Multiple Sensors - Merge into a single virtual sensor
Almost 70 false motion alarms this year!
Trying to use two motion sensors on one switch
UK ST compatible outdoor camera solution
What's your motion detector strategy?
FAQ: False positives on motion sensors
False Open Sensor Alerts
Passing parameters in a runin() statement
Set attribute on simulated Device?
Multiroom Audio/Whole house Audio Finally coming to Alexa
Motion and Contact Sensor working together
SmartThings vs Iris Motion sensors for use outdoors?
Notifications after multiple motion sensors?
FAQ: Do you know of an outdoor motion sensor?
Iris Motion Sensor (2nd gen, 3326-L)
Two motion sensors to trigger switch?
Presence detection on zone level
SmartTiles v5.8: Deployed to Blue & Green Editions. Release notes, etc. (follow this Topic for updates...)
'Things Quiet Down' Question
Answered: How to turn on switch after a sequence of motion sensors
Reolink Battery powered cameras (argus/argus2/keen) + ST Kludge
Motion sensors are useless recently with false alerts
What's the options for motion sensors compatible with smartthings?
Smart Home Monitor - Alarm only when two sensors go off
Intruder detection mystery
Blink: wifi camera/motion sensor on Kickstarter
Multiple Motion Sensors to control one light switch?
Done with motion sensors
SHM and Motion Sensors False Alarms?
Using 2 Motion Sensors To Turn Off Lights
Using core to simulate motion?
2 Motion Sensors, 1 Light?
Simulated motion sensor
Basement Lights Automation Help Needed
Virtual Device Ideas Thread
Overrride motion detector light control?
Looking for devices (hardwired Smoke/CO, outdoor motion/temp, etc)
(Bruce) #2

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.


(Mike Maxwell) #3

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…


(Bruce) #4

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


#5

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:️


(Greg) #6

So you can use this virtual motion zone in SHM?


(Mike Maxwell) #7

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.


(Mike Maxwell) #8

@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!


(Rodrigo Cuadros) #9

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.


#10

@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.


(Mike Maxwell) #11

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.


#12

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


#13

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.


#14

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.


(Paul) #15

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


(Mike Maxwell) #16

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.


(Richard Rommes) #17

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.


(Matt K) #18

Sounds awesome! Really looking forward to it!


(Walter Edwards) #19

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.


(Mike Maxwell) #20

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