Second profile triggering only after first is over

Discussion in 'Tasker' started by Nuno Alves, Jun 7, 2016.

  1. Nuno Alves

    Nuno Alves New Member

    Joined:
    May 25, 2016
    Messages:
    11
    Likes Received:
    1
    Need some brainstorming here, guys,

    I have two voice-activated profiles that need to follow one another under certain conditions, e.g.:
    1st profile: turn on set top box
    2nd profile: set channel to x
    voice command: turn on box and set the channel to 120


    Both profiles are doing their stuff perfectly. The problem is the 2nd profile is triggered too soon, trying to set the channel before the box is fully on. I know I could add a "Wait" command to the top of the 2nd profile's task, but I am using it also on it's own and wouldn't want to wait 2secs to set the channel when the box is already on.

    Any ideas? :)
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    If command contains "and" wait 2 secs ;)
     
  3. Nuno Alves

    Nuno Alves New Member

    Joined:
    May 25, 2016
    Messages:
    11
    Likes Received:
    1
    Huh... lol... sounds simple. The only command triggering the 2nd profile, though, is "set the channel". If I add the "and" would it still work on it's own?
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    I meant that in the task you should check if the command you said contains the "and" word. If it does, then that means that you're not saying the standalone command, so you need to wait 2 seconds :)
     
  5. Nuno Alves

    Nuno Alves New Member

    Joined:
    May 25, 2016
    Messages:
    11
    Likes Received:
    1
    I'm having a hard time grasping this one. I mean... the command is setting off two diferent profiles. All the words in between the two... where are they stored? All this gets more complicated as I'm using commands in pt-PT. The "and" is in fact "e", which tends to get lost in the middle of the sentence. lol
     
  6. easiuser

    easiuser Member

    Joined:
    Mar 7, 2015
    Messages:
    50
    Likes Received:
    4
    %avcommnofilter should contain the complete voice command.

    Add the action: Wait 2 seconds if %avcommnofilter ~ *turn on* or any other part of the command that turns on the box before you change the channel.
     
  7. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Oh sorry :)

    Check %avcomm for " e " with the spaces and all :)
    %avcomm contains the whole command that was said.
     
    Nuno Alves likes this.
  8. Nuno Alves

    Nuno Alves New Member

    Joined:
    May 25, 2016
    Messages:
    11
    Likes Received:
    1
    Gotcha!! I was in the right direction then... makes total sense that %avcomm would store the whole string. Somehow I pictured this as two different commands when it's really a single command triggering two different profiles. That was my mistake.

    Thanks mate!
     
  9. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    No problem :)
     

Share This Page