forecast not forecasting

118 views
Skip to first unread message

Cycle London

unread,
Jul 30, 2019, 8:02:46 AM7/30/19
to weewx-user
Hi,
I've got a weewx installation on a CentOS VM that's been running happily for about a year. About a month ago, I realised that the 'forecast' wasn't working, but have only now found the time to look into it. 

The station used wunderground, so I head over there, login and then to to the 'API keys' tab.  I generate a new API, dump it to the clipboard, and then put it into the weewx.conf .. 

[Forecast]
    data_binding = forecast_binding
    [[OWM]]
        api_key = INSERT_OWM_API_KEY_HERE
    [[WWO]]
        api_key = INSERT_WWO_API_KEY_HERE
    [[WU]]
        api_key = XXXXXXXXXXXXXXXXXXXXXXX
    [[NWS]]
        lid = "INSERT_LOCATION_ID_HERE (e.g., MAZ014)"
        foid = "INSERT_FORECAST_OFFICE_ID_HERE (e.g., BOX)"
    [[UKMO]]
        api_key = // no longer used
        location = 1234

I restart weewx and watch the logs. 

Jul 30 12:40:14 weather weewx[27038]: manager: Added record 2019-07-30 12:40:00 BST (XXXXXXXX) to database 'weewx.sdb'
Jul 30 12:40:14 weather weewx[27038]: manager: Added record 2019-07-30 12:40:00 BST (XXXXXXXX) to daily summary in 'weewx.sdb'
Jul 30 12:40:14 weather weewx[27038]: forecast: WUThread: WU: download forecast from 'http://api.wunderground.com/api/XXXXXXXXXXXXXXXXXXXXXXXXXXXX****/hourly10day/q/XXXXXXXX.json'
Jul 30 12:40:15 weather weewx[27038]: forecast: WUThread: WU: failed attempt 1 to download forecast: HTTP Error 401: Unauthorized
Jul 30 12:40:15 weather weewx[27038]: cheetahgenerator: Generated 14 files for report StandardReport in 0.34 seconds
Jul 30 12:40:15 weather weewx[27038]: imagegenerator: Generated 12 images for StandardReport in 0.12 seconds
Jul 30 12:40:15 weather weewx[27038]: copygenerator: copied 0 files to /home/weewx/public_html
Jul 30 12:40:15 weather weewx[27038]: restx: Wunderground-PWS: Published record 2019-07-30 12:40:00 BST (XXXXXXXX)
Jul 30 12:40:15 weather weewx[27038]: forecast: WUThread: WU: failed attempt 2 to download forecast: HTTP Error 401: Unauthorized
Jul 30 12:40:15 weather weewx[27038]: cheetahgenerator: Generated 12 files for report forecast in 0.08 seconds
Jul 30 12:40:15 weather weewx[27038]: copygenerator: copied 0 files to /home/weewx/public_html/forecast
Jul 30 12:40:15 weather weewx[27038]: forecast: WUThread: WU: failed attempt 3 to download forecast: HTTP Error 401: Unauthorized
Jul 30 12:40:15 weather weewx[27038]: forecast: WUThread: WU: failed to download forecast
Jul 30 12:40:15 weather weewx[27038]: forecast: WUThread: WU: no forecast data for XXXXXXXX from http://api.wunderground.com/api

So I think that maybe it has something to do with the fact that my default skin is 'john': 

[[StandardReport]]
        # See the customizing guide to change the units, plot types and line
        # colors, modify the fonts, display additional sensor data, and other
        # customizations. Many of those changes can be made here by overriding
        # parameters, or by modifying templates within the skin itself.

        # The StandardReport uses the 'Standard' skin, which contains the
        # images, templates and plots for the report.
        skin = john
        [[[Units]]]
            [[[[Groups]]]]
                group_altitude = foot
                group_speed2 = mile_per_hour2
                group_pressure = inHg
                group_rain = mm
                group_rainrate = mm_per_hour
                group_temperature = degree_C
                group_degree_day = degree_C_day
                group_speed = mile_per_hour
        [[[Extras]]]
            [[[[forecast_strip_settings]]]]
                source = WU
                num_days = 3

I can state categorically, however, that none of the files was changed, and indeed hadn't been for months.  So I still think it's something to do with the api key.  But since I've generated a new one, I'm a bit lost.  

Cycle London

unread,
Jul 30, 2019, 12:54:21 PM7/30/19
to weewx-user

Paul McGeorge

unread,
Jul 30, 2019, 10:02:40 PM7/30/19
to weewx-user
Over in weewx-development is an unofficial? update for using the new WU API you could try that but it only does 5 days now or use a different source like NWS, Dark Sky, etc. 

Check this message


On Tuesday, July 30, 2019 at 10:54:21 AM UTC-6, Cycle London wrote:
Reply all
Reply to author
Forward
0 new messages