yashsingh1/xdaforums huggingface dataset:
[Nexus One Themes and Apps] artesea:
I've been using Tasker since the early betas for months now.

The three things that I always run:

WORK (Location 1km around Work)

- Turn Wifi Off

SLEEP (Hours 22:00-07:00)

- Turn AutoSync Off (this stops emails, but allows calls and SMS during the night)

LOW BATTERY (Battery 0-20%)

- Turn off AutoBrightness

- Set Brightness to 10%

- Set Screen Timeout to 30s

- Turn AutoSync Off
[Nexus One Themes and Apps] mrmarshall428:
Hey I was wondering if you could let me know how you setup your variables. i'm not understanding how to do this. I was trying to setup sleep profile to turn off auto sync and i don't know what to put for variables %Time-?????????
[Nexus One Themes and Apps] crachel:
Previously with Timeriffic (which is fantastic, btw) if I wanted a night profile, I had to guess about what times I would be going to bed. Since I use the desktop dock, Tasker allows me to setup a new event based upon docking my phone, so I've been using this for the "Docked" event:

Enter Task (go to bed)

:

Turn Wifi Off

Lower Ring volume

Lower Notification volume

Turn off vibrate

Exit Task (when I wake up and pull the phone off the dock

:

Load App: Weather Bug Elite (to check the forecast)

I think I'm gonna implement this one too..
[Nexus One Themes and Apps] artesea:
Tasker can be tricky to get used to, but once mastered has amazing power.

To create my Sleep profile here are the step:

Press New, you will get a "First Context" popup, select "Time".

Here you should have From and To ticked. Make sure that From is when you want Sync Off (22:00) and To when it comes back on (07:00). Press Done.

This will now take you to a Task Edit screen.

You don't need to press New, but doing so allows you to name this bit.

Press the "+" button, in the "Select Action Category" select Net, and then Auto-Sync.

Here leave it as "Set: Off" and press Done

Press the Done button along the bottom.

You will now be back in the main Tasker screen. If you want to rename "From 22:00 to 07:00" tap on it, and select Name and give it something like "Sleep".

Press Apply and you are ready to go.
[Nexus One Themes and Apps] OrganizedFellow:
Tasker says to Momma Timmerific and Daddy Locale: "who's your daddy now BIOTCH??!!"

Here's what I did, this might help you.

Let's create a task that send a SMS to the number "466453", which is GOOGLE 411. I have this set daily to check the weather for me.

From your Tasker home screen, create New.

Select First Context : Time.

Select your From time. Make sure it has a checkmark, and un-check To. Click Done.

I have mine set for 10:00am.

Press the + icon (bottom left corner).

Select Action Category : Phone.

Select Phone Action : Send SMS.

Fill in the contact number (466453) and the message (weather xxxxx), where xxxxx is your local zipcode.

Tap Done.

Tap Done again.

----- ----- ----- ----- -----

You can test it by changing the Time to a few minutes ahead. Then edit it after you confirm it works.

I have several of these. One for the weather that repeats every 6 hours, another to check my bank balances, and one that texts my wife, "I Love You" ;)
[Nexus One Themes and Apps] Mikey:
Would both of these "Enter" and "exit" be as one task??
[Nexus One Themes and Apps] Mikey:
I see tasks created.....what i'm wondering is.

Do we create a task to revert the phone to a previous state??
[Nexus One Themes and Apps] crachel:
No, Tasker will automatically revert back. For instance, when I lower phone & notification volume and disable vibrate on a phone "Docked" event, Tasker automatically reverts back when I un-dock the phone. I don't have to tell it to put the volume back up and turn on vibrate.

When you click a task in the Profile view, you will get an option to "Add Exit Task", that would be used for doing something unique all together (like launching an app).. you don't have to use it to revert state

Edit:http://tasker.dinglisch.net/userguide/userguide_settings.html
[Nexus One Themes and Apps] Quistnix:
I'm using it to enable wifi on places where I know there's wifi and some power management stuff.. the usual.

There is one task I'm working on that's kinda awesome, but I can't get it to function properly. When I wake up, Tasker polls weatheronline.com for the current weather and the forecast for the day, and reads it out to me. The trouble is in the fact that I can't get it to read me the conditions for the day, it reads me the url for the conditions icon instead.

Attached is the xml of the task, maybe somebody smarter can get it to work?

(note: You'll have to register at worldweatheronline.com for a free key and paste it in the HTTP get action)
[Nexus One Themes and Apps] bennettm89:
I think I may have found a bug... I set up a call block and then deleted it but I still can't call the person. Any ideas?
[Nexus One Themes and Apps] DDM123:
Here's my Forecast task, which is once again based on Wunderground's xml. Check the "Say" action and put your correct TTS.

This one reads off the forecast for two periods, so if you use it in the morning, it will read today's forecast and tonight's forecast. If used at night, it will read off tonight's and tomorrow's forecasts. It uses %LOC so no ZIP code is needed, and it should work anywhere within Wunderground's coverage. It uses a forecast string so it will sound like, "Sunny. Highs in the upper 70s. North winds 10 to 15 mph with gusts up to 30 mph."

Let me know if you have any more ideas about cool tasks which use HTTP get, since I've got the variables all figured out.
[Nexus One Themes and Apps] Wacky M:
Could someone help me out wit the following:

I want to create a profile to run the phone in silent mode between 22:30-07:00 hours, except when the PCsync agenda says i'm unavailable (this is during nightshifts, when the phone must not run silentmode.)

Thnxs in advance.
[Nexus One Themes and Apps] Infon1:
Thanks again bro..
[Nexus One Themes and Apps] DDM123:
No problem. Gave me a chance to figure out the somewhat complex method Tasker uses to parse out HTTP data. Also, I'm out of ideas for improving my Tasker setup.

So if anyone has an xml feed they'd want sorting, and it's something people might use, post it here.
[Nexus One Themes and Apps] 3Shirts:
I have created a task which starts when I get to work which does some actions, waits 30 mins then does a 'goto action 1'.

If I set an exit task to run that task but with Stop ticked, will that stop it when I exit work?

If not, how do I do so?

Thanks
[Nexus One Themes and Apps] fubaya:
Pretty cool. I've been using a different setup but I noticed yours has the same problem mine did. When the voice reads the temperature will be in the "lower 70s", it says "lower seventy seconds" instead of "seventies". I fixed that by running the weather through this sed command below.

My weather setup actually executes a script with the "locale execute plugin" hourly to save the weather info to a file and this is part of the script, but I think you could use the HTTP Get to save to a temp file and run this with the "locale execute plugin" before saying the weather, then delete the file if that "seventy seconds" thing bugs anyone. Just change "filename" at the end of it to the correct name.

sed -i -e 's/20s/twenties/g' -e 's/30s/thirties/g' -e 's/40s/fourties/g' -e 's/50s/fifties/g' -e 's/60s/sixties/g' -e 's/70s/seventies/g' -e 's/80s/eighties/g' -e 's/90s/nineties/g' filename
[Nexus One Themes and Apps] crachel:
How has your experience been with that plugin? Do you think if I was to use rsync over ssh it would work with that plugin?

edit: lol, just clicked your blog and see that you have a rsync example .. nice. was having hell trying to setup keys, but i think your example will work. i want Tasker to see i'm on my home WiFi and either widget toggle or automatically rsync media on my SD with my Ubuntu server.. i've got it to work by entering a password, but cant get keys to work for anything.

edit2: i get a bunch of chgrp errors that i just ignore, i assume you do too?
[Nexus One Themes and Apps] crachel:
Oh snap!!

Thanks to fubaya and his blog I finally got my keys setup and successfully synced my N1 with my Ubuntu Server with a single command!

Now I don't have to screw with manually syncing my media (music, pics, etc)..

I will be posting a tutorial to integrate with Tasker in the next day or two
[Nexus One Themes and Apps] kingpin003:
Nope. That task will end when whatever your criteria for being at work ends. So if you defined it as connecting to your work's wifi, then it'll stop when you disconnect. The exit task is for if you want it to do something special because it disconnects. Does that make sense?
[Nexus One Themes and Apps] brc64:
This is exactly what I'm looking for, but I could use a little bit of hand holding to get it working. All my weather task does is is grab ForecastXML with an HTTP get. How do I save that to a temp file? I think I might be able to figure out the script plugin after that.
[Nexus One Themes and Apps] 3Shirts:
Ok so even though it is looping it will stop running when I leave work?
[Nexus One Themes and Apps] fubaya:
To save to a file, look at the HTTP GET task. At the bottom, there is a line for "output file." Just put or select your file name there and it will save to the sdcard under that name.

I had them but fixed them. From what I could tell, chgrp errors were due to a bug in the command line options in certain versions of rsync. That's why the command on my blog is longer and uglier than most simple rsync commands but does the same thing, just with a different combination of options to avoid the errors. It solved my chgrp errors but your mileage may vary.

I was just thinking earlier that my sync command doesn't need to run every time I connect to wifi. I have it flash how many photos were synced and it's annoying to get several "0 photos synced" if I'm in and out if the house. So later tonight, I'm going to change it to only sync if there are new files. That should be neater and smarter, so if you want to wait until later, I'll post what I figure out.
[Nexus One Themes and Apps] crachel:
Yeah, your rsync command removed the chgrp errors for me too.

I, of course, have hit another problem. I created a dropbearkey on the phone and copy/pasted the public key on my server. When I'm in QuickSSH, I can run my rsync command and the keys match and it completes successfully. When I copy/paste the same command into the Execute Plugin within Tasker, nothing happens. If I run the rsync in GScript, same problem, it won't validate keys and nothing happens. I'm going to keep trying
[Nexus One Themes and Apps] brc64:
Okay, I've got it saving a file, and I've verified that the file is getting saved, but the sed script doesn't seem to be working. I put your example in exactly, replacing filename with "forecast" (the name of the file I was saving). When I test it, I do see the text of the command display as a notification at the bottom of the screen, but it still says "70 seconds" and if I look at the file it remains unchanged.

Any thoughts?
[Nexus One Themes and Apps] kingpin003:
Oops. Forgot it was looping. :) You're right. But it should work to give the goto an if condition. If you make it the same as leaving work then it'll have a chance to exit. So if wifi is how you determine you're at work just have the goto end when you disconnect from the wifi.
[Nexus One Themes and Apps] fubaya:
Have you tried it with root? I assume you need to be root to read the ssh keys. In the execute plugin, you can run it as root by adding an exclamation point before the command, like "! rsync blah blah". I just tested it and it worked for me, so hang in there, we'll figure it out.

Every time I set up a root command with the plugin, it does nothing until I exit Tasker. When I exit, the superuser app pops up and asks if I want to allow the plugin to run as root. I click yes and it works from then on. If you haven't seen the popup, exit Tasker and see if you get it.

I had problems with GScript and ssh, so it may not work for testing. The solution was to use the ssh binary that comes with Better Terminal Emulator Pro to overwrite the one on the system. GScript and the BTEP ssh binary have been living happily ever after since then, but GScript never worked with the regular ssh that was on the phone.

Yeah, I should have explained it better. Instead of using "forecast" in the sed command, you need to use the full name "/sdcard/forecast".

Let me know if that works. I have all this in a script and just use the plugin to execute the script, so while the things I'm telling you guys to do should work, I haven't tested them the way we're talking about running them.
[Nexus One Themes and Apps] crachel:
Yeah, I'm leading my rsync command with ! and have Allowed Tasker with SU

I still think my keys are screwed up. My SSH key path is /data/data/com.teslacoilsw.quicksshd/home/.ssh/dbkey.rsa

which was generated from within QuickSSHD by dropbear. I added the public dropbear key to my server authorized_keys and all is well if i rsync from QuickSSHd. Where are you storing your keys and how did you generate them? thanks for the help
[Nexus One Themes and Apps] fubaya:
I made my keys by using the method on the Cyanogen wiki. It is apparently down at the moment, but by googling it, I think the page is here. The key I use is /data/dropbear/dropbear_rsa_host_key just because that's how the how-to was written. I created them months ago and just backup that directory every time I update.

If you have a terminal client on the phone, try this command and see if it gives you any errors (change the user and ip address):

ssh USER@IP -i /data/data/com.teslacoilsw.quicksshd/home/.ssh/dbkey.rsa
[Nexus One Themes and Apps] brc64:
It seems like the sed command isn't running, or isn't running correctly. I tried forecast, /sdcard/forecast and /mnt/sdcard/forecast, but the file doesn't get edited.

As a test, I added an execute line to the task with the command

echo "test" > /sdcard/test.txt

But no file was generated. So either the Execute plugin isn't working, or I'm not using it correctly. Or maybe both.

Edit: I found this page which gave me a little bit more information on the plugin. Interestingly enough, if I preface the sed line with an @, it definitely hides the notification (I guess they're called "toasts"), so it's doing something. Do I have to specify a path to sed or something?
[Nexus One Themes and Apps] fubaya:
This is going to sound crazy, but that particular test may or may not work. Try using "touch /sdcard/foo.txt" instead.

When the plugin first came out about a month ago, I had the exact same problem with this test:

date > /sdcard/test. I emailed the dev to ask about it and he said the plugin doesn't start a shell so things like redirection and pipes wouldn't work.

Then last week, someone mentioned using the plugin on the google group for Tasker and they were doing echo something > somefile. I brought up the fact that I didn't think that would work. They assured me it did, so I tested it and, sure enough, date > /sdcard/test was working for me although it hadn't before and the dev assured me that it wouldn't.

To keep my sanity, I chalked it up to there being an update that I hadn't noticed, although it's still on version 0.1, but now it's baffling me again. I'm afraid to test it again.

Ok, I tested the sed command and it didn't work unless I used it as root, which shouldn't be necessary, but apparently is for some reason. So try with a "!" instead of a "@" then once you set it up in tasker, test it. It won't do anything at first, but exit Tasker and the superuser app will ask for root permission for the plugin. Click allow then go check the file and see if it worked. I think you have to allow root for it every time you change the command that the plugin executes, but once you have it working, you won't need to anymore unless you change it.

If you don't want the toast message but do want root, you can use "@! sed blah blah"
[Nexus One Themes and Apps] DDM123:
I have a slightly expensive solution for the "seventy seconds" problem with TTS in my task, but you can get TTS Loquendo Susan (US-Eng) off the Market for 5 euro. It's a great TTS and I've been using it as my Nav voice for a few months now.

She sounds a hell of a lot better than the depressed robot-sounding lady we're used to, so if both her voice bugs you and you want an easy fix for this TTS issue, I'd recommend buying Loquendo. 5 euro is a bit though, so I wouldn't blame anyone for skipping it.

Here's a demo if anyone is interested. http://tts.loquendo.com/ttsdemo/default.asp?page=id&voice=Susan
[Nexus One Themes and Apps] brc64:
Okay, I'm making progress here. I had actually tested running the command as root, and saw the odd behavior of not getting the prompt until after I left Tasker, but when I saw the file hadn't been edited I gave up pursuing that. Turns out that if I would have just tested the task again after granting superuser rights, I would have seen that it worked.

I think the problem I'm having now is that my variable splits are still working off the XML from the website, not the altered XML from the sed command. I'm guessing this has something to do with using %HTTPD for the splits, but I can't find any decent explanation of how these work and how to make it split /sdcard/forescast instead of the webpage.

Thanks again for all your help. I'm really learning a lot!
[Nexus One Themes and Apps] crachel:
ok, i changed my key to /data/dropbear/dropbear_rsa_host_key as described in CM wiki.. I've added the public portion to my authorized_keys on my server. when i enter the rsync command, i still have to say 'yes' to the fact that my server is not in my known hosts. no idea why this is so *(&^( difficult...
[Nexus One Themes and Apps] fubaya:
Oh crap, I see what you mean. Like I said earlier, I'm not using this forecast task and thought using sed to filter it would be as easy as saving the file, editing it with sed, then using the existing task to extract the info. But it turns out there's no good way to open the file up for splitting the variables because HTTPD is based on the original.

Out of dumb luck, this seems to work:

Variable set %ONE to 1

HTTP GET and save to file

Execute plugin - "sed ... file"

Read paragraph %ONE from file to variable %FCAST

I'm doing this at lunch in a restaurant so can't test much but %FCAST appears to be the raw xml with "70s" changed to "seventies." Now, all the %HTTPD splits need to come next and also need to be changed to %FCAST because %HTTPD is builtin and can't be changed, darn it.

This is dumb luck because it sees the whole file as a single paragraph. If it had a blank line, I bet it would think that was a new paragraph and screw everything up.

(Edit, actually, looking at it again, it appears to only be reading one forecast period, so it probably needs another "read paragraph" and append the second paragraph to %FCAST)

I'm sorry, I didn't think it would be this complicated.

Do you have to do it every time? You always have to do it once when connecting to a new IP or with a new key, then it puts the fingerprint in the known_hosts file and won't ask anymore.
[Nexus One Themes and Apps] rondietz1:
Tasker and Vlingo Safereader

Anyone out there use vlingo safereader? I love it but can not figure out how to set it up with tasker since the only way I know of using it is through a android widget. How can I have tasker start this or any other widgets?
[Nexus One Themes and Apps] crachel:
I'm connecting to my phone with ADB and opening a shell command, I actually searched and found that you got the same error i was getting @ some point:

no matter how many times I answer yes to this, it continues to ask
[Nexus One Themes and Apps] brc64:
Don't apologize, you've been a tremendous help! I'm only interested in the first forecast anyway, so this works great. I did run into one oddball thing, though. Even after putting in the read paragraph and changing my variable splits, I was still hearing "80 seconds", though viewing the file I could clearly see the word "eighties". On a whim, I tried throwing a 500ms delay after the sed command and before the Read Paragraph, tried it again, SUCCESS!

Also, I added

-e 's/winds/wind/g'

to the sed line because TTS kept pronouncing it like "winds the string around the spool". But apparently it pronounces "wind" like the weather term. Whatever.

Thanks again for all your help.
[Nexus One Themes and Apps] Thomas_BA:
I love susan but tasker brings me an error message when trying to get it to speak with susan 'no text to speach engine available'. Any hints?
[Nexus One Themes and Apps] fubaya:
Great! Glad it's working, and good idea on changing "winds" to "wind." Mine does that too and I hadn't remembered to try to change it.

For what it's worth, here's how I do weather. Compared to DDM123's method, the downsides to mine are that it uses a script (most people won't want to fool with that), it only gets the weather for one location and doesn't follow your "%LOC", and you have to figure out the correct link beforehand. The end results are nearly identical. I use this because I had it set up to run in GScript before Tasker came out. It may seem more advanced, but it's just a simple shell script, which I know how to do. Those variable splits are scary to me.

My script is in /system/bin, but if anyone is interested in setting this up, they probably know how to run it from the sdcard or whatever. It uses mobile.weather.gov. You have to go there and type in your zip code, then click on "7 day forecast", copy the URL and replace "URL" in this script with the real one.

#! /system/bin/sh

wget 'URL' -q -O - | sed 's/<br>/\n/g
s/<[^>]*>//g
s/20s/twenties/g
s/30s/thirties/g
s/40s/fourties/g
s/50s/fifties/g
s/60s/sixties/g
s/70s/seventies/g
s/80s/eighties/g
s/90s/nineties/g
s/winds/wind/g' | grep -A 1 -m 2 '\.\.\.' > /sdcard/.wx

That puts two lines of weather info in the hidden file at /sdcard/.wx. The number of lines can be adjusted by changing the number after the "m" option to the grep command. E.g., "-m 2" gives you two lines, "-m 4" gives 4 lines, etc. Of course, you could take out the whole grep command if it's only going to be used with Tasker, because that will require you to select which paragraphs anyway.

I have Tasker and the Locale Execute Plugin run that every hour, then I have a Tasker widget to say the two paragraphs in that file.

That's actually only part 2 of my weather Task. The first part gets the current conditions from METAR data at

ftp://tgftp.nws.noaa.gov/data/observations/metar/decoded/CODE.TXT, where "CODE" is your airport code in all caps. Just posting that in case anyone else is interested in doing it on their own. That part of my script is highly customized and extremely ugly because I only want certain data and want the TTS to read it a certain way.
[Nexus One Themes and Apps] rickytenzer:
Anyone know if I can get this beast to check to see if music is playing? I'm trying to get music to stop when YouTube is open and then continue playing when it closes.
[Nexus One Themes and Apps] DDM123:
That really seems like something Android should be doing anyway. I hope these small annoyances get ironed out in Gingerbread.

I haven't screwed around with intents and Tasker, but it seems like that's the way you should go. There's some info here about them. http://www.openintents.org/en/node/112

So you should set a profile to launch when Youtube does, then set a variable to 1 if music is playing, and unpause when Youtube exits if that value is 1. You'll probably have to do this for every music player, and I'm not even sure it can be done for Pandora or Meridian or whatever.
[Nexus One Themes and Apps] shantzg001:
I am using tasker for call recording on my nexus one :)

Here are the details on how to set it up and also downloadable profiles: Setup Call Recording With Android App Tasker On Nexus One
[Nexus One Themes and Apps] khaytsus:
Both sides of the convo without speakerphone?