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”
)
)
);