snapshot inverter files

This commit is contained in:
2024-12-19 15:04:50 +01:00
parent c53336ed28
commit 7b5834fcb1
12 changed files with 971 additions and 0 deletions

11
inverter/weather.php Executable file
View 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;