In room detection of Occupancy


BTW, if you are serious about this and you are the home owner (not just renting) it can be done very nicely with a double set of trip beams at about shoulder height.

(Think of the alarm systems in movies like Mission Impossible. Or for that matter the “obstruction detected” sensor for a garage door.)

By having two sets a few inches apart, you can detect whether someone is entering the room or leaving based on which one tripped first.

However, people have to enter the room single file–if they break the beams at the same time, it will only count one person.

And if you are carrying something shiny, you can confuse the detectors.

Also, height can be tricky if you have large dogs and small children.

Anyway…this can be done at a cost of about $800 per door way, less if you do everything yourself and know exactly what you’re doing.

But it’s hardwired (not battery powered), and uses WiFi or direct line connection, not zigbee/zwave. And getting the information into SmartThings would be another story altogether.

But definitely doable with current technology. :smile: And less creepy than pointing cameras at everybody.

If I ever lose hand function all together, I will likely use something like this.

1 Like

Accurate Occupancy sensing is an area with tremendous potential uses. Perhaps a few of us “geniuses” :wink: should get together and design a system?

One use case not reported, for example, is for fire safety. The first thing that firefighters do when arriving at a scene is determining if all occupants have been safely evacuated. They probably ask persons on the scene (other family members, etc.) what rooms need to be checked, and so on.

Having the latest “room occupancy” data could save lives if it directed rescuers to the highest priority locations to search.

there is an interesting PIR type called “curtain” sensor, which reads two pretty-flat planes a couple degrees-angle apart. The planes are only 1-2 degrees wide. So by noting which plane is broken/hot first, you can get an indication of “moving left/into-the-room” or “moving right/out-of-the-room” in one device. It may be two sensors inside, I dunno.

like this device "Visonic CLIP MCW"
I love these things. They can still be falsed by a big bug on the face, but it hasn’t happened in 6-7 years I’ve been using them. The original battery has lasted the entire time. Probably wouldn’t last so long on a busy border

Until this curtain PIR is adapted to Zwave direction-indication, I think a pair of ST Zigbee motions masked appropriately, can do the same thing, and their battery life seems pretty good too.


If you’re trying to catch “going in” vs “going out” with two detectors most mesh based protocols (zigbee or zwave) may have a high failure rate because there’s no guaranteed sequencing in a mesh network. You can’t be absolutely certain which message will arrive first. Star topology is generally better for this reason.

1 Like

good to know about the mesh network (I’m not familiar with zigbee). I guess if I setup “zone” occupancy it’ll still work that is, motion sensor at the bottom of the stair and another motion sensor at the top of the stair (takes approx 2-3 sec to walk up, should be enough time)

That could work very well, although it may take a modest amount of custom code to work. I’m sure there will be community members happy to help, they love those kinds of chalenges. :smile:

Just wanted to mention that since this thread was started, @mike_maxwell has written a very nice custom smart app to do zone detection using multiple motion sensors. It’s becoming very popular. It doesn’t detect a specific person, but it significantly reduces false positives because all of the sensors assigned to the zone have to trigger at the same time or it doesn’t count as an event.


Also wanted to mention that estimotes, who make one of the most popular Ibeacons, now have a model specifically for zone mapping called “location beacons.” But this requires four devices per zone, so it gets pretty expensive. It’s intended for commercial use such as a department store that wants to present one set of options when a customer is standing in sportswear, and then a different set if they have moved to the jewelry department. But the cost is going to be around $160 per room.

In my case I want ST to detect if I am in the room. The challenge is that it is a media room, and it is fairly common to sit in one spot, reclined, and not move hardly at all for a couple hours. Possibly even fall asleep. :blush: So motion detection cannot be relied on.

Since I always sit in the same spot, which is in a recliner, I’m wondering if I can do it based on detecting my butt in the seat…? One possible solution is to use a MultiSensor with a open/close contact, and set it so that when the recliner is closed it thinks I’m not in the room, and when open it assumes I’m in the room.

That would be pretty accurate. Except that often times I keep it reclined and then just hop in and out of the seat without closing the reclined position, since it is motorized and a bit slow to open/close. Otherwise it becomes a bit of a pain to close it every time I jump up for something and then recline again when I return.

Is there any way to rig something at the seat that could detect my butt in the seat or my back against the back part of the chair or my head on the headrest? Without it being an eyesore or uncomfortable (such as physically sitting on a contact mat)?

Pressure mats. ( you put the mat under the cushion, you won’t feel it.) People use these for exactly this kind of purpose. Again, though, it’s not detecting you in the room, it’s just detecting weight on the seat. So it wouldn’t distinguish between you and your spouse or even you and your dog. But you could set it up so that it would only use the information if it also knew that you were home (because your phone was home).

1 Like

Alternatively, it may work to have a multi sensor on the chair:

You can find these discussions and more on the quick browse lists in the community – created wiki in the project report section under sensors. Also check the project reports by room for the bedroom projects, many of those have to do with occupancy.

1 Like

Thanks JD! I don’t think the pressure mat will work in this case because there is no removable cushion on the chair’s back or seat, so now where to install the mat. I read through the chair multisensor, but I don’t think there’s anyway it could detect if I was sitting in it or not, short of it detecting the axis, which would then be dependent on me using the reclined position to tell, and at that point I might as well use the open/close contact of the multisensor…?

Hi so i did mine with a ecolink contact sensor (any contact sensor would do really)
For my case my chair “drops” a little bit with my weight and cause the contact to close.
Surprisingly it works very well, its all about finding the right spot to put the contact sensor.
Ill put some pictures up when i get home

1 Like

Thanks. I looked at this and indeed when I sit in the chair cushion pulls inward, and it would be enough for an open/close magnet contact with the multisensor. However, this chair also reclines, and when the chair is reclined the sensor needs to be in a different position depending on the amount of decline. So unfortunately I don’t think this is going to work.


1 Like

Hi, you could look into something else that’s not related to the chair.
For example if your arms/hands are always on the desk, you could perhaps use something like this:

With the pressure pad beneath it… food for thought
Or perhaps beneath a foot rest?
All in all, i think the contact sensor on the chair would be the best, its a matter of you getting the right angle… also i believe you can play around with different magnets strength to get more distance between the contact sensor and the magnet


Thanks. This is for a recliner in a media room, so there’s no desk. Ideally there would be a device that could detect the presence of someone in an area without movement, perhaps a heat signature?

Sorry for the delay. Here are the pics of my setup
The white thing is a powerful magnet that came in a hurry motion sensor… Any powerful magnet will work.

Nice, how did u achieve it with only 1 sensor 0_0?

Cool! added to favourite, will get to it eventually. What kind of sensor are you using?

There is now a product which exactly meets the original requirement of knowing when someone enters or leaves a room and how many people are in a room. It can also cope with rooms which have more than one doorway. It is likely not cheap.

Their main example is even as originally mentioned that of turning lights on and off based on someone being in the room. Unlike traditional PIR motion sensors it will not turn lights off whilst someone is still in the room even if they are totally still.