Try this first so you can understand how AutoRemote works with Tasker.
Open AutoRemote. Your personal URL should appear on the app's main screen
Navigate to that URL on your PC (you can also use your phone, but for the purpose of this walkthrough, your PC will be more practical)
In the Message field, type "say 5=:=Hello World!" without the quotes and click "Send".
In AutoRemote press the Menu key and choose Log. A message with the text you sent should appear there.Press the back key.
Still in AutoRemote press the Menu key and choose Settings. Enter the Tasker Var Options screen. Enter the following names:
Def Msg Var: armessage
Def Comm Par Var: arpar
Def Comm Var: arcomm
Global Message Var: ARMESSAGE
Global Comm Par Var: ARCOMMANDPAR
Global Comm Var:ARCOMMAND
Open Tasker and create a new Profile with the name "AR Test".Select State->Plugin->AutoRemote->Edit Button.
In the AutoRemote Plugin Options check "Event Behaviour". When using "Event Behaviour", you should always NOT restore settings on that profile (long-click your profile, choose Properties and uncheck the "Restore Settings" option). In the Message Filter type "say" without the quotes. This makes AutoRemote react to any message that has the word "say" in it. Check the Tasker Vars and see that they are predefined with the names we used above.
You may have noticed the "Target" setting. Read more about it here.
Press the Back key->green checkmark->New Task and enter the name "AR Hello"
Click the plus button to add an Action->Misc->Say. In the text enter "%arcomm" without the quotes. This will use the AutoRemote command you sent which is the right side of the =:=, which in this case is "Hello World!". Enter an Engine:Voice of your liking. In the Pitch field, press the arrows icon and enter the text "%arpar2" without the quotes. This will set the Pitch of the voice to be dependent on your second parameter, which in this case is 5 (your first parameter is "say". Parameters are on the left of =:=).
Accept everything and exit Tasker. You're now ready to test AutoRemote! Go to your PC and send the same message again. You should hear your phone say "Hello World!"
Change the message on your PC to "say 2=:=Hello there World!" and send it. You should now hear your phone say "Hello there World!" with a deeper voice. This happened because you changed the Pitch of the voice with the second parameter, and the text the voice says with the command!
Every word on the left of "=:=" will be available as a seperate variable in Tasker (in this case %arpar1, %arpar2, etc) so use these for individual parameters. Everything on the right of "=:=" will be available as just one variable in Tasker (in this case %arcomm), so use these for full phrases.
There's no need to use "=:=" commands for everything. If you want to send simple commands like sound a simple alarm on your phone, for instance, you could just send the word "alarm" and have Tasker make an alarm sound.
Now experiment! Play around with commands and see what you can come up with! You can always contact me if you have any questions!
Target:The target is about not interfering with conditions you don't want to and can be only used with non-event AutoRemote conditions.
You have 2 conditions:
- "home" condition, that you use when you are home
- "sleep" condition that you activate when you go to sleep
These are both non-event conditions.
If you send a "home" message to your phone when you get home, and then a "sleep" message when you go to sleep, the "home" condition would become inactive, because "sleep" doesn't match "home", and that would be the last message your phone received.
If you use targets this is solved. Just set a different target for "home" (target1 for example) and "sleep" (target2 for example), and then when sending the "home" command send it with the "target1" target, and when sending the "sleep" command, send it with the "target2" target.
Only the targeted condition will be affected by the message.
This way, they won't interfere and both profiles will be active at the same time.
Message Filter:Here you can define what messages will be considered a match for this Tasker profile. For instance, if you simply want to match a message that says "Hi!", you could write "Hi!" in this field. You can also partially match the barcode ("Hi" will also match "Hi!") unless you check the option below to match the exact message.
Clear Message Filter:This will simply clear the message filter. Leave it cleared to match any message you read (could be useful for testing purposes)
Case Insensitive:Use this option if you don't want the Message Filter to match the exact case of your Message. If you check this, a "hi!" Message Filter will also match a "Hi!" Message.
Exact Message:Use this option to only match the exact message or the exact message with a different character case if you check the Case Insensitive option. For example, if you check this option, a "hello sir" message filter will only match a "hello sir" message and not a "hello sir, nice to meet you" message. If you check the Case Insentive Option, it will also match a "hElLo SiR" Message or any other casing variant, but not a "HellO SiR!" Message, for instance
Use Regex:Select this so your Message Filter will behave like a Regular Expression. Regular Expressions are advanced ways that you can use to describe a group of characters, words or phrases. These are useful for creating commands in AutoRemote.
Some quick regular expression examples:
.*:matches any character 0 or more times.Example use:"C.*ar" will match anything that starts with "C" and ends with "ar".+:matches any character 1 or more times.Example use:"C.+ar" will match anything that starts with "C" and ends with "ar" as long as there is one more characters in between (like "Caar" or "Caaaar")[abc]:matches a or b or c"[abc]+" will match anything that has one or more a, b or cs (like "a", "acb", "abc", "abcabacbbb")[1-9]:matches every number between 1 and 9"number [1-9]" will match anything that starts with "number " and ends with a digit between 1 and 9 (like "number 4" or "number 7")
Find out more about Regular Expressions here.
Individual Setup (Tasker Vars)
Message:Here you can set variables to use in Tasker in the Entry Task that will run in this Tasker Profile. For example, if you enter "armessage" here, your entry Task will have access to a variable named "%armessage" that you can use for whatever you like. This will contain the full message that was read.
Comm Params Prefix:Here you can define how command parameters will be named. For example, if you write "param" here, your entry Task will have access to variables named "%param1", "%param2" "%param3", etc, depending on how many parameters your Message has.
Command:Here you can define how your command text variable will be named. For example, if you enter "command" here, your entry Task will have access to a variable named "%command" that you can use for whatever you like. This will only contain the command text (right side of =:=) and nothing else.