AutoRemote How to pass variables from Autoremote to tasker

Discussion in 'AutoApps' started by fletch, Mar 21, 2015.

  1. fletch

    fletch New Member

    Joined:
    Mar 21, 2015
    Messages:
    10
    Likes Received:
    0
    Hi,
    I recently got autoremote and know how to pass a static message/notification to autoremote which then triggers a task.

    What I am wondering if there is a way to pass on a somewhat variable message/notification to tasker then pass that message on to a task in tasker.

    For example:

    set thermostat to 74

    The 74 is what needs to be variable and I need to pass the whole message to tasker as a %par1 if that makes sense?

    Thanks,
    Fletch
     
  2. NMemon

    NMemon New Member

    Joined:
    Mar 18, 2015
    Messages:
    11
    Likes Received:
    1
    Within Tasker create a profile
    State->Plugin->Autoremote
    In Configuration
    Tick Event Behavior
    Message Filter->Put some unique string e.g hellothere
    Create a new task for that profile, Alert->Flash
    In the Text of Flash type %arpar2

    Now from another device, create a Task, Plugin->Autoremote->Message
    In Configuration, put the above device's name.
    In Message put in hellothere 74=:=
    Send Message
    You should see a toast with 74 on the called device's screen

    Same thing can be done from Autoremote Registered Devices screen.
    Press the Triangle with exclamation mark beside the device.
    In Message put hellothere 74=:=
    Send Message

    In the called task, hellothere=%arpar1, 74=%arpar2. All the space separated words before =:= can be accessed with %arpar+number. The whole string after =:= is accessed by %arcomm

    Hope that helps
     
    Last edited: Mar 21, 2015
    Evil Genius likes this.
  3. fletch

    fletch New Member

    Joined:
    Mar 21, 2015
    Messages:
    10
    Likes Received:
    0
    Thank you!
    I will give this a try..
    regards..
    fletch
     
  4. fletch

    fletch New Member

    Joined:
    Mar 21, 2015
    Messages:
    10
    Likes Received:
    0
    Ok I tried it and it almost works. I am not needing the %arpar1 variable just the %arpar2


    The problem is the called task doesn't interpret the %arpar2 variable correctly

    If I send "set thermostat to 74:=:" (without the quotes)

    I get "set thermostat success"


    If I remove the :=: and just send "set thermostat to 74" I get
    "set thermostat to %arpar2"

    What I am hoping for is a way for the called task to interpret the %arpar2 variable as 74 or whatever number I set in the message if that makes sense?

    Thanks.
     
  5. NMemon

    NMemon New Member

    Joined:
    Mar 18, 2015
    Messages:
    11
    Likes Received:
    1
    Try this

    Calling task: firstuniqueword set thermostat to 74=:=
    Called task: %arpar5

    74 would be the 5th word on left side of =:= therefore %arpar5 should do the trick
     
    Last edited: Mar 22, 2015
  6. fletch

    fletch New Member

    Joined:
    Mar 21, 2015
    Messages:
    10
    Likes Received:
    0
    Thanks, I will give that a try and see what happens...

    In the meantime, I got it to work this way:

    set thermostat to 74 (without the =:=)

    The called task is using %armessage
    I am not sure why the other variables and =:= are not working

    I am going to keep playing with it as I would like it to work the other way as well.
    regards,
    Fletch
     
  7. NMemon

    NMemon New Member

    Joined:
    Mar 18, 2015
    Messages:
    11
    Likes Received:
    1
    >>> I am not sure why the other variables and =:= are not working >>>

    Well they do work. What exactly are you sending and what is in your receiving task?

    Put the exact phrase here, that you put in the sending task and also what exactly you would expect to see in the receiving task, and what parameters you are putting in the receiving task. Let's see if we can make it work.
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,476
    Likes Received:
    797
    you should just use something like "thermostat=:=74" and in the task use %arcomm :)
    Check here for more info
     
  9. fletch

    fletch New Member

    Joined:
    Mar 21, 2015
    Messages:
    10
    Likes Received:
    0
    In the message I was doing it like this:

    set thermostat to 74:=:

    In the called task I was doing this

    set thermostat to %arpar2

    The output was
    set thermostat to %arpar2

    In other words, it does not pass the variable %arpar2 but displays it as is if that makes sense.

    I had to go back to work today so I did not have time to try the other suggestions as of yet, but I will.

    regards,
    Fletch
     
  10. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,476
    Likes Received:
    797
    It's not :=: it's =:= :)
    Also, just use "thermostat=:=74". Easier that way :)
     
  11. fletch

    fletch New Member

    Joined:
    Mar 21, 2015
    Messages:
    10
    Likes Received:
    0
    ?Thanks...I could have transposed it, not sure as I erased the original test tasks already.

    But I will try all of this on the weekend when I have free time. FWIW I am just tinkering around trying to learn Autoremote/etc to see what it can do.
    Right now what I am doing is sending the messages from my phone to my tablet - which normally stays at home.
    Let me ask you this..is it possible to send emails to autoremote ? The reason I ask is because it would be nice to do the same via a desktop like say from work if my phone is not handy.

    I also have autonotification and it does work for this purpose but not 100% of the time. The problem is the tablet changes the notification message depending on how many new emails are waiting to be read. If one or two it works, but if I have say 5 new messages it just says that and doesn't show the actually notification. It's the fault of the tablet, I know, but just wondering if there is a work around .

    Anyway thanks again for all the help. I am new to tasker, only had it about 1 month so have a long way to go, but getting there....

    regards,
    Fletch
     
  12. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,476
    Likes Received:
    797
    You don't need to send an email to your AutoRemote :) You can simply send a message through your personal URL for example. Or through the Chrome extension, or through EventGhost... You have many ways to get an AutoRemote message on your tablet.
     
  13. fletch

    fletch New Member

    Joined:
    Mar 21, 2015
    Messages:
    10
    Likes Received:
    0
    Just thinking of times when I am on someone else's phone/computer.

    But I am playing around with the extension now and got it working.
    ? Is there a way to make autoremote one of the options under the share option when sending a file?
    Thanks,
     
  14. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,476
    Likes Received:
    797
    You mean on your Android device? Not AutoRemote, but you can use AutoShare for that :)
     
  15. fletch

    fletch New Member

    Joined:
    Mar 21, 2015
    Messages:
    10
    Likes Received:
    0
    So if I have a file on my phone/tablet, I can share it via autoshare, which will then share it to autoremote via the share menu?
     
  16. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,476
    Likes Received:
    797
    Yes that's correct. I actually use that every day to send files to my PC and from my PC to my phone :)
     
  17. pedro mota

    pedro mota New Member

    Joined:
    Mar 30, 2015
    Messages:
    2
    Likes Received:
    0
    Can you help me to get variables in Eventghost via AutoRemote?
    I just made a Macro that i can trigger it from a message send from AutoRemote, but i dont know how to save a second message in a variable to use inside that Macro.
    I just know how to send messages, i mean, with tasker i send that variable content %song to a message, but i dont know how to "parse" that message inside a temporal variable to use in EventGhost Task.
    I appreciate your help.
     
  18. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,476
    Likes Received:
    797
    If you use AutoRemote’s command system in a message sent to EventGhost, all your parameters (words to the left of =:=) will be available to use in other EventGhost actions. Use {eg.event.payload.arpar[0]}, {eg.event.payload.arpar[1]}, etc to access them. To access your command (phrase on the right of =:=) use {eg.event.payload.arcomm}.
     
  19. fletch

    fletch New Member

    Joined:
    Mar 21, 2015
    Messages:
    10
    Likes Received:
    0
    Ok just purchased Autoshare. Can you point me to any faqs to get it going so I can share to autoremote?

    Thanks...
     
  20. pedro mota

    pedro mota New Member

    Joined:
    Mar 30, 2015
    Messages:
    2
    Likes Received:
    0
    Thanks a lot!
     
: variables

Share This Page