snapshot inverter files
This commit is contained in:
11
inverter/weather.php
Executable file
11
inverter/weather.php
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
// require_once 'wunderground.php';
|
||||
require_once 'openweathermap.php';
|
||||
|
||||
// define('STATION', 'INHASSUM4');
|
||||
define('CITY', 2745978);
|
||||
|
||||
// $aData = wunderground('conditions', sprintf('pws:%s', STATION));
|
||||
$aData = openweathermap(CITY);
|
||||
echo $fTemperature = isset($aData['main']['temp']) ? floatval($aData['main']['temp']) - 273.15 : null;
|
||||
Reference in New Issue
Block a user