jason0x43 Posted April 15, 2013 Share Posted April 15, 2013 (edited) I wrote a weather forecaster workflow that displays forecasts from Dark Sky or the Weather Underground. This is actually the second iteration; my first was loosely based on David Ferguson's weather workflow, but written in Python. This version is a complete rewrite in Go. The source, along with installation and setup instructions, is available at it at https://github.com/jason0x43/alfred-weather.The most current release can be found at https://github.com/jason0x43/alfred-weather/releases. Version history: 2016-12-18: 1.0.0 2017-05-03: 1.3.0 2018-11-08: 1.5.0 2020-05-03: 1.6.0 Edited May 3, 2020 by jason0x43 Update for new version of the workflow glgray, iNinja, drking and 3 others 6 Link to comment
Ddyracer Posted April 15, 2013 Share Posted April 15, 2013 I wrote a simple weather forecaster workflow that displays forecasts from the Weather Underground. It's based on David Ferguson's workflow, but written in Python and with a something different usage model. You'll need to register for an API key with Weather Underground to use the workflow (don't worry, it's free). I'd include one by default, but free keys are pretty limited in terms of how many requests they can make over a given period of time. The source, along with installation and setup instructions, is available at it at https://github.com/jason0x43/jc-weather. You can download a prepackaged version of the workflow here, which includes everything the workflow needs to run, along with a few icon sets. I would like to sign up for the api, but does it have anything substantially different than Ferguson's? Link to comment
hzlzh Posted April 15, 2013 Share Posted April 15, 2013 Yet another weather workflow, check others' here on the list below. Link to comment
jdfwarrior Posted April 15, 2013 Share Posted April 15, 2013 I wrote a simple weather forecaster workflow that displays forecasts from the Weather Underground. It's based on David Ferguson's workflow, but written in Python and with a something different usage model. You'll need to register for an API key with Weather Underground to use the workflow (don't worry, it's free). I'd include one by default, but free keys are pretty limited in terms of how many requests they can make over a given period of time. The source, along with installation and setup instructions, is available at it at https://github.com/jason0x43/jc-weather. You can download a prepackaged version of the workflow here, which includes everything the workflow needs to run, along with a few icon sets. Did you get your own API key for this or did you reuse mine? Link to comment
jason0x43 Posted April 15, 2013 Author Share Posted April 15, 2013 I would like to sign up for the api, but does it have anything substantially different than Ferguson's? The main differences between the two are on the backend (mine's written in Python, David's is in PHP) and in the command system. I have single 'weather' command rather than separate 'conditions' and 'forecast' commands, and all my options are grouped under a 'wset' command. In the end, though, both are pulling down weather data from Weather Underground, and the displayed information looks pretty similar. Link to comment
jason0x43 Posted April 15, 2013 Author Share Posted April 15, 2013 Yet another weather workflow, check others' here on the list below. Variety is the spice of life. hzlzh 1 Link to comment
jason0x43 Posted April 15, 2013 Author Share Posted April 15, 2013 Did you get your own API key for this or did you reuse mine? I got my own key, and the workflow requires users to get their own as well. If you have some kind of super-account with Weather Underground I'd be happy to just bundle yours, though. Link to comment
jdfwarrior Posted April 15, 2013 Share Posted April 15, 2013 I got my own key, and the workflow requires users to get their own as well. If you have some kind of super-account with Weather Underground I'd be happy to just bundle yours, though. I don't and I'm running out of raindrops for my account as well so I'm going to migrate to forecast.io as a weather source soon Link to comment
jason0x43 Posted April 15, 2013 Author Share Posted April 15, 2013 I don't and I'm running out of raindrops for my account as well so I'm going to migrate to forecast.io as a weather source soon I was just doing that myself (at least, adding it as an option). Their API is quite a bit cheaper than Wundergrounds, although it will still probably be pretty easy to hit that 1000-request-per-day limit if you get popular. Link to comment
jason0x43 Posted April 16, 2013 Author Share Posted April 16, 2013 I added forecast.io support, along with a couple other things. See the head post. Link to comment
queue Posted April 18, 2013 Share Posted April 18, 2013 After using wset to set either a forecast.io or weather underground API key the workflow returns the following error: {u'type': u'keynotfound': u'description': u'this key does not exist'} Link to comment
jason0x43 Posted April 18, 2013 Author Share Posted April 18, 2013 After using wset to set either a forecast.io or weather underground API key the workflow returns the following error: {u'type': u'keynotfound': u'description': u'this key does not exist'} That's actually an error from the Weather Underground that they send back when your API key is incorrect. One thing to keep in mind is that you have to choose the service first, then set the key, because `wset key` sets the key for the current service (wunderground by default). I should probably make specific commands to set the key for forecast.io or wunderground, or maybe look at the key format or something. Link to comment
jason0x43 Posted April 18, 2013 Author Share Posted April 18, 2013 I just posted a new version--this one ties the key specification to the service selection, so there shouldn't be any more problems with key vs. service. Link to comment
jason0x43 Posted April 19, 2013 Author Share Posted April 19, 2013 New version up. The workflow will now display weather alerts. You can action an alert to be taken to a details page (this only works in the US for Weather Underground). There's also a new command to set the format for displaying timestamps. Link to comment
LiamW Posted April 20, 2013 Share Posted April 20, 2013 So I need an api at wunderground to set the location? I installed using forecast api, but can't set location. look through console shows this error Alfred 2[238]: [ERROR] Script XML Parsing, item missing UID attribute Link to comment
jason0x43 Posted April 20, 2013 Author Share Posted April 20, 2013 So I need an api at wunderground to set the location? I installed using forecast api, but can't set location. look through console shows this error Alfred 2[238]: [ERROR] Script XML Parsing, item missing UID attribute You do need an API key from either Weather Underground or forecast.io, but only to get the actual weather data. From your error message I'm guessing you haven't upgraded to Alfred 2.0.3 yet (it was just released in the last couple of days). I made a change to the workflow to take advantage of some new stuff in 2.0.3. It may have been a bit premature. Link to comment
jason0x43 Posted April 20, 2013 Author Share Posted April 20, 2013 I just posted an updated workflow that should work properly again on pre-2.0.3 Alfred. Link to comment
LiamW Posted April 20, 2013 Share Posted April 20, 2013 Yup that did it. Once I upgraded to that, it worked fine. I wasn't aware of the issue as I leave my mac on all the time and I think the update checker only notifies on start up. Link to comment
jason0x43 Posted April 22, 2013 Author Share Posted April 22, 2013 New version. There is now a "Get key" on the "Enter your API key" dialog that pops up when selecting your weather service. I thought this was a bit easier than having a separate "getkey" command; it's more where you need it than floating around on its own. You can also set a custom time format now with the "format" command. Link to comment
DJay Posted April 22, 2013 Share Posted April 22, 2013 THIS is the best weather workflow ever. I absolutely love it. I appreciate your work. thanks a lot. Link to comment
jason0x43 Posted April 22, 2013 Author Share Posted April 22, 2013 THIS is the best weather workflow ever. I absolutely love it. I appreciate your work. thanks a lot. Thanks! Link to comment
jason0x43 Posted April 25, 2013 Author Share Posted April 25, 2013 Another update. The workflow is now timezone-aware. This is used to 1) fix a bug where you could get weird output if you were looking at the weather across the international date line, and 2) show the local time for your target location. Link to comment
69wpm Posted April 25, 2013 Share Posted April 25, 2013 Well, I updated to the new version, now it doesn't work anymore. I get the result "key.wund" Link to comment
jason0x43 Posted April 25, 2013 Author Share Posted April 25, 2013 Well, I updated to the new version, now it doesn't work anymore. I get the result "key.wund" Hmmm...I've tried this with several older versions of my settings file but I can't reproduce this error. Could you open up your settings file (at /Users/<you>/Library/Application Support/Alfred 2/Workflow Data/jc-weather/settings.json) and either post it or see if it looks like this? It's OK if you have additional settings, like key.fio, but you should have at least the ones below. { "key.wund": "<your key>", "service": "wund", "icons": "grzanka", "days": 3, "time_format": "%A, %B %d, %Y %I:%M%p", "version": 3, "location": { "latitude": 34.0522342, "timezone": "America/Los_Angeles", "longitude": -118.2436849, "name": "Los Angeles, California", "short_name": "Los Angeles" }, "units": "si" } Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now