The URL for weatheronline has changed to: free.worldweatheronline.com/feed/weather.ashx the querystring elements remain the same (?q=%LOC&…)

This profile (well, task) uses the %LOCN variable to get CSV weather data for your location from the web and notify you of it. It's pretty quick and works great: on my old and slow-as-hell G1 it gives a response in about 6 seconds. I'm sure it will be quicker still for the rest of you!

Note that you could easily replace %LOCN with %LOC, just where I am in the UK the network location seems fairly accurate; certainly it has a much finer resolution than that of weather reporting and forecasting. I made the task (and thus the example here) notify me of the current conditions, though you could (somewhat) easily adapt it to one of the forecasts provided by consulting the column description data provided in the header of the CSV file.

Prerequisites

You will need a free account with World Weather Online, who do the rather fantastic service of giving up to a 5 day forecast in CSV format from your provided latitude/longitude. Sign up here.

I think you have to click a link in the email they send you, so give your real address. I haven't had any junk from them so no worries there. Notice in the email that there is a long string of letters/numbers in bold, something like so:

So, create a task. Name it something along the lines of 'Weather Notification'. Add the following actions:

Net / HTTP Get

Server:Port = www.worldweatheronline.com/feed/weather.ashx?q=%LOCN&amp;format=csv&amp;num_of_days=2&amp;key=00000x0xxx000000000000 [replace number of days with one of 2,3,4,5 to receive that many days of forecast. Paste your API key in here instead of that string of x's and zeroes.]

Timeout = 10 [Your choice, I found the site responds quickly so a fairly low timeout value of 10 seconds could be used.]

Variable / Variable Split

Name = %HTTPD

Splitter = esc,precipMM

Variable / Variable Split

Name = %HTTPD2

Splitter = ,

Alert / Notify

Title = %HTTPD25

Text = %HTTPD22 deg C

Variable / Variable Split

Name = %HTTPD24

Splitter = //

Variable / Variable Split

Name = %HTTPD242

Splitter = 64/

Net / HTTP Get

Server:Port = %HTTPD242

Mime type = image/png

Output File = weather_thumb.png [This saves an image to /sdcard/weather_thumb.png . If you like, hide it in a folder or something. I just left it on root for laziness and simplicity]

You may notice the notification is done and dusted in the middle, but still more actions are going on. These are prep work for later! I set it up so that tapping the notification produced a popup with further info. If you aren't interested in this then you can ignore actions 5-7 and just have a task which notifies with temperature and a brief description of overall conditions. The real meat is yet to come though!

The details profile

(I will upload the file for this soon)

This profile watches for a notification click from the first task, and then provides more info about the weather.

Further considerations:

Something I considered setting up was logging of the values for current temperature overnight, and issuing a warning in the morning if the temperature had dropped below zero, i.e. if there was a possibility of ice having formed on the roads.

Variable split is a bit of a messy business: working out where all the data has gone and under what name can be a nightmare, so backup your working tasks & profiles before fiddling with one like this!