Marqtholomew

I have a strange need to be constantly aware of the current weather conditions at the local airports, even if I have no intentions of flying any time soon. I found myself calling the Automated Surface Observation Station (ASOS) at Hillsboro Airport multiple times throughout the day and tying up the phone line, which led me to build a SMS service so I could get the same information through text messages. I started out with the METAR and TAF commands, allowing me to obtain routine weather observations and terminal aerodrome forecasts.

Last night I added a non-aviation related command for retrieving video game ratings from Gamespot. To try it out, just send this text message to sms(-at-)marqtholomew.com:

REVIEW ZELDA WINDWAKER

A minute or so later you will get this reply:

The Legend of Zelda: The Windwaker (GC): 9.3 The Wind Waker is a strong achievement in every way, from its stunning graphical presentation to its tight control

The “9.3″ is the gamespot rating on a scale of 1-10, and is followed by their short synopsis. Very useful for those times when you’re in the video game aisle and desperately need to make an impulse purchase.

I also put together a page that describes the supported commands and gives examples on how to use them. The service is implemented as a python script scheduled to run every minute in a cron job. The script processes the messages and issues replies to the sender’s address.

2 Responses to “Introducing the SMS Service”

  1. Tim

    Mark,

    I’m getting the following error.
    “An Error Occurred. list index out of range”

    I used the following syntax.

    REVIEW SHADOWRUN

  2. Marc

    This should be fixed now–feel free to try it again.

    The problem was that an empty request was received, and there was no check in my program for an empty request, resulting in this cryptic error. I added a check so if an empty request is received, the program will reply “An empty request was received. Please send a request”.

    The program received an empty request because it was just examining the Subject property. In your case, the request was in the Body of the message instead of the Subject. So I added logic to fallback to the Body if no Subject is specified.

Leave a Reply

CAPTCHA image

Proudly powered by WordPress. Design by Salatti.NET and HTM.
Creative Commons License