Weather Underground API

229 views
Skip to first unread message

voyagesdedavid

unread,
Aug 3, 2020, 4:06:08 PM8/3/20
to weewx-user
Hello,
Can anyone offer help on why I can't download forecast from Wunderground, despite having updated my API key? 

I see this in the logs: 

Aug  3 21:04:15 weather weewxd: forecast: WUThread: WU: failed attempt 1 to download forecast: HTTP Error 503: Service Unavailable
Aug  3 21:04:15 weather weewxd: forecast: WUThread: WU: failed attempt 2 to download forecast: HTTP Error 503: Service Unavailable
Aug  3 21:04:15 weather journal: weewx[6199] INFO weewx.restx: Wunderground-PWS: Published record 2020-08-03 21:04:00 BST (XXXXXXX)
Aug  3 21:04:15 weather weewxd: forecast: WUThread: WU: failed attempt 3 to download forecast: HTTP Error 503: Service Unavailable
Aug  3 21:04:15 weather weewxd: forecast: WUThread: WU: failed to download forecast
Aug  3 21:04:15 weather weewxd: forecast: WUThread: WU: no forecast data for XXXXXXXXXX from http://api.wunderground.com/api

Thank you. 

John Kline

unread,
Aug 3, 2020, 4:11:18 PM8/3/20
to weewx...@googlegroups.com
The forecast extension has not been updated to use WU’s new API.

If you navigate your browser to the URL you have in your log snippet:

You will get:
Service Unavailable

On Aug 3, 2020, at 1:06 PM, voyagesdedavid <dmpa...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/d8a1aa8a-0bf4-479a-bd78-2105e7252f23o%40googlegroups.com.

voyagesdedavid

unread,
Aug 3, 2020, 4:34:30 PM8/3/20
to weewx-user
Hi.  Thanks for that.  I just grabbed the updated extension. 

[root@weather tmp]# /home/weewx/bin/wee_extension --list
Extension Name    Version   Description

The following alternative languages are available:
   catala
   dutch
   espanol
   finnish
   francais
   german
   italian

Language changes can be made in skins/Bootstrap/skin.conf

Default location for HTML and image files is public_html/Bootstrap
*** POINT YOUR BROWSER TO: public_html/Bootstrap/index.html ***

bootstrap         2.24      A skin based around the bootstrap 3.2.0 framework
forecast          3.4.0b1   Generate and display weather and tide forecasts.

I restarted weewx and still .. 

Aug  3 21:28:15 weather weewxd: forecast: WUThread: WU: failed attempt 2 to download forecast: HTTP Error 503: Service Unavailable
Aug  3 21:28:15 weather journal: weewx[6325] INFO weewx.restx: Wunderground-PWS: Published record 2020-08-03 21:28:00 BST (XXXXXXX)
Aug  3 21:28:15 weather weewxd: forecast: WUThread: WU: failed attempt 3 to download forecast: HTTP Error 503: Service Unavailable
Aug  3 21:28:15 weather weewxd: forecast: WUThread: WU: failed to download forecast
Aug  3 21:28:15 weather weewxd: forecast: WUThread: WU: no forecast data for XXXXXX from http://api.wunderground.com/api

Am I perhaps updating the API in the wrong file?  It's in /home/weewx/weewx.conf yes? 




Le lundi 3 août 2020 21:11:18 UTC+1, John Kline a écrit :
The forecast extension has not been updated to use WU’s new API.

If you navigate your browser to the URL you have in your log snippet:

You will get:
Service Unavailable

On Aug 3, 2020, at 1:06 PM, voyagesdedavid <dmpa...@gmail.com> wrote:


Hello,
Can anyone offer help on why I can't download forecast from Wunderground, despite having updated my API key? 

I see this in the logs: 

Aug  3 21:04:15 weather weewxd: forecast: WUThread: WU: failed attempt 1 to download forecast: HTTP Error 503: Service Unavailable
Aug  3 21:04:15 weather weewxd: forecast: WUThread: WU: failed attempt 2 to download forecast: HTTP Error 503: Service Unavailable
Aug  3 21:04:15 weather journal: weewx[6199] INFO weewx.restx: Wunderground-PWS: Published record 2020-08-03 21:04:00 BST (XXXXXXX)
Aug  3 21:04:15 weather weewxd: forecast: WUThread: WU: failed attempt 3 to download forecast: HTTP Error 503: Service Unavailable
Aug  3 21:04:15 weather weewxd: forecast: WUThread: WU: failed to download forecast
Aug  3 21:04:15 weather weewxd: forecast: WUThread: WU: no forecast data for XXXXXXXXXX from http://api.wunderground.com/api

Thank you. 

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

voyagesdedavid

unread,
Aug 3, 2020, 5:32:14 PM8/3/20
to weewx-user
I think I understand what you meant.  Not that my API key needed to be updated, but that http://api.wunderground.com/api/ is no longer the URL. 

I see from the documentation that the URL is now api.weather.com.  Should the updated forecast extension not have taken care of that? 

John Kline

unread,
Aug 3, 2020, 6:10:00 PM8/3/20
to weewx...@googlegroups.com
Exactly what updated forecast extension (URL) are you using?

On Aug 3, 2020, at 2:32 PM, voyagesdedavid <dmpa...@gmail.com> wrote:


To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/15f3404b-a132-4203-b91b-472bf0f6ef8fo%40googlegroups.com.

dmpa...@gmail.com

unread,
Aug 4, 2020, 4:22:07 AM8/4/20
to weewx-user
The right one, I hope.  This one:


And .. 

[root@weather tmp]# /home/weewx/bin/wee_extension --list |grep forecast

forecast          3.4.0b1   Generate and display weather and tide forecasts.


Graham Eddy

unread,
Aug 4, 2020, 4:33:13 AM8/4/20
to weewx...@googlegroups.com
my understanding is that forecast has not been updated to python3/weewx4 as yet (all good things take time)
and i was pointed to a fork that has been: https://github.com/chaunceygardiner/weewx-forecast

i have been playing with it for a week or so and the forecast data (i am using WMO) was okay in mild weather but way off in the current freezing episode - presumably that would be the data source, not the weewx extension. i will probably give another source a go but my expectations are not high for off-shore predictions of aussie bush weather

dmpa...@gmail.com

unread,
Aug 4, 2020, 4:53:06 AM8/4/20
to weewx-user
That was a higher version than I was previously using.  Just installed it, and I get... 

Aug  4 09:46:15 weather journal: weewx[8782] INFO user.forecast: WUThread: WU: download forecast from 'http://api.wunderground.com/api/XXXXXXXXXXXXXXXXXXXXXXXXXXXX0a13/hourly10day/q/XXXXXX.json'

I've been in touch with WU Support, and that is definitely not the URL.  So the next question is: in which file do I alter this, so that it uses the correct URL, and is the syntax the same?  




Graham Eddy

unread,
Aug 4, 2020, 5:15:25 AM8/4/20
to weewx...@googlegroups.com
i have been avoiding WU like the plague (probably a bad analogy at the moment..) because of its stability issues with no resolution in sight, so i have no idea about WU interface

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

dmpa...@gmail.com

unread,
Aug 4, 2020, 5:41:40 AM8/4/20
to weewx-user
If there's another service that will give me a reasonable forecast for SE England, please do tell me and I'll use that.  

Ron Gibson

unread,
Aug 4, 2020, 8:00:44 AM8/4/20
to weewx-user
I'd be interested to hear if anyone has gotten the OWM forecast working in 4.1. Worked fine when I was at 3.9.2.

Ron

Graham Eddy

unread,
Aug 4, 2020, 8:13:37 AM8/4/20
to weewx...@googlegroups.com
i have it working (with the chaunceygardiner fork) under weewx 4.1.1, though i’m not sure that OWM data is accurate enough for my location

On 4 Aug 2020, at 10:00 pm, Ron Gibson <ve3...@gmail.com> wrote:

I'd be interested to hear if anyone has gotten the OWM forecast working in 4.1. Worked fine when I was at 3.9.2.

Ron

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

John Kline

unread,
Aug 4, 2020, 9:26:40 AM8/4/20
to weewx...@googlegroups.com
The chaunceygardiner fork is mine.  I originally modified the extension to get it working for me as I was running the WeeWX 4.x beta.  Others asked for it, so I made it available.  I tested everything *except* WU and got it working.  This fork is intended as an interim solution while waiting for Matthew to update the extension.

I did look at updating WU.  It’s not just a URL change.  The API changed and the change is substantial.  One user has mentioned that UKMO is is moving to this API; so perhaps I should take another look at this.  I’ll have some time this weekend to assess the situation.

On Aug 4, 2020, at 5:13 AM, Graham Eddy <graha...@gmail.com> wrote:



dmpa...@gmail.com

unread,
Aug 4, 2020, 10:25:04 AM8/4/20
to weewx-user
I started to look into OWM, but too much faffing around, with downloading Postman etc.   I tried with curl, but ... 

[][root@weather weewx]# 

Ah, well.  I will stick with the basic Weewx. 

Thank you all. 

Graham Eddy

unread,
Aug 4, 2020, 10:29:29 AM8/4/20
to weewx...@googlegroups.com
i vaguely recall one trivial step to get an API key from OWM, that was all.
and install the forecast extension of course, telling it to use OWM rather than WU or NWS and giving it API key

dmpa...@gmail.com

unread,
Aug 4, 2020, 10:50:41 AM8/4/20
to weewx-user
So I have it installed: 

[root@weather bin]# ./wee_extension --list|grep owm

owm               0.9       Upload weather data to OpenWeatherMap.

Modified weewx.conf.. 

 [[OWM]]

        api_key = XXXXXXX


Restarted weewx and I wait ........ 

dmpa...@gmail.com

unread,
Aug 4, 2020, 10:52:32 AM8/4/20
to weewx-user
Getting hundreds of these in the logs now .. 

Aug  4 15:51:55 weather journal: weewx[2509] INFO weewx.drivers.wmr300: ignored packet type 0xd4
Aug  4 15:51:55 weather journal: weewx[2509] INFO weewx.drivers.wmr300: ignored packet type 0xd3
Aug  4 15:51:55 weather journal: weewx[2509] INFO weewx.drivers.wmr300: ignored packet type 0xdb
Aug  4 15:51:55 weather journal: weewx[2509] INFO weewx.drivers.wmr300: ignored packet type 0xdc
Aug  4 15:51:55 weather journal: weewx[2509] INFO weewx.drivers.wmr300: ignored packet type 0xd3
Aug  4 15:51:55 weather journal: weewx[2509] INFO weewx.drivers.wmr300: ignored packet type 0xdc
Aug  4 15:51:55 weather journal: weewx[2509] INFO weewx.drivers.wmr300: ignored packet type 0xdc
Aug  4 15:51:55 weather journal: weewx[2509] INFO weewx.drivers.wmr300: ignored packet type 0xd6

Le mardi 4 août 2020 à 15:29:29 UTC+1, graha...@gmail.com a écrit :

Graham Eddy

unread,
Aug 4, 2020, 10:57:17 AM8/4/20
to weewx...@googlegroups.com
i think you have the wrong end of the stick there: i thought you wanted to download forecasts, not upload your station data.
on my test server:
wxsys@dizzy:/opt/weewx $ wee_extension --list
Extension Name    Version   Description
forecast          3.4.0b5   Generate and display weather and tide forecasts.
GW1000            0.1.0b10  WeeWX driver for GW1000 WiFi gateway.

On 4 Aug 2020, at 10:00 pm, Ron Gibson <ve3...@gmail.com> wrote:

I'd be interested to hear if anyone has gotten the OWM forecast working in 4.1. Worked fine when I was at 3.9.2.

Ron

John Kline

unread,
Aug 4, 2020, 11:57:06 AM8/4/20
to weewx...@googlegroups.com
i think you have the wrong end of the stick there:

Yep, he did change the subject on us.

I just double checked.  I still have OWM running and my fork is *fetching* forecasts just fine.

On Aug 4, 2020, at 7:57 AM, Graham Eddy <graha...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

dmpa...@gmail.com

unread,
Aug 5, 2020, 5:19:19 AM8/5/20
to weewx-user
We seem to have crossed lines, and I apologise.  I didn't change my intentions, but no doubt expressed myself inaccurately. 

Let me try to clear up any confusion.   My weather station is pushing data perfectly, to the Wunderground servers.  That's not a problem.  

What I want is to have forecasts at the bottom of my weather screen.  I'm attaching a screenshot of the bottom half of my Weewx front end.  That is the 'WU' strip to the left, and as you can see, it has no data.   I would like it to have data.  It was working perfectly up until, well .. I don't know.  No doubt until they changed something at the Weather Underground. 

So what I have been trying to do in this thread is to pull data from WU (and latterly OWM) to have it displayed here at home. 

After learning that OWM forecasts can be pulled with the same syntax in the weewx.conf as WU, I entered my API key into that config file, and restarted.   This looks a bit more promising... 

Aug  5 10:10:14 weather journal: weewx[2680] INFO user.forecast: OWMThread: OWM: download forecast from 'http://api.openweathermap.org/data/2.5/forecast?APPID=XXXXXXXXXXXXXXXXXXXXXXXXXXXX112c&lat=XXXXX&lon=XXXXXX'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.cheetahgenerator: Generated 14 files for report StandardReport in 0.25 seconds
Aug  5 10:10:15 weather journal: weewx[2680] INFO user.forecast: OWMThread: OWM: got 40 forecast records
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.manager: Added record 2020-08-05 10:10:15 BST (1596618615) to database 'forecast.sdb'
Aug  5 10:10:15 weather journal: weewx[2680] INFO weewx.imagegenerator: Generated 12 images for report StandardReport in 0.15 seconds

All right.  

So what I need now, is to get that forecast data displayed.  I set all of this up with WU back in January of 2020 when I first got my Oregon Scientific station, and aside from WU changing their API, everything was perfect.  But as I probably mentioned, we moved house back in November, and it is only this past weekend that I got the station out of the garage and set it up.  So I am very rusty as to how to get the forecasts to appear. 

Any help you could give, would be much appreciated.  

dd.png

dmpa...@gmail.com

unread,
Aug 5, 2020, 5:24:15 AM8/5/20
to weewx-user
Sorry - January of 2018 was when I first got the station.  

Graham Eddy

unread,
Aug 5, 2020, 6:36:56 AM8/5/20
to weewx...@googlegroups.com
the forecast skin’s .inc files have a flag you set to indicate which forecast db data to display: ‘WU’, ‘OWN’, etc.
this is in addition to setting similar value in .conf to indicate what to put into forecast db.
i haven’t looked any further into this extension, pending the ‘official’ weewx4 one hopefully forthcoming

dmpa...@gmail.com

unread,
Aug 5, 2020, 7:16:07 AM8/5/20
to weewx-user
Yes, I thought I had defined that correctly ... 

[root@weather forecast]# pwd && grep "OWM" forecast_strip.inc
/home/weewx/skins/forecast
## #set global $forecast_strip_settings['source'] = 'OWM'
## <body onload="populate_strip('nws', 'NWS'); populate_strip('owm', 'OWM'">
#set $strip_source = 'OWM'



dmpa...@gmail.com

unread,
Aug 5, 2020, 7:19:43 AM8/5/20
to weewx-user
Also .. 

[root@weather david]# pwd && grep OWM index.html.tmpl
/home/weewx/skins/david
populate_strip('owm_strip', 'OWM');

Yes, 'david' is the skin I have defined in weewx.conf so I could be sure that I wouldn't overwrite stuff when upgrading. 

John Kline

unread,
Aug 5, 2020, 10:25:43 AM8/5/20
to weewx...@googlegroups.com
Don’t change ‘wu_strip’ to ‘owm_strip’.  It is a referring to an element on the page that has an id of wu_strip.  Perhaps that’s not the greatest id, but it is what it is.

So, that should read:
populate_strip(‘wu_strip’, ‘OWM’);

In addition, you need to change $strip_source in forecast_strip.inc:

## Which forecasts should be displayed?
#set $strip_source = 'WU'

Change to:
#set $strip_source = 'OWM'


On Aug 5, 2020, at 4:19 AM, dmpa...@gmail.com <dmpa...@gmail.com> wrote:

Also .. 

dmpa...@gmail.com

unread,
Aug 5, 2020, 10:43:50 AM8/5/20
to weewx-user
Hooray, it works!  

Thank you.  :-)

ddfdf.png
Reply all
Reply to author
Forward
0 new messages