Jump to content
jdfwarrior

Weather Workflow (with Conditions and Forecast)

Recommended Posts

FYI: The icon set is difficult to see under dark background themes

 

In the original download, you are correct. I've updated icons and have put it on my blog but haven't updated it here. 

Share this post


Link to post

Yea but, what I'm saying is... in both keywords... it shows 

 

<location>: <condition>

High: <temp f> (<temp c>) Low: <temp f> (<temp c>)

 

It shows both. Why would you need to tinker with anything? It shows both formats

I'd like the ability to hide (or at least reorder) the units as well -- the brackets around the celsius units makes scanning this more of a chore than it should be. I actually didn't even notice the celsius units there until I reread this thread.

Share this post


Link to post

I'd like the ability to hide (or at least reorder) the units as well -- the brackets around the celsius units makes scanning this more of a chore than it should be. I actually didn't even notice the celsius units there until I reread this thread.

 

Fair enough.. I'll get that updated one day this week

Share this post


Link to post

Hi, This workflow is great. I am having only one problem. Clicking on the forecast does not take me to the web site, but gives a page not found error. I am in Tak, Thailand and the forecast shows great in Alfred.

Share this post


Link to post

Hi, This workflow is great. I am having only one problem. Clicking on the forecast does not take me to the web site, but gives a page not found error. I am in Tak, Thailand and the forecast shows great in Alfred.

 

Yeah I noticed it today (thought you had commented earlier?). I tried it on multiple US locations and just assumed it worked everywhere. Apparently not the case out of the US (doh!). I'll get it fixed.

Share this post


Link to post

Yeah I noticed it today (thought you had commented earlier?). I tried it on multiple US locations and just assumed it worked everywhere. Apparently not the case out of the US (doh!). I'll get it fixed.

I commented in a different area. When I found this thread, I thought it was the most proper place to place comments for that workflow.

Share this post


Link to post

Updated. See first post for download link.

 

raguay.customct, you may want to try a different location if there is something near Tak that you could use instead. Apparently the station that reports weather for that location hasn't updated in a long time. If there isn't an option, let me know and I'll try to figure something out for you.

Share this post


Link to post

For anyone curious, I changed line 169 in weather.php to give a little more information…

 

Changed

$w->result( 'weather', 'http://www.wunderground.com'.$location, $weather->display_location->full.": ".$weather->weather, $weather->temp_f.'°F ('.$weather->temp_c.'°C)' , $icon );

 

to

$w->result( 'weather', 'http://www.wunderground.com'.$location, $weather->display_location->full.": ".$weather->weather, round($weather->temp_f).'°F | Feels Like '.$weather->feelslike_f.'°F | Wind '.lcfirst($weather->wind_string) , $icon );

 

So now it looks like:

image.jpg

(And yes, it's cold here.)

Share this post


Link to post

Newbie question here, but I've set my location a hundred times and it's not saving. I've tried saving my location (weather 80202), I get the notification that it saves, then I changed it to something else (weather 90232) and get the saved notification again, but it still tells me "no default weather location". 

 

Am I doing something wrong here? 

 

Thanks in advance for any and all help! 

 

...Josh 

Share this post


Link to post

Newbie question here, but I've set my location a hundred times and it's not saving. I've tried saving my location (weather 80202), I get the notification that it saves, then I changed it to something else (weather 90232) and get the saved notification again, but it still tells me "no default weather location".

Am I doing something wrong here?

Thanks in advance for any and all help!

...Josh

Is it providing feedback matching your location? Try typing the actual city name, make sure you get results, select a result, press enter. Should set the location. Then try forecast or conditions command

Share this post


Link to post

Newbie question here, but I've set my location a hundred times and it's not saving. I've tried saving my location (weather 80202), I get the notification that it saves, then I changed it to something else (weather 90232) and get the saved notification again, but it still tells me "no default weather location". 

 

Am I doing something wrong here? 

 

Thanks in advance for any and all help! 

 

...Josh 

Dave Ferguson helped me solve an issue similar to what you are describing; my Wolfram|Alpha workflow contains a patched 'workflows.php' file. Here's something you can try:

1. Download and install my Wolfram|Alpha workflow (http://cl.ly/2g2C0B450z0G) if you haven't already

2. Open the Wolfram|Alpha workflow's folder (right click its entry in the left column of the workflows section, click 'Reveal in Finder')

3. Open the Weather workflow's folder (the same way)

4. Copy the 'workflows.php' file from Wolfram|Alpha's folder to Weather's folder, which will replace Weather's 'workflows.php' file

5. Done! You can close all the Finder windows that were opened

Hope this helps :)

Share this post


Link to post

Is it providing feedback matching your location? Try typing the actual city name, make sure you get results, select a result, press enter. Should set the location. Then try forecast or conditions command

 

 

Feedback meaning it finds the city or feedback meaning I get weather results? The answer is yes to the first, no to the second (see screen shot)

 

Screen_Shot_2013_03_15_at_11_09_41_AM.pn

Share this post


Link to post

Feedback meaning it finds the city or feedback meaning I get weather results? The answer is yes to the first, no to the second (see screen shot)

Screen_Shot_2013_03_15_at_11_09_41_AM.pn

Ok from there you should be able to press Enter and set your location, then pop Alfred back up using either the 'forecast' keyword or the 'conditions' keyword to get the actual weather

Share this post


Link to post

Ok from there you should be able to press Enter and set your location, then pop Alfred back up using either the 'forecast' keyword or the 'conditions' keyword to get the actual weather

 

Yep, that's what I do and I get the notification that says "Default weather location saved" (see first screen shot), but when I pop up Alfred and type "forecast", it says "No default wether location" (screen shot 2). 

 

Screen_Shot_2013_03_15_at_1_22_47_PM.png

 

 

Screen_Shot_2013_03_15_at_1_24_33_PM.png

Share this post


Link to post

Yep, that's what I do and I get the notification that says "Default weather location saved" (see first screen shot), but when I pop up Alfred and type "forecast", it says "No default wether location" (screen shot 2).

Screen_Shot_2013_03_15_at_1_22_47_PM.png

Screen_Shot_2013_03_15_at_1_24_33_PM.png

I'm away from a computer right this sec. When I get back to one ill take a look. Nobody else has reported this issue so there is some special case going on. Ill take a look and get back to you. If I need it, would you be willing to help me test things if I find a potential solution?

Share this post


Link to post

On my Snow Leopard machine, I'm also having the issue that this isn't recognizing that I've set the default location. Works fine on Mountain Lion. I'm willing to help test anything, and thanks for the workflow!

Share this post


Link to post

On my Snow Leopard machine, I'm also having the issue that this isn't recognizing that I've set the default location. Works fine on Mountain Lion. I'm willing to help test anything, and thanks for the workflow!

 

Really? Interesting. I wonder if joshkarp is using an older version of OSX and there is some common thread based on that..

Share this post


Link to post

Yep, that's what I do and I get the notification that says "Default weather location saved" (see first screen shot), but when I pop up Alfred and type "forecast", it says "No default wether location" (screen shot 2). 

 

Screen_Shot_2013_03_15_at_1_22_47_PM.png

 

 

Screen_Shot_2013_03_15_at_1_24_33_PM.png

 

Can you confirm what version of OSX it is that you are experiencing this issue with?

Share this post


Link to post

Can you confirm what version of OSX it is that you are experiencing this issue with?

 

Mountain Lion 10.8.2. One thing to note is that I'm using Path Finder (replacement for Finder). I tried killing Path Finder and starting Finder, but that didn't change what I'm seeing above. 

Share this post


Link to post

Greetings to all that are having problems with getting David's Weather Workflow to work on Snow Leopard.

 

I have finally gotten it to work (e.g. type forecast and get weather data for the location you entered initially) on two separate Snow Leopard 10.6.8 machines.  Having a working Mountain Lion machine (10.8.3) with Alfred 2 and the Weather Workflow installed as well helped understand the problem a bit better.

 

On the working Mountain Lion machine, a settings.plist file was created at:  ~/Library/Application Support/Alfred 2/Workflow Data/jdfwarrior.weather/

 

On both Snow Leopard machines, a differently named settings file - settings.plist.plist - file was created at:  ~/Library/Application Support/Alfred 2/Workflow Data/

 

Removing the extra .plist from the settings file did not allow forecast to work properly, nor did placing it into the jdfwarrior.weather directory.

 

After a number of trial and error tests, the following is what seems to work on Snow Leopard:

 

In the .../Workflow Data/ directory, you need BOTH a settings.plist and a settings.plist.plist.  The settings.plist.plist file is the file that has the current location and is the file that will be updated as you set your weather location.  The settings.plist file needs to be there as a sort of initializer for other parts of the code to function properly, even though the data in that file is not used (though the data may still need to be valid structurally and otherwise).  You can tell which settings Alfred is reading from if you open the file in a text editor and change the zip code it uses for look-up (e.g. change it from a Seattle zip to a Phoenix zip), then do a forecast and you will see different weather data than your area.  Example below of what to change to see a different forecast for verification that Alfred is reading from the .plist.plist file rather than just the .plist file:

 

Seattle zip in the .plist.plist file appears (in bold) on this line:      <string>/q/zmw:98105.1.99999</string>

Phoenix zip in the .plist.plist file appears (in bold) on this line:    <string>/q/zmw:85004.1.99999</string>

 

Hope that helps some folks and perhaps aids David in correcting the issue with his fine workflow.

 

Cheers,

 

Rob

 

Share this post


Link to post

Greetings to all that are having problems with getting David's Weather Workflow to work on Snow Leopard.

 

I have finally gotten it to work (e.g. type forecast and get weather data for the location you entered initially) on two separate Snow Leopard 10.6.8 machines.  Having a working Mountain Lion machine (10.8.3) with Alfred 2 and the Weather Workflow installed as well helped understand the problem a bit better.

 

On the working Mountain Lion machine, a settings.plist file was created at:  ~/Library/Application Support/Alfred 2/Workflow Data/jdfwarrior.weather/

 

On both Snow Leopard machines, a differently named settings file - settings.plist.plist - file was created at:  ~/Library/Application Support/Alfred 2/Workflow Data/

 

Removing the extra .plist from the settings file did not allow forecast to work properly, nor did placing it into the jdfwarrior.weather directory.

 

After a number of trial and error tests, the following is what seems to work on Snow Leopard:

 

In the .../Workflow Data/ directory, you need BOTH a settings.plist and a settings.plist.plist.  The settings.plist.plist file is the file that has the current location and is the file that will be updated as you set your weather location.  The settings.plist file needs to be there as a sort of initializer for other parts of the code to function properly, even though the data in that file is not used (though the data may still need to be valid structurally and otherwise).  You can tell which settings Alfred is reading from if you open the file in a text editor and change the zip code it uses for look-up (e.g. change it from a Seattle zip to a Phoenix zip), then do a forecast and you will see different weather data than your area.  Example below of what to change to see a different forecast for verification that Alfred is reading from the .plist.plist file rather than just the .plist file:

 

Seattle zip in the .plist.plist file appears (in bold) on this line:      <string>/q/zmw:98105.1.99999</string>

Phoenix zip in the .plist.plist file appears (in bold) on this line:    <string>/q/zmw:85004.1.99999</string>

 

Hope that helps some folks and perhaps aids David in correcting the issue with his fine workflow.

 

Cheers,

 

Rob

 

This should be marked as only a temporary fix. The fix is actually in finding why its not able to read the bundleid from the plist. If I can solve that, I can fix it properly. I need a Snow Leopard machine to test on. I may plug up an old Mac Mini I have and install Snow Leopard on it and see if I can work out what the issue is.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...