I have a, hopefully simple Question:
I want to us a PHP Script to get the outside Temperature, I use a freely available API and have the Location hardcoded (for now)
The Script looks like this:
Code: Select all
<?PHP
$outtemp_json = file_get_contents('http://api.openweathermap.org/data/2.5/weather?lat=51&lon=6&units=metric');
$outtemp = json_decode($outtemp_json,true);
$result = ($outtemp["main"]["temp"]);
print ($result);
?>
And the Data Template:
but when used in a graph template is just returns 0.00 as value?
Can you help me find the error?