Jump to content
jdfwarrior

Weather Workflow (with Conditions and Forecast)

Recommended Posts

A suggestion would be to be able to open the forecast results in a URL to the wunderground website for a more detailed view.

 

That could probably be added. I'll try to get this in ASAP.

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.)

That didn't work for me. :( 

 

I changed line 169 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 );

 

And line 171 to:

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

 

"Feels Like" will not be displayed. Still got only "High - Low - Precipitation". 

Share this post


Link to post

That didn't work for me. :(

 

I changed line 169 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 );

 

And line 171 to:

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

 

"Feels Like" will not be displayed. Still got only "High - Low - Precipitation". 

It looks like you're missing a character in your feelslike string. Should be $weather->feelslike_f.

Share this post


Link to post

How difficult would it be to change the source of the weather to Dark Sky/Forecast.io? I'm looking over the API docs now and the results are less human readable than wunderground.

Share this post


Link to post

How difficult would it be to change the source of the weather to Dark Sky/Forecast.io? I'm looking over the API docs now and the results are less human readable than wunderground.

 

I'd love to see that, I too, have been using http://forecast.io/ (so cool!) which runs off the Dark Sky API (check the footer).

 

I've been using this Dark Sky workflow for Alfred (http://j.mp/13y3v5s) but I think it's API key is limited or not functional.. :(

Edited by nick

Share this post


Link to post

I'd love to see that, I too, have been using http://forecast.io/ (so cool!) which runs off the Dark Sky API (check the footer).

 

I've been using this Dark Sky workflow for Alfred (http://j.mp/13y3v5s) but I think it's API key is limited or not functional.. :(

 

I do plan to swap to Dark Sky. I liked the Weather Underground API but its so limited. It only supports 10 calls per minute or 500 total in a day. If you don't go over that in a month, you get a Rain Drop. Which is kind of a, "oops, you went over your limit so we'll just use one of your rain drops and allow you to keep going". I'm using 1-2 a day right now because of the amount of use this workflow is receiving. I'll keep Weather Underground for the location selection but that's it. I'll probably add the ability to get weather for other locations and set multiple locations as default. I just need to get time to do it. Hopefully this weekend or next week.

Share this post


Link to post

I do plan to swap to Dark Sky. I liked the Weather Underground API but its so limited. It only supports 10 calls per minute or 500 total in a day. If you don't go over that in a month, you get a Rain Drop. Which is kind of a, "oops, you went over your limit so we'll just use one of your rain drops and allow you to keep going". I'm using 1-2 a day right now because of the amount of use this workflow is receiving. I'll keep Weather Underground for the location selection but that's it. I'll probably add the ability to get weather for other locations and set multiple locations as default. I just need to get time to do it. Hopefully this weekend or next week.

 

I think with the way weather is going that's a safe bet.  I've been toying with the other Dark Sky Alfred Workflow started here;

 

http://hackmake.org/2012/11/dark-sky-alfred-extension

 

But on the forums as mentioned earlier. Unfortunately, for me, it fails to output. The current developer implemented a new solution that finds your location automatically but did so using another application that the user needs to download and install.

 

it's a legit app, but it's unnecessary so in my opinion it's not really a solution, but a work around, and one that's excessive. 

 

In the meantime I'll cope with loading the web page but I'm following this thread and I have no doubt when you make the switch it will be sweet. 

 

(p.s. You and I have spoke in the past, quite a while back via email regarding possible extensions for Alfred v1.  It's great to see you're still working with the Alfred team and seemingly much more! You guys rock, keep at it. :) Thanks! )

Share this post


Link to post

I think with the way weather is going that's a safe bet.  I've been toying with the other Dark Sky Alfred Workflow started here;

 

http://hackmake.org/2012/11/dark-sky-alfred-extension

 

But on the forums as mentioned earlier. Unfortunately, for me, it fails to output. The current developer implemented a new solution that finds your location automatically but did so using another application that the user needs to download and install.

 

it's a legit app, but it's unnecessary so in my opinion it's not really a solution, but a work around, and one that's excessive. 

 

In the meantime I'll cope with loading the web page but I'm following this thread and I have no doubt when you make the switch it will be sweet. 

 

(p.s. You and I have spoke in the past, quite a while back via email regarding possible extensions for Alfred v1.  It's great to see you're still working with the Alfred team and seemingly much more! You guys rock, keep at it. :) Thanks! )

 

Nick Vitale. Yessir. I remember you :) Actually I'm not just working "with" the Alfred team anymore, I'm officially part of the Alfred team now. Andrew and Vero made the announcement back in January I believe.

Share this post


Link to post

@jdfwarrior is the source for this posted on github anywhere? I will gladly fork it and implement the forecast.io API version of it. Just did it for the version that Nick mentioned in a few posts back and I believe these are both written in PHP.

 

Loving the new alfred 2 workflows.

Share this post


Link to post

When I installed yesterday everything was working great, so this is more of a "what have I done" to the settings kind of question. When I type forecast alfred appears to begin pulling the weather, but quickly goes to a general search.

Screenshot: http://imgur.com/U8H4rRD

Share this post


Link to post

 

 

When I type forecast alfred appears to begin pulling the weather, but quickly goes to a general search.

 

I don't think it's you - the same thing suddenly started happening for me as well.

Share this post


Link to post

I don't think it's you - the same thing suddenly started happening for me as well.

 

I mentioned in another thread that DrLulz posted in about this. What it boils down to is.. for the longest time, I've been paying for a subscription to weather underground so that you guys could use this workflow. You're welcome :) I had a lot of raindrops built up so I cancelled the subscription for a bit and noticed how quickly the daily limits are being hit. It's running over daily allotments within an hour after midnight. I'm wondering if someone else is using my API key without permission. I tried to go ahead and sign back up for the subscription so you guys could continue using it but now weatherunderground is being weird and giving me some weird error. I'll get it working again ASAP.

Share this post


Link to post

Dave,

 

Thanks for the great workflow.

 

1. When I type "weather", I see an "Hourly Forecast" and an "Hourly Forecast at ..." option.  Are those default Alfred things?  I can't seem to find where they are coming from.  How can I disable those?

 

2. Feature request: Would you be able to get the hourly forecast in the same way you get the 4-day forecast?  I usually need to see the hourly.

Share this post


Link to post

The Workflow is great. Is there a reason why you have to set the location first and then query alfred again? Would it be possible to type "Forecast in Paris" or "Conditions in London" and get the result back? 

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...