I am working on some home automation project and I am trying to use my iPhone as "I am home" sensor.
I tried
- Reachability API (doesn't work in bg)
- CLLocationManager and startMonitoringForRegion (too inconsistent and not accurate at all)
- performFetchWithCompletionHandler (not predictable triggering)
Is there a way to notify that I am on a certain network?
I also tried the reverse approach of continuously scanning my lan, but other that seeming stupid it doesn't work and it's not scalable, iPhone goes in low power mode when it's locked and it just sends beacons, aka is not pingable, reachable.
Assuming:
- I know the iphone mac address
- IP may change over time
- I can't access so DHCP logs
- I can run a server on a raspberry pi to sniff (I don't like it)