Generic Presence Detection

I use a combo of sensors none of which am I particularly happy about their performance for detecting iPhones.

I use the Network binding to ping devices (work like a champ for Android).

I’ve recently implemented the hping3 sensor @ThomDietrich linked to which I’m finding works no better than Network. I’m not sure if I need to adjust the timing or something else but so far I’ve never seen the hping3 detect the device present when Network did not and visa versa. Of course, the hping3 may be making Network work better.

I’ve a Pi 3 running reelyActive. So far it it detects BTLE devices like a champ (my fitbit, wife’s Dexcom and Pebble watch) but it detects the iPhone and my Android very poorly. But this may be caused more because I can’t figure out which device is which so I might not have identified the IDs of the devices I care about. I do notice that every time someone walks by the house reelyActive picks them up. I’m going to watch it some more but this might be a secondary way to detect when someone comes to the door (package delivery). What would be great is if I could find some sort of way to map the BT address of a device, which I can discover on my own, with the reelyActive deviceID.

I’ve also three Pis and my “server” (old laptop) each outfitted with BT and I run a custom script which does something similar to reelyActive, only at a more primitive level, to detect the phones. This works reasonably well though because it uses a sort of moving average to determine presence it isn’t super responsive. Sometimes it also gets stuck reporting a device as ON when it is no longer present,

I’ve not spent a lot of time trying to figure out the problems I have with each of these. I’ve recently had something major go wrong in my office which has really messed up my electronics in strange and inexplicable ways. My monitor died (probably a failed capacitor), the BT on my laptop server can no longer be found, I can no longer access port 443 on the laptop server despite there being no IP tables rules block that port and netstat clearly showing that nginx is listening on that port for all addresses. All my network gear had to be reset (thank goodness for dd-wrt’s backup feature) and I had to remount all of my drives. I don’t know if it was a power surge or an EMP but needless to say, I currently have some bigger problems to figure out right now so I’ve all but disabled my presence detection.

Anyway, as for being on Windows, hping is available on Windows. It will probably require some powershell scripting to make it work but it is not impossible.

4 Likes