[SOLVED] Presence detection with iCloud binding

I’m currently using the hping3/arping script discussed in iPhone Presence Detection with hping3 and ARP and the execSensor plug-in for sensorReporter which works very well. Better than any of the BT detection techniques I’ve tried.

As of OH 2.2 the Network binding added arping as an option which can replace the above except that I’m running OH in Docker and arping is not available. Or at least it was unavailable as of a couple of days ago. It is now present so the next time I upgrade I’ll probably drop the script and just use the Network binding with the arping option.

So far it is the most accurate phone detection I’ve run.

Like I said above, BTLE doesn’t work for iPhones and newer Androids because they spoof their BT MAC address so you can’t detect a specific iPhone is present, just that there is an iPhone present. This takes out reelyActive and other BTLE based scanning approaches. I also used just regular BT scanning using RSSI but I never was able to tune it well enough to become accurate enough to rely upon. I’d have three sensors (RPis) throughout the house and invariably one would get stuck ON and the other would get stuck OFF and I never could figure out why.

If you have something like a Fitbit or a BTLE token or the like that would work because they don’t spoof their MAC addresses. But for iPhone the best I’ve seen is Network binding with arping or the iCloud binding.

I do run pfSense and I see nothing there that would help. Some have managed to get some scripts running on DD-WRT that publishes when devices enter or exit the wifi network but I’m not sure that it works well when the iPhone goes to sleep. But these all operate at the IP level and would provide nothing to aid with BT detection.

1 Like