Weather Underground API GONE?


Hi Peter H,

I suspect that someone at BoM may be blocking the default PHP ‘user-agent’ string. When I tried retrieving the JSON file with WGET all was well so I assumed that the User-Agent string might be causing issues.

So after line #50 in fronius.php I added some code to change the User-Agent string. I advised the script’s author at the time. Since adding the User-Agent the script has behaved itself.

// Predeclare our variables
$consumptionEnergyTotal = NULL;
$consumptionPowerLive = NULL;
$inverterVoltageLive = NULL;
$inverterEnergyTotal = NULL;
$inverterPowerLive = NULL;
$temperature = null;

// Added $context to get around HTTP request failed! HTTP/1.0 403 Forbidden

$context = stream_context_create(
“http” => array(
“header” => “User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36”


As of the 4th of March 2019 anyone with a free account API that does not have a personal weather station attached has had their account manually disabled.


yep, the Wunderground API was terminated yesterday. :frowning:


So when is PVOutput going to be able to handle the new WU API?


There is no new WU API. The current API from WU will still work if you have a free account AND a personal weather station populating WU. If you only have a free account and an API, this has now been manually disabled by WU due to their new pricing structure…


Thanks for the reply. Still confused, by the WU contact person saying I needed to get a new API key even though I have a free account and have a weather station uploading to WU.

It sounded like my current API key was now invalid since they turned off the free accounts.

I do pay WU to keep the ads off my weather station page but I don’t believe that has anything to do with their new income stream from paid API access.


So whats the best fix…


I’ve switched to There’s a free signup option with API and it can be used with pvoutput.
The only issue I have with it at the moment is the temperature doesn’t auto upload every 5 minutes, so the trace cycles between the local temperature and my house temperature, but I’m sure there will be a fix for that.


My WU API key quit working on 3/25/19 at 8:55am. On 3/31/19 I got it to work again. Here’s how;
Log on to your WU page. Upper right corner is “My Profile”. Click on it and a drop-down menu appears. Click on “Member Settings”. A new screen shows up with 5 tabs. The far right tab is labeled, “API KEYS”. Click on it. You will see a box marked “Your API Keys” and it will have dots instead of characters in it. Below this box is a tab marked, “Show Key”. Click on it and you will see the API Key in real numbers and letters instead of dots. There is a button labeled, “Copy To Clipboard”. Press it.
Now go to your PVOutput account where your WU API key is entered. Press the ‘test’ button to the right of the current API Key. A new page will open showing the API Key fails. Replace that API key with this new one. If you compare the current API key you have in your PVO account, you’ll see it’s different than this new one. Again press the ‘test’ button and verify the new API key works.
Once the new API key is entered, be sure the setting right under where you’ve entered your API key is set for “Enabled”. This is “Main Temperature”. You also need to be sure AUTOMATIC UPLOADS section has TEMPERATURE set to “Disabled”.
Within a few minutes, your PVOutput will start posting the temperature provided from WU and your API key associated with your weather station.


@skipro3 This should work for anyone that has their own Personal Weather Station (PWS) that is uploading to WU. However anyone without a PWS linked to their login should not be able to get a new API Key.


Thanks for clarifying that - I thought there’s been a change of stance by WU on who can sign in. I keep seeing the occasional ‘how to enable WU API’ messages - not all mention it’s for PWS users only.