Find my phone software

Would anybody know how to add or develop software (agent and device) to have the same functionality as the Apple “Find my phone software”? I would like my Electric Imp module to be able to know if any phone with my app, registered to my router is in the house or away from the house.
Any ideas?

App on phone pings the agent with its location; agent signals the device when the location comes within range of the known location of the router?

But this assumes the app on the phone is still running/the phone is turned on, of course.

I worked up a similar thing a while back using iBeacons: app detects beacon, so knows it’s in the right place to ping the agent; the agent pings the device to… well whatever you want done that requires your phone to be in the near vicinity. Worked quite well.

Hello smittytone;

Thank you very much for your insight. It gives me hope it may be possible to accomplish.
Do you know anybody that could develop the code? Essentially there would be an Electric Imp device (IMP002) connected to a home device. The home device would keep track where all the “home” cellphones are (invisible to the user) and if they would come near the house, or come into the house, it would react accordingly.

It looks like you have experience with this and I would appreciate your comments.

Regards

Jens Paetau

Jens, If the users don’t wish to be ‘tracked’, they can stop the app. The app has to be running and the phone on (obviously).

All I would like to do if for the IMP002 to recognize that our phones are inrange to the house…or that at least one of our phones is connected to the IMP002. Any ideas?

It would be possible for a phone to have an app that pings the imp and the imp knows the phone is connected … but it still would not know “where” the phone was.

How about if the imp utilized a “find-my-phone” API and got the GPS coordinates for the phone? It could know within a few meters where your phone was.

I have no idea if the Apple find my phone API exists or not. But if the user has the find-my-phone enabled, then it might be a possibility.

Thank you for your feedback. I am going to find out if Apple’s API exists.
Do you think maybe that the Agent code could detect if a phone with my app is connected to my router? I am thinking that if …lets say my son’s phone is connected to our home router (ie in range) it would imply the phone is in the house and not somewhere out of range.
thanks for your help.

The only way to do that, I think, is for the agent to interrogate the router, which would require the router’s IP address (which may change whenever the router is rebooted) and an API on the router itself through which it can be asked it a device with a certain MAC address (that of your son’s phone) is connected. I’m not sure how many consumer-grade routers make such an API accessible. They will certainly send back HTML (the page you’d see if you attempt top configure the router via web browser) but your agent would have to do quite a bit of HTML decoding to extract the info you need.