AutoInput Tasker/Autoinput doesnt work correctly on BT connections

Discussion in 'AutoApps' started by Nisbo, Aug 7, 2018.

  1. Nisbo

    Nisbo New Member

    Joined:
    Aug 7, 2018
    Messages:
    6
    Likes Received:
    0
    Hello from Germany,

    yesterday I found the Tasker App and I purchased Tasker and AutoInput.

    What I want to do is:
    - If my mobile phone (Xiaomi Note 4, not rooted) connects to the BlueTooth of my car, Spotify shall be started
    - If the phone disconnects from BT (car), Spotify shall be stopped

    I created 2 tasks, one for Start and one for stop
    Start Start
    - Load App --> Spotify, not further options (I also tried Always Start an new Copy)
    - wait 5 seconds
    - Go to Homescreen 1 (I tried also 0)
    --> I dont ant to press the Play button, therefore I did not create an action for this

    Stop Task
    - Load App --> Spotify (to bring the app to the top/frot)
    - wait 3 seconds
    - AutoInput Action (Type: Text, Value: Pause, Action: Click, TimeOut 5 Seconds, I tried also 20 seconds)
    - wait 2 seconds
    - Go to HomeScreen 1 (tried also 0)

    I created a Profile for Start
    - Name: Name of the BT network, Address empty (I tried it also with the Adress and empty Name)
    - I set the green arrow task (start) to the Start task
    - I set the red arrow task to the Stop task
    - I enabled the profile

    If I test the tasks in Tasker, everything is OK, Start / Stop works like a charm

    The problem are the "live conditions",
    . if I enable the BT on the other device,
    - the phone connects to the device
    - the Start Task starts, Spotify will be started
    At this point the task stops and after some seconds I get an error on the taskbar:
    AutoInput action error
    Action timed out
    so Spotify will maintain on the screen and the task did not open the HomeScreen

    Don't know why Autoinput creates this error, there are no steps for AutoInput in the Start task, however as told before everything works fine in the demonstration/test mode

    Tasker and Autoinput have all possible rights

    OK now I click in spotify on play (normally I will do this from my car)
    Now I turn of the BT of the other device, nothing happened, Spotify will not show up, no error message from autoinput
     
  2. Nisbo

    Nisbo New Member

    Joined:
    Aug 7, 2018
    Messages:
    6
    Likes Received:
    0
  3. Nisbo

    Nisbo New Member

    Joined:
    Aug 7, 2018
    Messages:
    6
    Likes Received:
    0
  4. Nisbo

    Nisbo New Member

    Joined:
    Aug 7, 2018
    Messages:
    6
    Likes Received:
    0
    OK I tested something and now it works partly

    If I removed the Stop Task from the profile, now Spotify will be opened and afterwards the phone will change to the chosen HomeScreen as expected :)

    Looks like if the BT connection will be established more than ones like
    connect, disconnect, connect in a very short time
    and this connect, disconnect triggers also the Stop Task

    However, even if I only activate the Stop Task for testing purpose nothing happened,
    Spotify did not show up and no errors appear (it works in the test mode) maybe the disconnect is also triggers twice ?
     
  5. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Sorry, I'm a bit confused. What part of the process is not working right now?
     
  6. Nisbo

    Nisbo New Member

    Joined:
    Aug 7, 2018
    Messages:
    6
    Likes Received:
    0
    Disconnect BT is not working (works in demo mode), as I wrote it looks like that the BT connects/disconnects at least 2 times in a very short time (some milliseconds) wich leads that the Task (or both tasks) is/are started several times.

    as a further example, if I only configure the exit task (the red one and no green task) in my profile
    - now I open the Profile overview in Tasker,
    - I turn on BT on the other device,
    - the color changes to green,
    --> normally at this point the entry task (green) wil be executed (but is not configured)
    - the exit task will be executed (color of the profile is still green)
    --> the task is not inverted
     
  7. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Ok, you should long press the profile -> Settings for profile and set the cooldown time to something like 5 seconds :)
     
  8. Nisbo

    Nisbo New Member

    Joined:
    Aug 7, 2018
    Messages:
    6
    Likes Received:
    0
    THX for you andwer but no idea how follow your solution

    - I open Tasker
    - I am on the profile Tab
    1. solution
    - I enter the profile (where I can choose the name or network)
    - There is no settings option, I tried to long click on the 3 point (top right) nothin happened

    2. solution
    - on the profile tab I long clicked on the profile name, it only selects the profile so that I can delete it

    3. solution
    - on the profile tab I long clicked on the description, nothing special happened, only a popup menue where I can add/delete or change the name

    3. solution
    - on the profile tab I long clicked on the 3 dots (right top) only the normal menue shows up
     
: Tasker, Autoinput

Share This Page