Desktop weather alerts with Adium and Growl on Mac OS X

Updated April 16, 2014 to reflect the new conference.weather.im XMPP server.

Many years ago, the Iowa Environmental Mesonet at Iowa State University established iembot, a service that relays National Weather Service products from each forecast office in real time. iembot messages are available using a Web-based interface, via Twitter (for example, I follow to receive products from the National Weather Service in Charleston), or via XMPP. While I’ve used all three methods, I far prefer XMPP — nothing beats the immediacy of receiving important messages in an IM client, and for me, weather messages certainly fit in that category. Thanks to Growl and Adium, two excellent (and open source) pieces of software that really make the Mac worth using, I’m able to do a number of cool things with the most important messages: sound an alarm, speak out the text of the alert, and even send a push notification to my iPhone when I’m not around (using another app, Boxcar, which has a Growl plugin).

Obligatory Disclaimer

Do not rely on these alerts for life and death decisions — the IEM chat rooms are normally very reliable, but can and do go down (and sometimes for days at a time). It’s a free service and should be treated as such with no guarantee of performance or warranty. If you need alerts to make life and death decisions in an emergency situation, an alerting NOAA Weather Radio is your safest and most reliable option.

Recommended Software

These instructions were written using the latest build of Adium, version 1.4.1 (released November 15, 2010) and Growl 1.2.1 running on Mac OS X Snow Leopard 10.6.5. As long as the Adium and Growl versions match, I see no reason why these instructions would not work on earlier versions of Mac OS X (at least Leopard and possibly even Tiger).

First Step: Join an IEM Chatroom

IEM forecast office feeds are set up as XMPP multi-user chats (often abbreviated as MUC). You’ll need a Jabber account of some type to access them; if you’re a Gmail user, you have one — simply log into Google Talk with Adium. If not, hop over to jabber.org and establish an account.

Note: If you have an NWSChat account (the National Weather Service’s private chat system for members of the electronic media and emergency managers) and use Adium with NWSChat, you can skip this part and head to step 2. NWSChat is based on IEM Chat and the phrasing of the messages is the same as a result.

Once you have Adium set up with your Jabber-compatible account, go to File -> Join Group Chat. You’ll be presented with the following dialog box (and if not, select your Jabber account from the account list):

Chat room setup dialog box in Adium.

Chat room setup dialog box in Adium.

Next, fill in the fields:

  • Chat Room Name takes the format wfochat, where wfo represents the three-character identifier for the forecast office that serves your area (or the area you’re interested in). For instance, if you wanted to monitor the Charleston, SC forecast office, you would enter chschat. To determine which forecast office serves your area, try the National Weather Service’s forecast office map. Click on the area of the map that best fits your location, and then note the three-digit code at the end of the URL. (Yes, it is a bit convoluted…)
  • Server: conference.weather.im
  • Handle: No restrictions here; feel free to accept the default or use a different name.
  • Password: There’s no password on these. Skip this field as well as the Invite Contacts and With Message fields.

Click Join, and you should be in the chat room! If all is well, you’ll be in the room along with iembot, the bot responsible for feeding in the NWS products. (Adium will typically load a backlog of about 10 messages, too.)

Second Step: Configure Mentions

One major limitation of Adium is that it does not let you alert against the specific contents of messages beyond messages that mention you (for instance, a message that reads out your username). Last I checked (during the Adium 1.4 beta period) there was not even a way to AppleScript our way around this. Fortunately, Adium permits you to configure which phrases constitute a “mention,” and it’s through this feature that we are able to set up specific messages to send alerts.

Why go to the trouble? These rooms will send a lot more non-urgent traffic (periodic forecast discussions, short-term forecasts, record temperature reports) than urgent traffic (convective watches and warnings). You will grow tired quickly of receiving alerts for every forecast discussion that comes down every few hours.

Open Adium Preferences and click to the Advanced panel; on the left-hand menu, select Mentions. Press the + sign at the bottom of the list to begin adding to it. I have found that qualifying the statements using iembot’s strict phrasing is helpful in eliminating mentions from sources I’m not particularly interested in (remember, these are global Adium settings being changed here, and using these phrases in any chat will trigger a mention). Using phrases such as WFO issues Tornado Watch instead of merely Tornado Watch will prevent a lot of false positives.

My list of iembot phrases to alert me on.

My list of alerting phrases.

Step Three: Set Up Chat Room to Alert

Next, we’ll need to configure the chat room to behave a certain way when you are mentioned. Now is a good time to save the chat as a bookmark in your contact list: command-click on the chat’s tab and click Add Bookmark. After placing the chat in the appropriate location in your Adium contacts, command-click your chat tab again and select Get Info for Bookmark. Click on the Alert tab (the tab illustrated with a red beacon light, second from right) and you’ll be presented with alerting options. Double-click on You are mentioned (Group Chat) and you’ll be presented with a dialog with alerting options. Go ahead and set up your ideal Growl setting here; I use a Growl notification at High priority for these alerts. I recommend using a different priority for these alerts, especially if you use a theme that can take advantage of Growl priority settings. The goal is to set these alerts apart from regular chats. You can add as many different types of alerts to this event as you like by clicking the plus sign at the bottom of the dialog box. In addition to the Growl notification, I also display the chat name in Adium’s dock icon and bounce the icon every 10 seconds. For a time, I even configured Adium to speak the text of the alert; this turned out to be a bit of a resource hog so I disabled it, but it is cool (especially with the newer Snow Leopard voices that vaguely resemble the NOAA Weather Radio voice).

My chat room alert configuration for my IEM chat room.

My alert configuration for my IEM chat room.

Step Four: Configure Growl

The last step is to configure Growl to play a sound of your choice. This is accomplished in the Growl preferences (found within System Preferences off the Apple menu). When in Growl Preferences, go to the Applications tab, select Adium, and click Configure. In the resulting dialog, click to the Notifications tab and select You are mentioned (Group Chat) from the Notification drop-down menu. Here you can change the display style specific to the notification (if your default display style does not take advantage of priority, consider using a style like Smoke which comes with the Growl distribution and takes advantage of priority), whether the notification should remain on-screen (which can be set in Adium as well), the priority of the message (yes, again; you can override Adium’s priority here if you wish), and the sound you wish to play upon receiving a “mention.”

If you use an app like Boxcar, or want to otherwise forward these alerts to another device or system, this is where you can set up a display style to do just that. (I use Boxcar as a forwarder for when I am away — it is very useful!)

Guess what? You’re done! Wait for a storm to roll through, or find a friend and have them type in the warning phrases to test out your alerts and make sure they work correctly. If they do, congratulations! If not, make sure your phrasing is set properly and ensure Growl is enabled.

Caveats

There are some caveats to this system, most notably that you may still receive alerts for counties considerably far from you. Most forecast offices have a large geographical area of responsibility. WFO Charleston, for instance, covers areas well south of and including Savannah, GA, and as a result I get plenty of alerts for inland counties that are nowhere near Hilton Head or Charleston. (That being said, I find those alerts useful to give me an idea of what might be coming to the inland counties especially.) I’ve yet to experiment with different permutations of the county list to produce more tightly-focused results; if you do and find success with your WFO, please post your results in comments.

The other important caveat: If you’re not running Adium or are logged out of the chat room, you won’t get alerts from Growl. This is particularly important if you set up Growl to forward to your phone via SMS or other push notification service. If mobile alerts are necessary, consider following the appropriate iembot on Twitter and having it send SMS to your phone. If they are mission-critical, then consider signing up for Weather Underground‘s e-mail service ($10 subscription a year — worth it if only to rid the site of ads!); it is usually very quick to dispatch e-mails about important events. If you work in emergency management or the media, you likely qualify to sign up for NWS’s free iNWS mobile alerting service, which I have tested and found to be excellent and very timely.

Feedback and a Call for a Windows Equivalent

Any questions? Need a clarification? Please put it in comments!

Also, if you have a Windows or Linux system and are able to engineer something of an equivalent using Pidgin or another product, write it up and post a link in comments — most people, after all, are not on a Mac and would likely want similar alerting.

If you’re in the Charleston forecast office’s area of responsibility, I’ll see you in chat!

Acknowledgements

Setup instructions for the IEM chat rooms were adapted from instructions for Pidgin IM by Jason Patton.