Weather Underground API GONE?


#41

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(
array(
“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”
)
)
);


#42

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.


#43

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


#44

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


#45

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…


#46

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.


#47

So whats the best fix…