RefBan

Referral Banners

Yashi

Monday, August 20, 2012

Make a Smarter Notification System for Your Phone or Tablet with Pushover

August 20th, 2012Top Story

Make a Smarter Notification System for Your Phone or Tablet with Pushover

By Adam Dachis

Make a Smarter Notification System for Your Phone or Tablet with PushoverNo offense, but your phone's notification system sucks. With a clever app called Pushover, you can create your own custom notification system that's a heck of a lot smarter, so your phone only bothers you with notifications you want, when you want them.

Pushover is a service on the web and app on your phone or tablet that acts as a gateway for the notifications that matter to you. It can alert you about practically anything, including job postings, if it's about to rain, emails from important people, or even if a motion sensor is activated in your home—and it can do it all on a schedule, so you don't receive notifications at times you'd rather not receive them. Below, we'll take a look at how Pushover works, walk through setting up sample notifications, then take a quick look at how you can do even more with Pushover using custom code.

What's Wrong with Your Phone's Current Notification System

In this post, we're going to use Pushover to fix a few problems:

  • Your phone sends notifications at all hours. In the upcoming iOS 6, the Do Not Disturb feature lets you set times you'd rather not receive notifications (and Android users can do this with an app), but Pushover lets you set up as many complex periods of noise-free times as you'd like using a feature called Quiet Hours.
  • You're limited to receiving notifications based on specific apps you've installed on your phone. Sometimes you don't want to install an app just for one specific kind of notification. For example, say you want to be reminded to bring an umbrella whenever it's going to rain. There's probably an app for that, but it hardly seems necessary when all you really need is the notification.
  • Sometimes you want to be notified when something happens on your computer—or somewhere other than on your phone. Pushover can plug into desktop tools in a variety of ways, allowing you to send notifications to your phone when, for example, your computer finishes downloading that movie you've been waiting to watch.

Now that you've got a sense for what Pushover can do, let's set it up.

Step One: Install Pushover and Get Your Account Set Up

It's really easy to get started with Pushover, but you'll want to have a few things in order before you do. Here's what you'll need:

Make a Smarter Notification System for Your Phone or Tablet with Pushover

  • An Android or iOS smartphone or tablet
  • The Pushover app for Android and/or iOS ($4) and a Pushover account (Free)
  • An IFTTT account (Free)
  • OPTIONAL: Basic knowledge of a web programming language (such as PHP) if you want to really customize your notifications even further

Once you've got everything together, there's a little more setup you need to do in order to get started. Just follow these steps:

Make a Smarter Notification System for Your Phone or Tablet with Pushover Consult the image above for an example of the sections mentioned below.

  1. On your mobile device, open the Pushover app and log into your account. You'll be asked to register your device by providing a simple, short name for it. (Note: If you signed up for your Pushover account on your mobile device, you've likely completed this step already.)
  2. Visit https://pushover.net on your computer and log into your account. You should see your devices listed in a section called "Your Devices" a little ways down the page. Verify that any devices you've registered are in this list and enabled.
  3. To make sure everything is working, send a test notification. In the "Send Notification" section on the top left of the page, choose which device you want to send the message to, enter a title, a message, then click the "Send Message" button. If everything's set up correctly, a notification will appear on your phone.
  4. Make note of your user key as you'll need it later. You'll find it on the top right of the page. It is a long string of numbers and letters (e.g. hSkgVIBIUP9TjIxp9TnUQZXelf066Z).
  5. Finally, you may want to set your Quiet Hours. Quiet Hours are user-defined times when you don't want to receive notifications. By default, Quiet Hours is disabled but you can enable it easily by clicking the Edit link next to its name in the Pushover dashboard. Set your time zone and when you don't want to be bothered, save your changes, and Pushover will leave you alone during that time.

Step Two: Configure Your Custom Notifications

Make a Smarter Notification System for Your Phone or Tablet with PushoverNow that Pushover can send notifications to your phone, let's set up what those notifications will be. Of all the services capable of sending notifications through Pushover, none is more powerful than IFTTT. IFTTT stands for if this then that and is a free service that connects with tons of other services on the web to find information and react to it. Working in conjunction with Pushover, IFTTT can send notifications to your phone based on a variety of events. Just follow these steps to set it up:

  1. Log into your IFTTT account and visit the channels page.
  2. Scroll down the list until you find Pushover and click on it. The page will load with a big Pushover icon and an activate button. You probably know what to do next: click activate.
  3. Before the Pushover channel can be activated, you'll need to supply your user key. (Good thing you noted it in the last step!) Paste it into the only text box on the page and click Activate when you're done.

Set Up Pushover Notifications With IFTTT

Now that you've set up the Pushover channel on IFTTT, let's set up some recipes. A recipe on IFTTT is just a task that watches for a certain condition and then carries out an action. For our purposes in this post, the action is always going to send a notification through Pushover. All you have to decide is the first part—what information you want IFTTT to acquire. Here's how you create a new recipe. Let's practice by making a recipe that notifies you every time it's going to rain:

Make a Smarter Notification System for Your Phone or Tablet with Pushover

  1. From your IFTTT account, click the Create link at the top of the page (or just go here). You'll see large text that says "if this then that" with the word this highlighted and underlined in blue. Click on it.
  2. The page will automatically scroll down and allow you to choose one of many Trigger Channels. Because we want to be notified when it's going to rain, scroll down until you find the Weather channel and click on it.
  3. If the Weather channel has yet to be activated on your account, you'll be asked to activate it now. Do that by clicking the Activate button and entering your zip code.
  4. You'll now be presented with a grid of options. You want the one that says "Current conditions change to" because we want to know whenever those conditions change to rain. Click on it to select it.
  5. Choose Rain from the provided drop-down menu filled with weather conditions and click the Create Trigger button.
  6. You'll now find yourself back on the page with the big "if this then that" text, but now the word "this" will have been replaced by a weather icon and the word "that" will be highlighted in blue. Click on "that."
  7. Again, you'll be presented with your channel options. This time, choose Pushover.
  8. Because you've already activated the Pushover channel, you'll be take to the Actions grid. Pushover only has two options: send a notification and send a high priority notification. Choose whichever option suits you best.
  9. Now you get to customize your message. By default it will read It's currently {{Condition}} and {{TempFahrenheit}}F outside. The condition will always be rain, but you can change the temperature from Fahrenheit (the default) to Celcius if you prefer. You'll also have a forecast URL attached to each notification by default, but you can remove it if you want. When you've finished, click the Create Action button.
  10. You're almost done! You'll see the big "if this then that" text replaced with the weather and Pushover icons so you know what you've done so far. Go ahead and add a description to this recipe if you want, and then click the Create Recipe button when you're ready.

You're done! Now you'll see your new recipe appear in the My Recipes section of your IFTTT account. That recipe is pretty cool, but there are a ton more you can use. You'll want to explore your options and create notifications that work well for you, but here are a few that we like to get you started.

Make a Smarter Notification System for Your Phone or Tablet with Pushover

Leave Yourself Voice Notes

Activate the phone channel on IFTT and you can send voice notes to yourself. Just call from your mobile number, record a message, and an MP3 of that message will be pushed to any mobile devices you want via Pushover.

Use this IFTTT recipe

Make a Smarter Notification System for Your Phone or Tablet with Pushover

Get Notified of Urgent Gmail Messages

Perhaps you don't want to get notified of every email you receive, but rather only hear about the ones you consider urgent. Create a filter in Gmail that labels messages with certain subjects or senders with "urgent" and use this recipe. IFTTT will catch all of those messages and notify you on your phone with no need to hear about the other messages you don't care about.

Use this IFTTT recipe

Make a Smarter Notification System for Your Phone or Tablet with Pushover

Get Notified of New Jobs on Craigslist

Looking for a new job? Don't want to miss the chance to apply? You can get a notification every time a job in a specific category is posted to Craigslist in your area. You'll need to edit this recipe a bit to include your local Craigslist listings and the job search terms that apply to you, but that's as simple as searching Craigslist and copying the URL into IFTTT when setting up this recipe. If you're a Flash developer in Los Angeles looking for work, however, you can leave this recipe unedited.

Use this IFTTT recipe

Make a Smarter Notification System for Your Phone or Tablet with Pushover

Get Notified When a WeMo Motion Sensor Is Triggered

If you've got a Belkin WeMo Motion Sensor you can receive a notification every time it's triggered. This is useful for rolling your own silent security system in your house, or even just detecting when the dog jumps up on the kitchen counter to grab a bagel when you're not looking. The WeMo will detect the motion, tell IFTTT, IFTTT will tell Pushover, and Pushover will tell you.

Use this IFTTT recipe

Make a Smarter Notification System for Your Phone or Tablet with Pushover

Find Out When Someone Adds a File to Your Dropbox

If you have people contributing files to your Dropbox public folder now and again, you might want to know when it happens. You can set up IFTTT to use Pushover to notify you with this simple recipe.

Use this IFTTT recipe

Make a Smarter Notification System for Your Phone or Tablet with Pushover

Know When You're Tagged in a Facebook Photo

Like knowing when you get tagged in a Facebook photo, or worried about your friends tagging you in something stupid? This recipe will notify you as soon as it happens so you can check it out.

Use this IFTTT recipe

Make a Smarter Notification System for Your Phone or Tablet with Pushover

Push YouTube Videos to Your Mobile

Sometimes you're on your computer and find a YouTube video you want to watch, but you're on your way out the door and don't have time. With this recipe, just mark that video as a favorite and its URL will be pushed to your phone as a notification.

Use this IFTTT recipe

These are just a few examples of what you can do with IFTTT and Pushover. Be sure to explore IFTTT for several more possibilities.

Set Up Pushover Notifications With Third-Party Apps

Creating custom notifications with IFTT provides you with tons of options, but there's even more you can do with other third-party desktop and webapps. Pushover already works with a handful of options like Adium (OS X instant messaging client), Sick Beard (Usenet and BitTorrent download software), the FitBit (fitness/health monitor), and any email app. The setup process is a little different for each app, so we're not going to go over every single one, but let's take a look at a few to get you acquainted.

Email Gateway

Make a Smarter Notification System for Your Phone or Tablet with PushoverPushover has an email gateway that converts emails you send to your specific user key email address (that you noted in step one) to notifications for your devices. Using it is very simple. All you have to do is send an email to Your-User-Key@api.pushover.net. If you want to send to a specific device, just append that device's name to the end of your API key with the + sign (e.g. You-User-Key+DeviceName@api.pushover.net). The email gateway may seem a little limited at first glance, but there's actually a ton of things you can do with it if you're up for a little programming. We'll discuss those a little more in the next step.

Adium

Make a Smarter Notification System for Your Phone or Tablet with PushoverAdium is a popular instant messaging application for the Mac, and it can forward instant messages you receive to your mobile. You probably don't want every message sent along, but if you have an IM account that exists solely to alert you or you just want to be notified whenever someone tries to send you a file you have that option. Here's how to connect Adium to Pushover:

  1. Download and install the Adium Pushover Xtra, then restart Adium.
  2. Open up Adium's preferences (Command+,) and click on the Events tab
  3. Choose the even that you want to use to trigger a notification and click the + button at the bottom of the window.
  4. Choose "Forward to Pushover" from the list of options, enter your user key, and enter a device name (or leave it blank if you want all your devices to be notified). You can also choose to only forward messages while away or your screen is locked/the screensaver is active. When you're done, click OK.

That's it! Now Adium will work with Pushover. You can repeat these steps to setup as many types of notifications as you want.

Sick Beard

Make a Smarter Notification System for Your Phone or Tablet with PushoverSick Beard is a wonderful application that searches for and downloads media via BitTorrent and Usenet automatically. You can read more about what it does and how to set it up here, but if you're already using Sick Beard you'll be happy to know it has native Pushover support. Here's how to set it up:

  1. Log into your local installation of Sickbeard and choose Notifications from the Config menu.
  2. Scroll down the page until you find Pushover, then check the box next to Enable.
  3. Decide whether you want to be notified when an episode is snatched, when it finishes downloading, or both by checking the box next to your choices.
  4. Enter your Pushover user key in the user key text box.
  5. Click the Test Pushover button to ensure everything is working.
  6. If your test notification works, click the Save Changes button to make your settings official.

With that small configuration, you'll always know what Sickbeard is up to.

This is just a small selection of apps you can set up with Pushover. Be sure to check out the full list for more options.

Step Three (Optional): Extend Pushover Even Further With Custom Code

Make a Smarter Notification System for Your Phone or Tablet with PushoverPushover can do a lot without the need to get your hands dirty writing code, but if you want to take it further if you have a few basic coding skills (or care to acquire them). While the API is full-featured and provides you with multiple ways to create your own Pushover-enabled apps, we're going to look at a much simpler method: your user key email address.

In case you missed it in steps one and two, your user key email address is your-user-key followed by@api.pushover.net (e.g. hSkgVIBIUP9TjIxp9TnUQZXelf066Z@api.pushover.net). You can also notify a specific device by appending +DeviceName to your user key (hSkgVIBIUP9TjIxp9TnUQZXelf066Z+AwesomePad@api.pushover.net). To make good use of this email gateway that Pushover provides, you need a scripting language that can send emails. While there are plenty of options and you can choose whichever you prefer, we're going to use PHP as an example because of its simplicity.

PHP contains a very simple mail function that will send an email whenever it runs. We're going to create a simple script that sends a static notification every time the script is accessed. To get started, open up a programming text editor of your choice and follow these steps, then create a PHP document by adding the following code:

  <?php    ?>  

All the code we write is going to go in the empty middle space inside of the PHP tag we just created. In that middle space, add the following

  $to = "Your-User-Key@api.pushover.net";  $subject = "Notification Subject";  $message = "Notification Message";    mail($to, $subject, $message);  

If you don't want to type this all up yourself, you can download a template here. Once the code is done you just need to change a few things. You'll see three variables in the code called $to, $subject, and $message. Each of them are set equal to a value, and those values should look familiar. For starters, $to is set to Your-User-Key@api.pushover.net. You'll want to change that to your actual user key email address. With $subject and $message, just change their values (Notification Subject and Notification Message, respectively) to the subject and message you want pushed to your mobile device. When you're done, save the script and upload it to a web host that supports PHP (here are some options). Now whenever you visit that script on the web server by entering its URL in your web browser, you'll receive the notification you created. You can use this exact script to allow people to ping you when you're needed.

This is, of course, a pretty limited script, but it's the basis for doing a lot more with Pushover. If you explore PHP further, you can create applications that send custom messages or call a version of that mailing script under certain circumstances. There are many, many possibilities to explore, but this should be enough to get you started. When you exhaust the possibilities of your user key email address, there's plenty you can do with the Pushover API.

Enjoy your new custom notifications!

Number of comments

No comments:

Yashi

Chitika