Presence detection on zone level

Welcome! :sunglasses: There are several different issues involved here. The general concept is called “microlocation” or “micropresence,” that is detecting people in a smaller zone than is normally detected by GPS.

First issues

You run into a couple of issues very quickly. The first is that with the exception of PIR motion sensors, most devices that detect presence use protocols that go through walls. That makes it very difficult to define a “room.” But if you’re only using PIR motion sensors, you’re fine, because they don’t detect through walls.

The next issue is if you want to know who is in the room, that is if it makes a difference if it’s Michael or Susan. Using current technologies, those require that each person carry an identifier device with them, which is usually fine for office buildings but not so much at home. It doesn’t sound like you need this for your specific use case.

And the third issue is one that you mentioned, if you want to know the direction the person is going from one zone to another. That’s a lot harder than just knowing if there is motion in a particular zone.

cats

As far as cats go, if you are using PIR motion sensors about the only thing you can do with certainty is to move the sensor higher up on the wall and mask the lens so that it detects in a narrower beam. There are community members, particularly @Mike_Maxwell , Who have done exactly that, attaching a tube over the lens of the motion sensor so that they get a more directional detection area. That can work fine, it just takes a little ingenuity to set it up.

There are also motion sensors you can buy that are called “pet immune” that are supposed to ignore detection events based on small animals. They work OK and it really just depends on your specific set up. Worth a try, in any case, although they don’t have the same certainty as changing the detection zone.

https://www.amazon.com/Ecolink-Z-Wave-Motion-Detector-PIRZWAVE2-ECO/dp/B00FB1TBKS

trip beams indoors

There are indeed trip beams that can be used indoors, and if you move them up high enough on the wall then you don’t have to worry about the cats. This is a typical method for people-counting in stores and offices where you want to know if everyone who came in has also left at the end of the day. They don’t detect individuals (susan versus Michael), but they’re a relatively inexpensive way of giving you a directional count.

Unfortunately There aren’t any that integrate directly with SmartThings, but you can do a build your own project if it’s really important to you. For the project as you’ve described it So far, however, I think it’s probably more effort than it would be worth.

The method is discussed in the following thread:

However, instead of directional detection most people using SmartThings just use inactivity in a zone as information. So you could set up a rule that said if no one has been active downstairs for 15 minutes, then turn off the living room lights.

You have to do some experimenting to get this kind of rule so it works for your own family’s typical movement patterns, but it’s a pretty easy thing to do, and it’s a much simpler technology than actual directional detection. So you would have one set of rules for activity upstairs, another set of rules for activity downstairs, another set of rules for inactivity upstairs, and the fourth set of rules for inactivity downstairs. The combination of all that typically gives you the same end result as directional detection.

The following thread has a lot of different ideas on how to handle motion sensors in various parts of the house and is worth a read. It can give you a lot of different ideas.

Zone Manager

Mike Maxwell has an excellent smart app which can combine multiple motion sensors into one zone. It doesn’t give you directional detection and it’s not a people counter. But it can let you say “only react to motion if motion was detected on all three of these sensors.” This is a great way for defining a zone even for L-shaped rooms or other irregular spaces.

Mike also has a pretty amazing “universal device type” which can let you count a contact sensor as a motion sensor or vice a versa. Among other things, if you’re trying to set up a zone it means you could include, say, the bedroom door being opened as one of the “motion events.” It just gives you some additional cool options.

If you haven’t looked into using custom code with SmartThings already, it’s pretty straightforward. Basically you just copy someone else’s code and paste it into your account. The following FAQ describes the process

Then if after reading that it sounds like something you’d like to try, here’s Mike’s zone manager code:

2 Likes