18 Aug 2012 davidw   » (Master)

Simple phone alerts with Gmail and Android

I have some long running server processes that I am going to launch soonish, and I want to be alerted when they're done.  Using Gmail and Android, it's pretty easy:

  1. In Gmail, set up a new label, "Alerts" or something like that.
  2. Set up a filter in Gmail that matches messages along the lines of codered@example.com, and adds the Alerts label, does not skip the inbox and are always marked as important.
  3. Now, on your Android phone, in Gmail -> Settings -> Account settings (select the account) -> Sync inboxes and labels, and select your Alerts label.
  4. Then, go back and select Labels to Notify in settings, select "Alerts", and add it to "Notify in Status bar", select an appropriate ringtone, set vibrate to 'always', and deselect 'Notify once' - because we want to be notified any time an alert comes in.

That should do it - on your server, set up an alias in something like /etc/aliases that redirects email from the alert alias - codered in this case - to your own email address.

Now, you can script alerts that will get their own ringtone on your phone like so: echo "Dave, I can't let you do that" | mail -s "Warning, computer malfunction" codered@example.com

Pretty simple and effective if you need a simple way for your computer to let you know that it needs attention right now.

Syndicated 2012-08-18 11:35:04 (Updated 2012-08-18 11:43:59) from David's Computer Stuff Journal

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!