Solved Check if ADB WIFI is connected

Discussion in 'Tasker' started by CSWinnall, Mar 8, 2020.

  1. CSWinnall

    CSWinnall New Member

    Joined:
    May 31, 2015
    Messages:
    7
    Likes Received:
    0
    Hi i use adb wifi to pause and play my fire stick but if it is the first time i have to press it twice as i am guessing it connects the first time then sends the command the second time

    input keyevent 85

    Is there a way for tasker to check if it is already connected and if it isnt is there a command to connect and then fire the
    input keyevent 85
    Many Thanks
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,477
    Likes Received:
    799
  3. CSWinnall

    CSWinnall New Member

    Joined:
    May 31, 2015
    Messages:
    7
    Likes Received:
    0
    Hi
    Thanks for the quick response as always .

    Sorry maybe i wasn't clear or i've misunderstood the answer

    I use ADB Wifi to send an input to my fire stick but if it is the first time i send the input say since either fire stick or phone has restarted then the first time i send the
    input keyevent 85
    it uses the first time to connect to fire stick as it wont pause/play then when i send the
    input keyevent 85
    the second time it will pause/play the TV.

    The Tasker Function i believe checks to see if my phone is ADB WIFI accessible not if the firestick is accessible.

    I may not be able to see if the phone is connected to the fire stick and i may have to send a "dummy" input each time so that it will guarantee that the play pause command will be done.
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,477
    Likes Received:
    799
    Hhmm, that's not normal actually :) It should work first time. Does it help if you send a "test" command prior to the real command?
     
  5. CSWinnall

    CSWinnall New Member

    Joined:
    May 31, 2015
    Messages:
    7
    Likes Received:
    0
    It works first time most of the time but If i add a adb wifi get info action at the start of the task then it will work every time as they are connected i was just wondering if there was a more straight forward way of checking to see if the connection. Like doing an ADB devices and checking that the Fire Stick is connected? Im not great with all this so im guessing my way through it.
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,477
    Likes Received:
    799
    CSWinnall likes this.
  7. CSWinnall

    CSWinnall New Member

    Joined:
    May 31, 2015
    Messages:
    7
    Likes Received:
    0
    Great seems to work. Installed and restarted phone. I ran the task without the extra action and it worked first time. ill keep testing throughout the day.

    Thank you very much for your time.
     
  8. CSWinnall

    CSWinnall New Member

    Joined:
    May 31, 2015
    Messages:
    7
    Likes Received:
    0
    I have now restarted both phone and fire stick and it worked first time again so i think it is fixed so once again
    Thank You
     
  9. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,477
    Likes Received:
    799
    great :)
     
: Tasker, ADB WIFI

Share This Page