![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
github.com/pridkett/airgradient2mqtt
Patrick Wagstrom <160672+pridkett@users.noreply.github.com>
October 2024
Although this isn't strictly necessary, you'll want to run some code in your InfluxDB server to establish retention rules and continuous queries to aggregate hourly and daily data.
CREATE RETENTION POLICY "six_months" ON "airgradient" DURATION 26w REPLICATION 1 DEFAULT;
CREATE RETENTION POLICY "hourly_aggregates" ON "airgradient" DURATION INF REPLICATION 1;
CREATE RETENTION POLICY "daily_aggregates" ON "airgradient" DURATION INF REPLICATION 1;
-- atmp atmp_compensated nox_index nox_raw pm003_count pm01 pm02 pm02_compensated pm10 rco2 rhum rhum_compensated
-- tvoc_index tvoc_raw wifi
CREATE CONTINUOUS QUERY "cq_hourly_aggregates" ON "airgradient"
BEGIN
SELECT
MEAN(aqi) AS "mean_aqi", MIN(aqi) AS "min_aqi", MAX(aqi) AS "max_aqi",
MEAN(atmp) AS "mean_atmp", MIN(atmp) AS "min_atmp", MAX(atmp) AS "max_atmp",
MEAN(atmp_compensated) AS "mean_atmp_compensated", MIN(atmp_compensated) AS "min_atmp_compensated", MAX(atmp_compensated) AS "max_atmp_compensated",
MEAN(nox_index) AS "mean_nox_index", MIN(nox_index) AS "min_nox_index", MAX(nox_index) AS "max_nox_index",
MEAN(nox_raw) AS "mean_nox_raw", MIN(nox_raw) AS "mean_nox_raw", MAX(nox_raw) AS "max_nox_raw",
MEAN(pm003_count) AS "mean_pm003_count", MIN(pm003_count) AS "min_pm003_count", MAX(pm003_count) AS "max_pm003_count",
MEAN(pm01) AS "mean_pm01", MIN(pm01) AS "min_pm01", MAX(pm01) AS "max_pm01",
MEAN(pm02) AS "mean_pm02", MIN(pm02) AS "min_pm02", MAX(pm02) AS "max_pm02",
MEAN(pm02_compensated) AS "mean_pm02_compensated", MIN(pm02_compensated) AS "min_pm02_compensated", MAX(pm02_compensated) AS "max_pm02_compensated",
MEAN(pm10) AS "mean_pm10", MIN(pm10) AS "min_pm10", MAX(pm10) AS "max_pm10",
MEAN(rco2) AS "mean_rco2", MIN(rco2) AS "min_rco2", MAX(rco2) AS "max_rco2",
MEAN(rhum) AS "mean_rhum", MIN(rhum) AS "min_rhum", MAX(rhum) AS "max_rhum",
MEAN(rhum_compensated) AS "mean_rhum_compensated", MIN(rhum_compensated) AS "min_rhum_compensated", MAX(rhum_compensated) AS "max_rhum_compensated",
MEAN(tvoc_index) AS "mean_tvoc_index", MIN(tvoc_index) AS "min_tvoc_index", MAX(tvoc_index) AS "max_tvoc_index",
MEAN(tvoc_raw) AS "mean_tvoc_raw", MIN(tvoc_raw) AS "min_tvoc_raw", MAX(tvoc_raw) AS "max_tvoc_raw",
MEAN(wifi) AS "mean_wifi", MIN(wifi) AS "min_wifi", MAX(wifi) AS "max_wifi"
INTO "airgradient"."hourly_aggregates"."airgradient_hourly"
FROM "airgradient"
GROUP BY time(1h), *
END;
CREATE CONTINUOUS QUERY "cq_daily_aggregates" ON "airgradient"
BEGIN
SELECT
MEAN(aqi) AS "mean_aqi", MIN(aqi) AS "min_aqi", MAX(aqi) AS "max_aqi",
MEAN(atmp) AS "mean_atmp", MIN(atmp) AS "min_atmp", MAX(atmp) AS "max_atmp",
MEAN(atmp_compensated) AS "mean_atmp_compensated", MIN(atmp_compensated) AS "min_atmp_compensated", MAX(atmp_compensated) AS "max_atmp_compensated",
MEAN(nox_index) AS "mean_nox_index", MIN(nox_index) AS "min_nox_index", MAX(nox_index) AS "max_nox_index",
MEAN(nox_raw) AS "mean_nox_raw", MIN(nox_raw) AS "mean_nox_raw", MAX(nox_raw) AS "max_nox_raw",
MEAN(pm003_count) AS "mean_pm003_count", MIN(pm003_count) AS "min_pm003_count", MAX(pm003_count) AS "max_pm003_count",
MEAN(pm01) AS "mean_pm01", MIN(pm01) AS "min_pm01", MAX(pm01) AS "max_pm01",
MEAN(pm02) AS "mean_pm02", MIN(pm02) AS "min_pm02", MAX(pm02) AS "max_pm02",
MEAN(pm02_compensated) AS "mean_pm02_compensated", MIN(pm02_compensated) AS "min_pm02_compensated", MAX(pm02_compensated) AS "max_pm02_compensated",
MEAN(pm10) AS "mean_pm10", MIN(pm10) AS "min_pm10", MAX(pm10) AS "max_pm10",
MEAN(rco2) AS "mean_rco2", MIN(rco2) AS "min_rco2", MAX(rco2) AS "max_rco2",
MEAN(rhum) AS "mean_rhum", MIN(rhum) AS "min_rhum", MAX(rhum) AS "max_rhum",
MEAN(rhum_compensated) AS "mean_rhum_compensated", MIN(rhum_compensated) AS "min_rhum_compensated", MAX(rhum_compensated) AS "max_rhum_compensated",
MEAN(tvoc_index) AS "mean_tvoc_index", MIN(tvoc_index) AS "min_tvoc_index", MAX(tvoc_index) AS "max_tvoc_index",
MEAN(tvoc_raw) AS "mean_tvoc_raw", MIN(tvoc_raw) AS "min_tvoc_raw", MAX(tvoc_raw) AS "max_tvoc_raw",
MEAN(wifi) AS "mean_wifi", MIN(wifi) AS "min_wifi", MAX(wifi) AS "max_wifi"
INTO "airgradient"."daily_aggregates"."airgradient_daily"
FROM "airgradient"
GROUP BY time(1d), *
END;
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.