Better presence detection?

So, I’m looking for opinions here…

I have followed and read many different takes on presence detection, but can’t seem to find a perfect solution. I am considering using a combination of motion detection in conjunction with a OMRON d6t; OMRON’s heat detector; attached to an esp8266 or similar, communicate via mqtt. With the use of rules, I should be able to distinguish when a body is still for a period of time, therefore assume sleeping, or depending on motion what state a person is in to control other automation methods, wither hvac, lighting, etc.

I have no experience with any of the parts of this system, only with zwave, but it does not seem all that difficult.

What are opinions of this method?

Hi,

from what you’ve written it sounds you’re not only after presence detection, but also room detection.
So this could be right for you: Integrating reelyActive on a Raspberry Pi 3 with openHAB over MQTT

But beware: That’s not gonna be easy on the brain and the budget…

Also look into the Wasp in the Box algorithm.


The tl;dr of it is if you haven’t seen any indication that someone is home, yet the egress points (i.e. external doors) haven’t opened then assume someone is still home. It gets its name from the idea that if you put a wasp in a box, and the wasp goes silent, assume the wasp is still in there unless you opened the lid.

If you have Android devices, you can also track those down to the room level using FIND.

i agree with looking for phones, but i peraonally put my phone down, and usually dont touch it for most of the night, so depending on looking for the phone, wont pinpoint where i am in the house.

reelyActive works with BTLE so it isn’t just phones. If you have a smartwatch, activity tracker, or other BTLE device on your person it would still work.

Whether you use reelyActive or motion sensors the “Wasp-in-the-box” algorithm is one you will want to look at.

However, be aware that this is actually really complicated and will take a lot of planning the algorithm and sensor placement to get right.

ok, any thoughts on the heat detection? seems very sensitive.

The challenge with heat detection (or any of these sensors frankly) is tuning them to reduce false alarms while keeping it sensitive enough to be useful. Heat detection has the added problem that this tuning will have to be constantly adjusted as the season change.

You can make a presence detection using almost any kind of sensor you can think of. The real question is how much time and effort do you want to put into it up front and on a continual basis. Consequently I think from a cost, time and effort most home users choose PIRs and something like the wasp-in-a-box algorithm.

There was a cool project posted months ago (search for PIR and I’m sure it will show up_ of a device and algorithm made up of several PIRs which were able to use the time of sensing displacement to determine the direction of motion of a subject. So for example you could have these at the doorways in your house and detect whether people are entering or exiting the room.

ok. so i have a question rich…has nothinh to do with the topic…but sibce you gave a large part in tge documentation, figured I’d ask. (a lot of threads, but no clear answer)

i have one of pis with late beta2 on it, mostly zwave, but about 50 devices, some rules…want to update to openhabian due to the ability to update easier, and auto restart reliably. what are the proper folders to make copies of? how do i recover them from an online source after i flash openhabian?

The primary folders you need concern yourself with are under “conf”. Items, Rules, Persistence, etc. If you have edited any of the files under userdata, be sure to grab those as well. The only file I can image you grabbing from there though is the logging configuration. This posting has all the pertinent info.

Once you create the new install, you may have to go through the initialization steps for some of the bindings. My.openhab and Nest bindings are two that I know for sure. There may be more.

I’m not sure what you mean by recover from an online source. I personally use a personal git server to backup and configuration control my configs, though that is a somewhat advanced approach.

The above link was written back when I was using OH 1.8 but the concepts are the same.

That is a long term solution. Short term you really just need to get the files off of your current install and on to the new install. Probably the easiest will be to copy the folders to the /boot folder, stick the SD card into another machine and copy them off. Once you install openHABian it will come with Samba installed I think. You should be able to access the Pi’s file system over the network and just copy the files over that way.

I know other people have use DropBox:

And some people check their configs into github itself, though I avoid that because I have usernames and passwords in my configs and it was easier to set up my own git server than it would be to mess with encrypting the necessary configs.

1 Like

perfect, thanks for the info as always.