need to check if phone is nearby

Post your questions and help other users.

Moderator: Martin

Post Reply
konus
Posts: 3
Joined: 28 Jun 2013 14:50

need to check if phone is nearby

Post by konus » 14 Mar 2014 23:35

Hello,
I am planning to hide an old phone in my car and use it to get alerted (and to find my car) when it was stolen.
Since the old phone will be connected to car power, battery life is not an issue for this one. I plan to activate gps and use the trigger "periodical location update" to get a new location every interval. Then I will check the distance to the last known position and if it gets larger, send a sms to my own phone, that my car is moving.

Since I don't need this information, if I move the car by myself (or my wife) I need to check (aka have a condition), if my own phone (or the one of my wife) is near the car phone. Do you have an idea how to accomplish this condition?

My first Idea was to enable bluetooth on both devices and try to connect my phone as keyboard. You can find the flow in the attachment. I found out, that after a period of time the test fails and then works if I check a second time.

So my question: Do you know of a reliable way to check if an other device is available? (I think Bluetooth or WLAN (wifi direct) could be an option.)
Attachments
bluetooth_nearby.xml
(1.92 KiB) Downloaded 784 times

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: need to check if phone is nearby

Post by Martin » 16 Mar 2014 12:26

Hi,

I'm not sure if this works but you could add a flow to your car-phone that detects whenever a bluetooth device connects and then suppress the location reporting for a few minutes.
on the car phone:
-trigger Bluetooth Device Connected: xyz
-action Script: global_location_reporting_suppressed_until = addMinutes(triggertime, 10)

Depending on device the BT connection on the car-phone will be lost after a few seconds (when BT tethering is not enabled).

You could periodically connect from your regular phone to disable the location features of your car-phone:
-trigger Periodic Timer: every 5m
-action Connect Bluetooth Device: Personal Area Network car-phone


Alternatively you could also enable WiFi Hotspot on one of your phones and use a condition WiFi Available on the other phone to see if the access point is available.

Regards,
Martin

Post Reply