Last Updated: Jan 15,2017
Shake Up and Down
Turn Bluetooth ON
Flash Notification 'Bluetooth ON'
First, Kudos to all who have contributed to this thread!
I stumbled onto Tasker a couple weeks ago, then I found this thread and have had it up on my screen reading at my leisure for most of 2 weeks (2 years worth of postings!). When I was about 2 pages into it, I purchased Tasker and have been fooling around with it during the time I was reading this thread. Now that I finally finished reading, I just had to join the forum and post what I have been doing with it.
I, like most people, want a lot of my contexts to be location based because I change several settings depending on whether I am in a "familiar" location or not, and also wish to preserve battery life as much as possible. I also like to impress my friends when my phone talks and tells me what it is up to!
I noticed (maybe I'm wrong) that when I used multiple "WIFI Near" contexts, it seemed to be polling the WIFI way too often (for each context?), so here is how I determine locations in 3 easy steps:
I called my first context "WIFI Pinger" and it is simply "WIFI Near Eternity" and all it does is Say "OMG I am here!". (I don't know if there IS a WIFI SSID called "Eternity", but if I ever come across it, I will know!) This context simply toggles WIFI on periodically to check for any signals it can find.
The second one is called "WIFI is On" (%WIFI eq on) which gets triggered by the WIFI Pinger.) This runs a task I call "Wifi Check" that simply captures the WIFI Info (%WIFII) into a global variable "%wifiInfo" (IF it is at least 20 characters long and contains "SCAN" in the text.) and has an Exit Task called "Where Am I" that basically determines if any familiar SSIDs are in this text (more on this later).
The third one does a "WIFI Connected *,*,*" (to anywhere) which calls a task "Log In" which cleans up and stores the current WIFI Info (%WIFII) which contains the connected SSID, speed, channel, etc.) into another global variable (%wifiConnected) along with a date and time stamp, and has an Exit Task called "Log Out" that modifies this global variable by simply putting "!!!" in front of the SSID and the current (logout) time at the end.
Now, for the Task called "Where Am I".
This is for determining if I am at a "familiar place" where I want to relax my security (disable my keyguard, etc.) and whatever other settings I want to set in this case. I wanted to use a single integer variable and just set bits for each location, but the best I could do was to create another global variable called "%FAMILIAR" that is a comma delimited string, initialized as "0,0,0,0,0". I change the first number to "1" if I am at home, the second to "2" if at work, the third to "3" if in the car (car bluetooth connected), and the fourth to "4" if I am at a friends/family/any other generic "familiar place", usually based on identified WIFI SSIDs (they are everywhere!) or connected BlueTooth IDs. (The fifth spot is currently unused)
Now I created these profile contexts to track where I am:
...%FAMILIAR Is Set + %FAMILIAR neq "0,0,0,0,0"
.............Say "There's no place like home" IF %FAMILIAR ~ "*1*"
.............Say "Let's get to work" IF %FAMILIAR ~ "*2*"
.............Say "Going for a drive" IF %FAMILIAR ~ "*3*"
.............Say "I recognize this place" IF %FAMILIAR ~ "*4*"
.............Say "I feel threatened!"
....%wifiInfo ~ *[homeSSID]* + %FAMILIAR ~ "*1*"
..........-> Enter Home
...........<- Leave Home
................Say "Are we going somewhere?"
....%wifiInfo ~ *[workSSID]* + %FAMILIAR ~ "*2*"
...........-> Enter Work
............<- Leave Work
...................Say "Going right home tonight?"
... ... ...
....%FAMILIAR eq "0,0,0,0,0"
.........-> Guard Up
.........<- Guard Down
.....BT Connected [carID]
.........-> Enter Car
...............Set %FAMILIAR position 3 to "3"
..........<- Leave Car
...............Say "We're here. Let's go!"
...............Set %FAMILIAR pos 3 to "0"
I also have several "Cell Near" contexts of familiar places that simply Say "I smell home/work/friend/food/alcohol". My original thought was that these would be the triggers to enable/disable my WIFI Pinger to further save battery, but it turns out I am getting good battery life as is, so it is just fun to hear it announce when it's close to something it recognizes.
So, not only does it announce where I am or what I'm doing in real time, I can always look at which profiles are "green", or at my variables and see what my "FAMILIAR" string is, the last connected WIFI information, and last seen WIFI signals, etc.
Now for the FUN PART!
I added another profile triggered by shaking the phone that will slightly modify and read out all the currently active profiles. I impress my friends by shaking my phone and having it say:
"I am at a familiar place. I am in the car. I smell home."
"I am uncomfortable. I am wandering around. I smell alcohol. Wifi is On."
I've never had so much fun with my phone since discovering Tasker!
I'm working on one to create an appfactory app for my wife and daughter's phones. My Wife's will send sms' depending on what button she pushes... Location, Call, Lock, Unlock. When my daughter's phone gets the sms with the "Location" command it will text back the google maps link. If it's a "Call" command, It pops up a blocking dialog with a button that automaticaly dials whoever texted her. Only making that call will remove the screen block. The "Lock" command will never remove the blocking dialog until a "Unlock" command it sent. Only the phone call to whoever I make buttons for will be available.
I don't suppose you can export those profiles? I'd absolutely love to have my phone do something like this when I'm near home/friends wifi without the huge battery drain!
And what happens when you manually turn wifi on/off?
Doesn't matter if wifi is off. (I pretty much leave it off.) The "pinger" will toggle it on for a few seconds then toggle it back off (toggle option works great here). You can set how often it toggles wifi in the "monitor" preferences. I did a similar thing with a "bluetooth" pinger - periodically check for some non-existent connection. Then use "wifi on" or "bluetooth on" contexts to do the actual work. That way several things can check "wifi near" without toggling wifi again (just checks the variable containing the last seen wifi info).
Another nice addition was a task called "Talk" that takes arguments as to what to say, etc. That way you can set the "Say" variables consistently so the voice always sounds the same. Also, I can change what stream to speak on. When connected to my bluetooth in my car, no media can be heard so I always "Talk" on the notification stream.
Once in a while when I'm bored, I'll scan for Cell Near and put a blurb in. Now when driving around, my phone occasionally asks "Are we near the dam?" or "Are you going to get your hair cut?".
The other day I was in a checkout line and got a text from my wife and it read it out loud. Everyone around got a kick out of that. I'm just glad she was only updating my shopping list!
I will add though i am pretty new to tasker.
When I lay it face down it goes silent. Makes it easier when i go to bed i just lay it flat on my night stand. Also when i am in a meeting i usually lay it face down on the table.
When it upside down it locks, since this is how i put it in my phone.
I do the wifi when i am at home by cell towers.
When I open you tube, rocket player, or tube mate it connects to my bluetooth headphones.
I whipped up a profile last night that I'm pretty pleased with... since Google Domains just added dynamic DNS support (as well as an API for updating the records), I created a profile to automatically update a DDNS record for my phone whenever it's connected to Wifi.
No clue what I'm going to do with that, but it was a fun little exercise.
Edit: details posted here: http://androidforums.com/threads/profile-use-tasker-to-update-google-domains-dyndns.895751/
Ahhh I see, that's great hahaha! Some handy info there, thanks for the reply
Your #2 profile concerning getting a call in maps then having maps pop back up after call. I've been trying to get tasker to do this. It's been frustrating. Any help would be appreciated.
Come on man, I spent a couple minutes messing around and figured out the basics of how to get that done.
Profile: State -> Apps -> Maps + Event -> Phone -> Ringing
wait until phone is hung up, launch map app.
I used laying the phone on it's back instead of a call as the event. Dialer popped up when I layed it down. Maps popped up when I pick the phone back up. You may have to to make another trigger to set a variable that inidicates that the phone is on or off the hook, to set the "wait until" part. I use a Qi charger and I have a %Power variable that that sets to "disconnected" for 5 seconds after losing power, "Connected" for 5 seconds after getting power, then is set to "on" or "off" for the rest of the time depending on it's state. This way you can trigger tasks that just happen when you pull the phone off the charger or place it back, or just need to run anytime it's on or off the charger in general. You could do something similar with the phone being on or off the hook.
One that I'm using, and like, is one that asks me @9pm whether I'd like to start my bedtime routine. If AutoVoice recognizes "yes," it switches my Pandora channel & launches Pandora. Otherwise does nothing.
I also recently discovered the AutoInput plugin & have had fun playing around with that. My device isn't rooted, so I'm finally able to turn on GPS & Airplane mode in Tasker.
Hands Free Shazam Search (uses AutoVoice, AutoInput, and AutoShare plugins)
I mainly use this one when im car docked. This profile:
1. Recognizes "Ok Google, tag song" speech
2. Opens Shazam and puts it into listen mode to listen for the song
3. Reads song title out loud and asks if you want to download it
4. If Yes, then open downloader (or spotify) and paste title into song search
5. Press search button.
6. Once downloaded, a separate profile moves the mp3 file into my main music folder.
Delete three directories and the files they contain every day at 1:00a.
A1: Delete Directory [ Dir:download Recurse:On Use Root:Off Continue Task After Error:On ]
A2: Delete Directory [ Dir:temp Recurse:On Use Root:Off Continue Task After Error:On ]
A3: Delete Directory [ Dir:tmp Recurse:On Use Root:Off Continue Task After Error:On ]
I'm mostly done with what is a Route Log app. I deliver oxygen. In the morning when I run the app, a scene pops up and has inputs for entering what I have loaded on the truck and makes a hazmat sheet that will print to an office printer. Then when I arrive at a stop and I take my phone off the charger it records the time, checks the gps, and finds who is associated with that location. I can just run the app instead and it doesn't check location. I can then scroll through the customer list and pick one, or just type it in. I can also adjust the arrive time if I forgot to log when I got there. Or I can delete and rearrange the names on the list. When I leave, a scene pops up with an odometer scroll wheel and a pick list of possible things I did at that stop. After picking those, it then shows all the info that has been recorded to allow you to make sure that everything is correct before entering it into the actual log. You choose to correct any of that info if need be. If you've entered a new customer name, it will ask if you want to add it to the list, as well as new things you might do at a stop. If it took a GPS reading, it will add it to the list as well. The app keeps track of your lunch time too. If you make a 5 minute "Pit Stop", you'll have 55min of luch left. I normally go home for lunch. When I'm logged as being home, it asks if I want to set an alarm for -5min of your remaining lunch. That way you have 5 minutes to finish up whatever you're doing during your lunch. If you do log in a few minutes late and don't want the boss to ask why you where at lunch over your allotted time, it figures out how long you are over, and adds it to your next stop, and makes your lunch exactly 60 minutes every time. You can also tell it you're only stopping for a quick drink or something and it will take that time and add it to your next stop. That way you don't get questions on why it took you 10 minutes to drive a 5 minute drive. I've recently added an audio recorder that comes on at every stop. That way I have a recording of what I did. Too many times people have called the office to complain about me when they were the one's being the asshole. It shuts off when I leave the stop, and renames the file to the customer's name. They are put into a folder that is titled the day of the week. Last weeks Monday is deleted the following Monday so i always have a week of recordings. At the end of the day you can hit a button in the options menu to print the day's log. If you forget, the next day when you go to print your hazmat sheet, you'll be prompted to print your log as well. Currently it would only work for me, but I'm slowly adding options to make it possible for anyone to use it as an appfactory app. That will be a while though. I'm always catching little bugs or things I want to improve that slow me down.
Here goes a motivational project for the beginners. I recently launched an app on playstore entirely made with tasker.
Its called Go Home Screen, which lets users go to home screen using proximity sensor. Its a life savor specially for students using cell phones n classes.
This is how i made the app. The reason for sharing this is to motivate our brothers that YES, we can totally make stunning material design scenes in tasker.
Okeh so here it goes.
1. Create a profile that has a state that if proximity sensor is on, run a task.
2. And that task would be using 'go Home' option.
So each time proximity sensor detects any hinderende, it will take us to the home screen of the launcher.
3. Next we have 3 scenes in total in the the app. One is the main scene that has toggles. And the other one allows scheduling and has 4 number strollers.
Lastly there is an about scene for thr app info.
There are other global variables involved to control and update the toggles.
Hope this motivates every one out.
If you wish to try the the app, it would he a great honor to have positive 5 star reviews.
Also you can leave me out questions using the feedback button within the app.
Have patience with me, I'vent had a lot of sleep last night.
Standard battery saving and other features such as GPS and mobile data switching on/off with relevant apps, disabling lock whilst connected to home wifi (wifi is disabled when out and about, but cell near switches it on as I approach home).
I broke my S4 Active's touch screen, and got a cheaper replacement as my "daily phone" (Galaxy Ace 4), so now I'm using the Active as a voice controlled IR remote control and music/radio player/speaker phone/answering machine etc... I've only just starting to set this up, so I really haven't had time to either figure out or get around to doing the really cool stuff. I've got a few things going though.
Voice controlled home theater, using Autovoice plugin and Smart IR Remote app. Setting this up is a bit tedious, with a lot of browsing and clicking for each command, but there's probably easier ways to do this which I haven't discovered yet, like profiles and tasks on the web somewhere....
A sidenote to the Smart IR Remote app. The built in profile for my antique Sony TV offered a limited selection of customizable buttons. I then tried a slightly different model number, and Voila! A herd of new buttons which, unsurprisingly, worked on my TV too. Some buttons names had to be changed (HDMI1 was really HDMI 3 etc) but all functionality was in place. I think it's possible that this is the case for a lot of different devices, so if yo feel the app offers too few buttons, try a slightly different models profile.
Voice controlled radio. A voice command launches the radio app, and Autoinput, another plugin, browses to the proper channel on the app and presses the Play button (thus making my preferred channel the default one, overriding the apps preference. Not sure this is needed in all cases but it was in mine)
I got the Active pointed towards the IR receivers,sitting on a QI charging pad (there's no official wireless charging solution for the S4 Active, but a QI mat for the S¤ non-active will fit in there, making a tiny bulge and of course making it non splash resistant), so battery isnæt really an issue, but I still use Autoremote to let my Ace tell the Active I'me home (Home wifi connected triggers "Dad's home" message to the Active), so the Active can have it's beauty sleep while I'm out.
This is just what I've gotten around to yet, but I see great possibilites in combining devices via Autoremote (and since the desktop windows PC still plays a big part in my life, EventGhost plugin), IR blaster and voice controls.
Phone is silenced. Someone in your Family group sends you a text message that begins with ...
help or sos
... your phone rings ) ... the message is verbally announced (on the media stream) ... a popup(adjusted for display size) that does not timeout is displayed on the screen.
Event: Received Text [ Type:Any Sender:CG:Family Content:help*/sos* ]
A1: Play Ringtone [ Type:Ringer Sound:Flutey Phone Stream:3 ]
A2: Say [ Text:urgent call from Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A3: Say [ Text:%SMSRN Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:On ]
A4: Test Display [ Type:Resolution Data: Store Result In:%work ]
A5: Variable Split [ Name:%work Splitter:x Delete Base:Off ]
A6: If [ %work1 < 1024 ]
A7: Popup [ Title: Text:~ tlaUrgent call from ~
~ %SMSRD ~ %SMSRT ~ Background Image: Layout:tlaUrgent0512-0256 Timeout (Seconds):600 Show Over Keyguard:On ]
A9: Popup [ Title: Text:~ tlaUrgent call from ~
~ %SMSRD %SMSRT ~ Background Image: Layout:tlaUrgent1024-0512 Timeout (Seconds):600 Show Over Keyguard:On ]
A10: End If
I've created a few very simple profiles. One beeps when my battery is fully recharged so I know to unplug it, one beeps and displays a warning when the battery temperature is getting high (My Galaxy S3 burnt out a few years ago because it got too hot - although that seemed to happen overnight when it was charging which is a bit worrying), I have one that reads out the sender of any WhatsApp messages if my screen is turned off (which is quite useful because if it's from certain people then you might want to prioritse replying to them as opposed to leaving it for a bit for less "important" people - not that there are really any people less important than anyone else, but you know what I mean!). I have a profile that takes a photo on the front camera if the unlock pattern is entered wrongly 3 times (though I just end up with mug shots of myself when I'm trying to unlock the phone when it's on the sofa! And I don't actually do anything else with the photo as yet. I want to send it as an email, but I think I'm going to need a 3rd party plug in for this to get around the fact that - I think - you can only compose an email in Tasker at the current time).
I have a couple of more interesting ones too. One spits out an Infrared signal to my Nikon DSLR at a set interval for a set number of instances so that I can take time lag photos. It's a dead simple Task using a free app (AnyMote Smart - the free version only lets you create one custom remote though, but you could use it through Tasker for controlling any IR device as far as I'm aware). I tried creating a Scene to let me input the delay and number of exposures it takes, but I haven't got that working properly. One of the things I'm struggling with with Tasker is Scenes. I know there are loads of tutorials out there on how it works, I just haven't had the time or the inclination to really study any of them properly yet!
The most interesting Profiles I was playing with was voice controlling my TV and set top box. I used a couple of plug in's for this. One is AutoVoice which is a really powerful plug in for recognising voice commands. It's far more powerful than the voice recognition built into Tasker as you can monitor for specific words within a sentence and split sentences into individual words etc. so lots of scope for saying multiple commands in one sentence and having Tasker run a number of different tasks based on those. I was also using the paid for version of Locale Infrared Plug-in, but unfortunately since my S4 Mini upgraded to version 4.4.2 that seems to have stopped working which has kind of scuppered my development of this one! I think I could probably use 'AnyMote Smart' to control one of the devices (either the TV or the set top box), but as I said earlier I've devoted that to my camera so not an option at the moment unless I upgrade to the paid for version of that one. I'm a little bit annoyed that Locale Infrared Plug-in no longer works (especially given that I paid for it, even if it was only a quid or two!) because that was a great plug in. The most difficult part was finding the Infrared Hex Codes for the relevent devices but there's a great website at "https://www.remotecentral.com/cgi-bin/codes/" which has a massive database of IR Hex Codes if anyone else is trying to implement the same thing.
My new project (when I get around to it) is going to be to control my Raspberry Pi Media Centre (using the XBMC operating system) with voice commands. There's an app called Yatse which is incredible (and free!) which allows you to control your XBMC from your mobile over a WiFi connection and I believe if you upgrade to the paid for version then you can incorporate that into Tasker. It's only a couple of quid for the upgrade I think, so when I've got the time to commit to working on this I'll upgrade and see how I get on. I think it should be relatively easy, the hardest bit controlling the IR commands (as I said before) was finding the right IR Codes to transmit to the TV etc.
Has anyone done anything with XBMC using Tasker alone? Or with other plug in's apart from Yatse? Is it possible to send commands to a Raspberry Pi over Wi-Fi using Tasker as it stands? This isn't really something I've investigated, so a bit of a rhetorical question, but I'd be interested in finding out how other people are using Tasker for AV automation. My pipe dream is to automate the whole house with Tasker! "Close the curtains!"..."Dim the living room lights!"..."Make me a cup of tea and do my ironing!!"...We can but dream!
Context - Wi-fi near (Set up to detect my local grocery shops wifi. It's password protected, that's why I use wi-fi near instead of connected. I don't really like to connect to open wifis anyway)
Action - Text my wife to tell her I'm in the shop in case she needs something
I sense there are further possibilities here, like using a shared grocery shopping list app, maybe have the phone ping me or read out the items added by her since last visit, just haven't gotten there yet
I love the "Sleep mode with sms reply" project you can find at thekludge.com I'm currently modifying it to use as a work/busy profile. Note: It took me a while to realize, since I'm stupid, but you got to remove the underscore in the filename before you can import it
Really simple profile - Keep screen on when I'm practicing with ultimate guitar or recording stuff on the 4 track app. Go back to normal timeout when I leave the app.
The location method I use is with cell towers. I have set the phone to check cell towers at regular intervals based on situation and sound a soft sonar ping of the cell is not yet logged with a location. I can also open a scene which will force the cell check. Whenever I am in a place I want to log I open that same scene and label the cell id with a description which is saved into an array. Whenever the phone checks and finds a previously tagged tower it updates a variable with its saved description which drive a slew of settings. For instance, on my commute home, as soon as the phone senses the cell tower near home it turns on my wifi. I work out of many different locations but using this I can have my phone switch to work settings regardless of which one Im at. Huge battery saver.
First of all. Welcome buy you are in the wrong place. As the title says thus isn't a guide side, it's for sharing. There are tons of step by step guides out there and if you need a place to start, Lifehacker has some pretty thorough guides on YouTube.
Like most banks these days, US Bank offers a text banking service. With Autovoice, I say "check balance" and Tasker sends "bal" to the specified number. I then flash a message saying "incoming balance" and the text arrives. I'd love to extract the SMS content to display it in a material styled scene, but I haven't gotten around to it yet. If anyone has a "SMS extraction" tutorial, feel free to share. Otherwise, I'll get around to figuring it out sometime soon.
I had a set-up I lost that was in three steps:
1. When connected to power, turn Blue Tooth on (Then blue tooth would automatically connect to my car if it was available)
2. When BlueTooth Connected to MyCar, start Waze (waze then learned to ask me if I was on my way home or work)
3. If BlueTooth is not connected after 3 minutes, turn off BlueTooth
I also have one to turn on wi-fi when I am near home.
Home Automation with tasker:
Slight twist to the Disable Pattern Lock profile. i work in a pub/bar so my pattern lock will only disable when i'm connected to pub WiFi and if i'm on shift. it wont disable if i'm in the pub and not working.
Separate names with a comma.