Tasker (Download) Forum

Support Detect if an approved device is nearby

My wife is using a Samsung Tab S tablet with a plan that gives her less download than she uses.
She also has a Galaxy S4 phone with more download than she uses.
The plan is to create a Tasker profile to turn off the phone WiFi hotspot when she gets close to home and turn it on when she's away from home.
The problem is that leaving WiFi hotspot on the whole time she's away could be a major and unnecessary drain on the battery.
The question is: Is there any way of setting up her phone to "know" when the Tab S is nearby, or even better, when the Tab S screen has been activated so that the Hotspot can be activated at the right time?


#1 RobSue, Jul 17, 2017
Here is a stripped-down version of what I use. Turn WiFi on if near xxxxxxxx. Turn WiFi off if not near xxxxxxxx. (Change xxxxxxxx to be your SSID.)

The HotSpot would have to be on for this to work.

Profile: tlaOfficeFar
State: Not Wifi Connected [ SSID:xxxxxxxx MAC:* IP:* Active:Yes ]
Enter: tlaOfficeFarEnter
A1: Wait [ MS:0 Seconds:0 Minutes:1 Hours:0 Days:0 ]
A2: Variable Split [ Name:%WIFII Splitter: Delete Base:Off ]
A3: WiFi [ Set:Off ] If [ %WIFII2 !~ CONNECTION ]

Profile: tlaOfficeNear
State: Wifi Near [ SSID:xxxxxxxx MAC:* Capabilities:* Min. Activate Signal Level:4 Channel:0 Toggle Wifi:Off ]
Enter: tlaOfficeNearEnter
A1: Wait [ MS:0 Seconds:0 Minutes:1 Hours:0 Days:0 ]
A2: WiFi [ Set:On ]

… Thom
#2 Thom, Jul 17, 2017
What have you developed so far? You can long press on the task name and select settings / export / Description to Clipboard and then paste it into a post here.

... Thom
#3 Thom, Jul 18, 2017
All I have so far is a geo based profile that turns off the phone WiFi hotspot when she gets close to home and turn it on when she's away from home. .Your profile seems to do the same by checking the wifi status every hour.

The next step is to turn on the Hotspot when away from home AND the Tab S is around. I can easily turn the Hotspot on when away from home but I only want to do that when the Tab S is nearby. How would I do that?
#4 RobSue, Jul 19, 2017
My app is checking every minute. It turns WiFi off when away from the signal and on when near the signal.

My experience is that GPS location triggering is unpredictable and can not be relied on.

The answer to your question is to have one device determine where it is and send an intent to the other device. The other device reads the incoming intent and determines how close the other device is. If close enough it turns on the hotspot.

... Thom
#5 Thom, Jul 19, 2017
That sounds perfect.How do I send an intent? Never heard of that
#6 RobSue, Jul 19, 2017
I suggest you Google "Tasker intent".

You need to be aware that your solution is going to be a little complicated. There are tutorials online that can get you started. You then need to prototype something and get it working.

GPS sensing is pretty flaky. Tower sensing is even more flaky. What works for one person may not work for another do to their physical location.

... Thom
#7 Thom, Jul 19, 2017