1. Are you ready for the Galaxy S20? Here is everything we know so far!

BT Near frustration

Discussion in 'Android Apps & Games' started by coyote1, Feb 27, 2016.

  1. coyote1

    coyote1 Member
    Thread Starter

    I'm trying to utilize Tasker to do the following: when any paired Bluetooth comes within range of the Android tablet running Tasker, then Tasker starts a task. The tablet is always on, with the screen always lit.

    I don't want to have to manually do anything. A paired phone in my pocket, for instance, should be detected by the tablet as I approach it and the task should be triggered. Yet it's not happening!

    Am I misunderstanding how this utility is supposed to work? Or are there settings (& perhaps other plugins) that will make this work as desired?

    Btw, the task is to have Smartthings automatically turn on the porch light. It works if I turn bluetooth off on my phone, and then turn it back on a couple minutes later. And I can trigger that in Tasker via Bluetoith AutoConnect by turning on the display, and it catches the light from outside occasionally. I wa hoping for better....

    #1 coyote1, Feb 27, 2016
    Last edited: Feb 27, 2016
  2. coyote1

    coyote1 Member
    Thread Starter

    Just a bit more detail: the ultimate goal is to have the light go on, and the (schlage connect) lock auto-open, when my wife arrives. She goes for a walk with her 4th generation iPod touch, and I'd like the door to unlock as she walks up the walkway without her having to enter a code. She comes back from shopping in her bluetooth connected car, and I'd like the front door to auto-unlock so she doesn't have to fiddle with the lock while carrying bags of groceries. Both the car and the ipod have been paired to an android tablet.

    My thought is that this tablet, sitting near the front door, should be able to 'ping' the bluetooth world for its paired devices every few seconds and, when it sees one has arrived nearby, take an action.
    (Secondarily I'd also like it if when the tablet no longer sees one of those paired devices nearby, it takes another action.)

    But it's not working out that way.
  3. Brian Russell

    Brian Russell Lurker

    OK, Problem 1 is getting the tablet to "ping" the outside world. Problem 2 is getting it to do the Smartthings things when it detects a certain device. Problem 3 is doing something when disconnected from a certain device. You say you've solved Problem 2 ("It works if I turn bluetooth off on my phone, and then turn it back on a couple minutes later.").

    Problem 1 (basic solution)
    The tablet will seek a connection using Bluetooth Auto Connect when BT is turned on, so let's turn it off & on at regular intervals with Tasker. With the setup below, Tasker will see BT is on, wait 5 seconds, turn it off, wait 5 seconds, turn it on... You'll want to play with the wait intervals to work in the real world (connecting may take >5seconds), but it's an easy starting framework.
    1. Create a new task: BT Loop
      1. Task->Wait->5 seconds
      2. Net->Bluetooth->Set Off
      3. Task->Wait->5 seconds
      4. Net->Bluetooth->Set On
    2. Create a new profile: State->Net->BT Status->On
      1. Select BT Loop as the task to run for this profile.
    Problem 3
    We want to set things up so that having the iPod connected triggers action/inaction.
    1. Create a new task: Empty Wait
      1. Tasker->Wait->1 second
    2. Create a new profile: iPod Connected
      1. State->Net->BT Connected->[Use the magnifying glass next to Name or Address with BT on to be able to select from a list of paired devices]->Select the device
      2. Select Empty Wait as the task to run.
    Problem 3a
    If you want to keep bluetooth on as long as the tablet is connected to the iPod, make BT Loop run if BT is on and iPod Connected isn't active.
    1. Long-press on the BT Status On condition in BT Loop to add a condition.
    2. State->Tasker->Profile Active->[Use the magnifying glass to select iPod Connected]->Invert
    Problem 3b
    To have other things happen when iPod connects, set up profiles that trigger tasks when iPod Connected is active.

    Problem 3c
    To have other things happen when iPod disconnects, set up profiles that trigger tasks when iPod Connected is active. Use Empty Wait for the primary task, then create & select other tasks as exit tasks. This way tasks won't just run willy-nilly when iPod isn't connected, but they'll be triggered when iPod Connected becomes inactive.

    I hope this is helpful. I obviously can't cover everything you want to do click-by-click, but this should get you going. Doing this for multiple devices may get a little complicated, but you can work out the conditions needed for various profiles that would trigger BT Loop.

    Good luck!


Tasker Forum


⚙No repetitive tasks for you, let your Android device handle it!⚙
Total Automation, From Settings to SMS. Here are only some
of the things you could do with Tasker. Its real power is the flexibility to combine contexts and tasks however you wish: https://tasker.joaoapps.com/exampleuses.htmlAutomations
Make your phone a true smart
phone! Why remember to change the volume every day when you leave home when your phone can do it for you? Automate stuff based on the app you're in
, the time of day
, your location
, your Wi-Fi network
, Received SMS or Calls
, the currently playing song
and many other (130+) states and events! Check out how easy it is to create an automation: https://www.youtube.com/watch?v=s6EAbLW5WSkActions
350+ actions allow you to truly customize your phone like never before! Send SMS, create notifications, change almost any system setting like Wifi Tether, Dark Mode, Always On Display, change any volume, control Do Not Disturb, open apps, file manipulation, control music playback, get your location... you get the idea. If you can think of it, Tasker can probably do it for you! Note: root is NOT (I repeat NOT) required for majority of the functions.
However, a few of the actions (like the Airplane Mode action and the Mobile Data action on some devices) require root. Regarding those few actions that do require root, this is because of Android security policies that developers cannot work around. ☑ Other Triggers
Manually trigger your actions via launcher shortcuts, quick setting tiles, widgets, long-pressing volume buttons, media buttons (like the ones on your BT headsets or headphones), Bixby button, Navigation Bar, Notificaitons and more! ☑ Join - Remote Tasker
Adding Join (https://play.google.com/store/apps/details?id=com.joaomgcd.join) to the mix will even allow you to trigger tasks from another Android device or PC! ☑ Scenes
Design your own UI and use it to display any info you want or trigger any task! ☑ App Creation
Create your own standalone apps to share or sell with the Tasker App Factory (https://play.google.com/store/apps/details?id=net.dinglisch.android.appfactory)! ☑ Developer Friendly
A lot of 3rd party developers already allow you to perform actions in their apps and listen to their events/states through Tasker! Check out a list of plugins https://tasker.joaoapps.com/pluginlist.html. You can also call most of the Web APIs from Tasker with the powerful HTTP Auth and HTTP Request actions! Check out an example https://youtu.be/yAt2D1XmgUI. ☑ 7 day trial - one time payment to unlock
Get it here: https://tasker.joaoapps.com/download.htmlUseful Links
Starter Guides: https://tasker.joaoapps.com/guides.html Pre-made projects: https://forum.joaoapps.com/index.php?resources/ Official Support Forumhttps://groups.google.com/forum/#!forum/tasker Community full of people willing to help: https://www.reddit.com/r/tasker/ It's not possible to fix problems reported via Play Store Comments so please use the "Report Issue To Developer" option in the app > Menu to do so. Note
: Tasker uses the BIND_DEVICE_ADMIN permission in order to provide the System Lock functionality

February 15, 2020
Last Updated

Share This Page