Best Presence detection

Sure, but for testing purposes it is fine :slight_smile:
If you only wnat to know if somebody is at home, then a couple of Raspberries might be just fine (depending on your building). Yes it still needs a powerplug :slight_smile:

BTW. The app ownTracks can scan for beacons. I Guess it is also possible to let your phone act as a beacon and use a pi to scan. Offcourse there might be some issues with battery draining :slight_smile:

For Presence detection the transition is also interesting (eg.enter/leave zone).

Hmm… I didn´t think of this…
I already have two running Pi´s model 3 (bluetooth integrated) in my doorway…well, in my garage, but it´s close to my doorway. I might want to try a Pi beacon and let it scan for devices.

You might want to use @rlkoshak sensorReporter, then the work is pretty much done for you:

If you carry around something that beacons (seem to run around $8 US) you can use reelyActive running on the Pis. Not only will it tell you when someone is home but which Pi they are closest to. It works great for devices that don’t spoof their BT MAC address (which means it doesn’t work well for iPhones and other Apple Devices). The best is to carry around a BT beacon keychain dongle as these always use the same MAC address.

Sounds like an feature I want need to test…
But I´ll probably need som guidens on how to get this to run on my Pi which are running OpenHab. I´m not that familiar with linux style what so ever :face_with_raised_eyebrow:

@mr_eskildsen, did you check out FIND yet ?
There’s some prerequisites (Android && enough WiFi around), but if you meet these like I did, it works fine.

To all:
I wanted to have a brief talk on presence detection solutions on upcoming Smart Home Day, so if there was sort of consensus on best methods, I’d like to spread the word.

1 Like

No, where can I find That?

Looks absolutely cool. I must definately dig into that one :slight_smile:

I do the inverse. My wife and I use our phones as beacon receivers and have several USB-powered iBeacon transmitters (and one that uses RPi BLE) around the house and one in my car. Our phones use OwnTracks to communicate beacon enter/leave events to OH2 via MQTT. We also use GPS as a less accurate way to know when one or both of us is in general vicinity of our home. For example, we wouldn’t want to adjust the thermostats if we leave the house temporarily to walk the dog.

1 Like

Do either of you have iPhones and if so have you had problems keeping OwnTracks running on them? The major reason why I dropped it awhile back was I couldn’t keep it running on my wife’s iPhone and couldn’t rely on her to notice and start it up again.

They are both iPhones. We haven’t had that problem. Were you using it for iBeacon detection or just GPS geofencing?

My wife uses an iPhone SE and Owntracks has been running without hiccup for the last 12 months or so.

Just geofencing and just the one geofence. I also had issues with accuracy with it jumping around thousands of yards while sitting on the couch putting us in then out then in then out … of the home geofence. It would work fine for a few days to a week and then just stop reporting and the app on the phone had to be restarted.

I may have to revisit OwnTracks again if she will let me. We are both a little creeped out about how all of our devices track our every move but if I show her that all OH gets is the iBeacon stuff that might be acceptable.

I have plenty of Pi 3, Pi 0W, and Pis with BT dongles to set up beacons to cover the whole house.

Does anyone know of an app that runs on iPhone that can be configured to publish a message or hit a configured URL in the background? In short, something I can use to report the presence of an iBeacon to OH from iPhone without all the overhead/creepiness of running OwnTracks. I can use Tasker on Android.

You will want to check out this to get a FIND server running and need to use MQTT or HTTP binding/REST to get the information into openHAB.

Found that already :slight_smile:
I also like the FIND-IF part.

Seen from a presence perspective it would be helpfull to have an approach to identify if somebody is around your house.

I would also have suggested OwnTracks. I have played with OwnTracks and beacons in Android (I don’t use fruit phones :open_mouth:). It has been some time ago, At that time I struggled a bit with major / minor. As far as I remeber, I didn’t got it working, It worked fine if I omitted the major / minor and just trigegred on the UUID. If it was a problem with my Raspberry Pi Beacons or Owntracks remains uncertain. Support for Beacons has a longer history in the Apple branch of the app.

I forgot to point you here.

Thanks. That would do for my testing purpose.

I don’t know if there is some sort of consensus. I have benne looking at different strategies to get the best presence detection. My conclusion so far is, that there doesn’t exist one particular method that will cover everything. All methods have it’s own strengths and weaknesses. So I basiclly believe that a good solution is to combine different methologies to get the optimum solution.

I see the sensors grouped in personal / non personal sensors and portable / non portabel sensors.
I guess almost all non personal sensors (at least all those I can think of), is also non-portabel:

  • Door/Window contact
  • PIR Sensor
  • Proximity sensor

Where I have knowledge of both kinds of Personal sensors:

  • OwnTracks (Portable)
  • Beacon (both)
  • Wifi (Non Portable)
  • Bluetooth (Non Portable)

Amongst others…

The non portable sensors has the strength that “false positives” is very close to none. That is since it typically detects if a eg. Wifi newtwork is visible, and thus that defines the geofence. On the other hand It doesn’t deal very well with “false away”. (E.g., if I turn off my phone while at home, presence will be offline)

The portable sensors is OwnTracks or similar. OwnTracks, is event based, so where it really doesn’t matter if I turn off my phone at night (since the transition wouldn’t occur). I considder it as quite stable and accurate, Though I sometimes (rarely) see that the transition doesn’t happend.

The nonpersonalized sensors is also interesting, but I believe that they should be more an supplement, than a primary decission.The Wasp In A Box Algortihm has some thoughts about this. Seen from my perspective, the usage of those sensors could not be of much use alone, but I you build a model and monitors a series off events (eg. pir sensors and door sensors), you could have quite a good guess if somebody is leaving or comming. The problem is that you need to build an individual model, so the precision of the outcome is highly related to how good the model is.
The more I think about it, I believe that I could obtain more or less the same precission by combining the two personalized sensor types. At least if I would create a genric algorithm that is usefull for every body. Maybee some selftraining netwok could be usefull to build a good model.
I still believe that there is a lot off information in the non personalized sensors.

Actually I think, that if I setup a couple of Raspberry Pi’s with a WiFi dongle in monitor mode and also scans for particular Bluetooth MAC’s, combined with OwnTracks. I would have a hit rate close to 100% - at least in my case.

1 Like