How do you automate with Tasker?

Hmmm, perhaps I should look into triggering via SMS instead?  Is that possible?  Though the email trigger would be handy overall. ;)
 
I have k9 and email me pro as I was contemplating doing the cqc integration that way, will try the tasker integration & let you know.
 
BraveSirRobbin said:
I tried using Tasker to perform an action if a certain email subject was received. Tasker does this via the K-9 email client, which I installed and configured.

The problem was, after the task triggered, the email client would stop refreshing, or checking for future emails.

Anyone else perform triggers with email messages?

I'm running an older Android Motorola Atrix phone with Android version 2.3.7 (unlocked bootloader with Cyanogen 7 operating system).
BSR, are you rooted?  If so, I can give you the scripting/SQLITE3 information to read the sql database directly.  I trigger from a GMAIL notification, and just read the sql database.  :)
 
Only thing that gets messed up is the BODY.  I can get it to read the subjects AOK, as the latest is always first.  I just have to look at the patterns they use for the body.  It works perfect as long as the e-mail is not a thread, but either 1 mail message or only 1 reply (I think).  So far I only read the body to push to my liveview watch.  Otherwise when driving it is only the subject.  If I want to reply based on the subject, I tend to just call the person.
 
Let me know if you want that info.  Was a PITA to setup, but now that it is, it just works.  I also use this SAME method to get the unread count.  Then push that to a Minimilalist Text Widget for my launcher.
 
--Dan
 
BraveSirRobbin said:
Hmmm, perhaps I should look into triggering via SMS instead?  Is that possible?  Though the email trigger would be handy overall. ;)
I also do this.  I don't have texting, but I do have GVoice.  I trigger on any Gvoice, but have Tasker parse the incoming message.  It MUST be from myself, and have the form:
HOMESEER: <message>
 
I split the notification on ": "
depending on WHO sent it (HOMESEER IPCAM, RECON, etc), I do different things.  
RECON lets me control the phone if I lose the phone.  Get GPS, snap pictures, etc.  With this I use python with IMAP and other python scripts to text me information as well as send pictures to myself (use python to BYPASS the GMAIL account/etc that a person could potentially block.
 
When enabled I also force the phone to never allow anyone into Settings or app launcher, so you can not uninstall Tasker, which is locked.  Basically, after I enabled recon, the phone turns into a turd, and sends me all the info it can (if I want it to be that un-usable).  So, the criminal MUST wipe the phone to steal it...which then protects my information as the SD card is encrypted, the wipe, wipes the OS stuff.  Which I can also have Tasker KILL the phone by wiping the OS folders.
Last thing I did, in case the criminal finds the scripts or script engine.  They are zipped up into a deep dark "hidden through obscurity" section of the OS folders.  If Tasker is in recon mode it monitors for the scripts.  If they are deleted, they are re-unzipped.  :)
 
I can also send a text that will tell the phone to enable the SSH server (so I can do all this without having to send multiple texts), as well as do crazy things to the lock screens and what-not.
 
:)
 
I have a Vera and Vera Alerts, so I have an android phone hooked into my Elk speaker system.  One of the things I do with tasker is I have tasks that start and stop Scanner Radio.  Since tasker cannot listen on a port, I have it check to see if a file is modified.  I have two files, ScannerRadioOn.txt and ScannerRadioOff.txt.  I wrote scenes on the Vera with LUA code that appends a letter via FTP to each of these files.  Then I have a virtual switch to turn the police scanner on and off.
 
You'll need to install an FTP server also on the android phone.
 
drozwood,how hard of a setup?  can it be explained so it doesn't take up a lot of your time as I'm interested, but, databases are a BIG weakness of mine!
 
BSR,
 
I assume you are talking about getting information out of the Gmail database?  
Again, you have to be rooted, as the sql database is in the /data/data directory.  You also need root, so you can install the sqlite3 binary.
 
The setup was easy.  I work ASM/C and VHDL.  I know VB, but only because I use Homeseer.
 
Basically, I poked around online, and found that some people that actually USED the sqlite3 command line to read out the databases.  I used their work as a template to get the data I wanted out of the database.  I push the result of the database read into grep and awk...or just awk...I'd have to look.  Then, I have Tasker monitor for various things to cause the script to be run.  When it runs a variable is updated and pushed to the Minimalist Text Widget (for unread count).
 
If you help me work out the bugs, I will  take screen captures and write up a nice walk-though for you.  I'd then like to post it in the how-to section on here for consumption by everyone.  It's been a while since I posted one on here, so I think I need to put a new one up.
 
Jellybean 4.2.2 (maybe other JB has this as well) have unread count on the lock screen by default.  I use ICS on my phone, JB on my Nexus 7.  On ICS, maybe others, you can put owner information on the lock screen.  I enabled this.  Then I use the Tasker Secure Settings plugin (I bought it - totally worth it).  That plugin lets me push a Tasker variable to the owner information section of the lock screen.
 
I have been easily able to get subjects, bodies sometimes get goofed up (I just do not know the DB pattern since GMail has discussions...it seems the order it based on the threading of the discussions, not order received).  Once you get the information into the variable, you can do whatever you want with it.
 
So, I actually use two things from the server.  I get e-mail, and I use Google Voice for sending text alerts.  I found some python scripts that can interface to the Gvoice stuff.  Well, at least for now it does.  When they change the API, I lose this until someone updates the python scripts.  So, I use e-mail.  I find the texting is easier to deal with.
 
You know what, I will do this, assuming you'll use my guides and tell me what I goofed (since it works on my phone, I'm afraid I'll miss something):  
  1. How to get data out of the Gmail database
  2. how to get unread count
  3. What I use to trigger updates to the unread count...so I am not polling...but the value is accurate when read
  4. How to get subjects
  5. How to get a body of a message (although not reliably the one you want)
  6. Putting unread count on the lock screen
  7. using texting through command line (python scripts)
  8. setting up Tasker for interaction with those texts (proper parsing)
Maybe I'll do a part 2 or something where I can explain the RECON Tasker functionality.  That took a LONG time to setup, but was fun.  I guess I could have just installed a piece of software...but what fun is that!?
 
Potentially a part 3, is how I use some of Jon00's scripts (from the Homeseer forums), as well as the Zoom Plugin to make a Homeseer updated page that has tons of quick information for me.  Status of common lights, thermostats, power use, 5 day forcast, etc.  All generated at the touch of my Zoom Widget.  Is anyone interested in this?  This was really easy to setup, especially since Jon00's scripts make it so easy to smash all this information together.
 
--Dan
 
I also use a Liveview watch.  It is neat to be sitting in a meeting and be able to read my texts/e-mail from Homeseer as well as my wife, without doing the "Blackberry prayer".  "Oh, Dan is just checking the time," phone stays in my pocket.
 
--Dan
 
Dan, I'm very sorry, but I just don't have the time to dedicate to do all of that right now.  Perhaps this is something I can tackle over the summer!
 
BSR,
 
A quick update.  I finally re-installed my vehicle monitoring stuff, and configured the software.  So, next on the list is to move to phase 1 of the move to using 100% pfsense on my network at home.  After that, I need to setup my Nexus 7 (new to me) with the same Tasker profiles/etc. that will give me the counts for the mail.  Once I start on that, I'll make screen shots and what-not along the way, as well as export whatever profiles / settings I need to make this work.
 
Should be a good full-setup for anyone.
 
--Dan
 
Back
Top