You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.
select max("wind_avg_km_h") as "windgust10m", mean("wind_dir_deg") as "windgustdir10m" FROM "Acurite-5n1" WHERE (sequence_num = 2) GROUP BY time(10m) order by time desc
$result = $database8->query("select max(\"wind_avg_km_h\") as \"windgust10m\", mean(\"wind_dir_deg\") as \"windgustdir10m\" FROM \"Acurite-5n1\" WHERE (sequence_num = 2) GROUP BY time(10m) order by time desc");
<?php
$host = '192.168.0.30';
$port = 8086;
$dbname = 'rtl433';
require 'vendor/autoload.php';
//msg type 49
$client = new InfluxDB\Client($host, $port);
$database = $client->selectDB($dbname);
$result = $database->query("select max(\"wind_avg_km_h\") as \"windgust10m\", mean(\"wind_dir_deg\") as \"windgustdir10m\" FROM \"Acurite-5n1\" WHERE (sequence_num = 2) GROUP BY time(10m) order by time desc");
// get the points from the resultset yields an array
$gusts = $result->getPoints();
echo "<pre>";
print_r($result);
echo "</pre>";
?>
Not sure if its me doing something stupid but:
The queries are the same....
running in the CLI
select max("wind_avg_km_h") as "windgust10m", mean("wind_dir_deg") as "windgustdir10m" FROM "Acurite-5n1" WHERE (sequence_num = 2) GROUP BY time(10m) order by time desc
yeilds:
VS this via the PHP client
$result = $database8->query("select max(\"wind_avg_km_h\") as \"windgust10m\", mean(\"wind_dir_deg\") as \"windgustdir10m\" FROM \"Acurite-5n1\" WHERE (sequence_num = 2) GROUP BY time(10m) order by time desc");
yeilds:
The text was updated successfully, but these errors were encountered: