Virtual PIR?

Has anyone put some time into creating a device/app that can act like a PIR for a room? For example, if ST detects motion in a room, but the door is closed, that room is occupied.

Having reliable presence sensors can open up a large range of functionality for my setup. If nobody has any work done in this area I’ll probably do something eventually.

Great idea, but I don’t know if has been done.

I’ll share a secret: I’ve been thinking a lot about how “Virtual Devices” can be used as global data storage object(s). A Device can have an unlimited (?) set of “named attributes” (not to mention, arbitrary “events”), so, theoretically, anyone could just throw anything and anything into a new “capability.dataStorage”.

But no need to be that unstructured, I suppose. Create a new (Virtual) Device Type with “capability.occupancySensor” and have a SmartApp or two keep it updated based on the status of the various real world Things you desire (motion and open/closed)…

Sound feasible? We can discuss further…

…CP / Terry.

I have also been trying to work this out. I think using a combo of door contacts and motion sensors you might be able to detect and even count the number of people in a room. It would require a fair amount of motion detectors and some creative programming.

If you place the motion detectors on both sides of a door way into a room, it should be fairly obvious when someone enters and exits using motion detector A and B.

The problem arises when you have two people that can bee seen by both motion detectors. If Motion is detected on both sides of the doorway then the system breaks down. This is where some sort of laser trip sensor would be great.

1 Like

Check this out…

But I think you need the Home Center 2 or the lite version.

“Excerpt from there”:

Count the guests
After installing FIBARO Motion Sensors on both sides of the entrance to your home, you will always know how many people entered or left your house, or a given room. No need to worry about a teenager being home alone. The FIBARO Motion Sensor will tell you what time he or she went out, came back home, or how many visitors he or she had.*

Check out There is some great information regarding presence and occupancy. The piece that you’re referring to is covered by the “wasp in a box” algorithm. A virtual occupancy sensor and a companion SmartApp seems to be the way to go.

1 Like

Good idea, but I doubt a PIR motion sensor can distinguish between one person or two people entering the room if they’re close enough.


@geko You are right. I was alluding to that earlier. The other problem with the fibaro example @smart is that if both pir on either side of a door see motion then the system would count a person as either leaving or entering the rooms. I think beacons will be the ultimate solution, but you would need to carry around a presence tag of some sort 24/7. In the interim I am working on a combination of device events to determine if a room is occupied or not, the number of people would be nice but is not important.

I am sure that’s Fibaro marketing talk. Hahaha! To fool the non techies unless Home Center has something built in May be?

It will only work if all participants are willing to subject themselves to “tagging”, which is also unlikely. Geeks like us may play along, but it would be impossible to convince my wife and children to wear tags. :slight_smile: IMHO, presence detection should be unobtrusive and should not require wearing any tags.

This will work well with cars entering and leaving garage, but the problem with humans is that their behavior is less deterministic. For example, my older daughter often carries her younger brother on her shoulders. How do you account for that?

1 Like

How about counting heartbeats?

Someone google this. I’m pretty sure it wasn’t only done on Star Trek


The new Kinect can track your heart rate. It can also identify who each person is on the Xbox, but I haven’t seen clear SDK examples of identifying who a person is (eg. for the Windows SDK)… just identifying where a person’s face is and some metadata.

I played with this concept in my house a bit, but in reverse. I placed low energy beacons throughout the house and my phone could determine which room I was in based on proximity to the beacons. My primary use case was for having context around voice commands so when I said “Okay google, play the next episode of [favorite TV show]”, my phone knew which entertainment system to start playing the show on.

I have to agree with @geko though, it would be great to find a way to get more general presence systems working without the individual having to tag themselves somehow.

Ah… here is one of the articles I must have had in mind…

In the very near future as you walk through your home, a small device worn around the wrist will authenticate your identity

Same tag under different name. A non-starter for anyone other than pathetic geeks. :smile:

I don’t want my home, no matter how smart it thinks it is, to “authenticate my identity” and pick a music for me. All I want it to do is to turn off the damn lights when no one is in the room. :smile:

I agree; the “full vs empty” room use case is more relevant and should be simpler.

With the advent of The Ubi and Amazon Echo (and other “always on listening devices”), perhaps the concept of “hearing” activity (not necessarily down to the heartbeat level, but, what the heck), could be more accurate in many ways than PIR – of course?

That counts for 1.5 presence factor. No kidding.

Some kind of chip may be which may be implanted in our body! NO PUN AND PERVERT THOUGHTS INTENDED. :wink:

Wearable devices are definitely in the mainstream now. Fitbit, jawbone, phones, etc. There are many devices that can provide presence that we are already carrying everyday. I do want my house to authenticate me. I want as little friction as possible. Context makes automation better and being able to identify who is in the house provides significant context.


I think smart watches will provide this by Summer of 2016 for those who want them. I certainly hope they do. This will be something people can choose to participate in or not. Assuming we can also get one touch voice, it avoids multiple issues associated with listening stations like Amazon’s Echo or Kinect, most importantly that the listener device goes with you regardless of which room in the house you’re in.

You should also be able to use this with a near range proximity sensor as a touchless switch.

We’ll see what happens.

1 Like

@notoriousbdg - this is pretty awesome and the direction I will start coding in

1 Like