From d0c8d34435392d46bcb73682a80e8adf4d09a1bd Mon Sep 17 00:00:00 2001 From: GeorgeWebberley Date: Tue, 27 Jan 2026 21:09:22 +0100 Subject: [PATCH] Added public view --- docker-compose.yaml | 5 +++++ fetcher/index.js | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 46104c7..38abb1f 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -24,6 +24,11 @@ services: - influxdb volumes: - grafana_data:/var/lib/grafana + environment: + - GF_AUTH_ANONYMOUS_ENABLED=true + - GF_AUTH_ANONYMOUS_ORG_NAME=Main Org. + - GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer + - GF_SECURITY_ALLOW_EMBEDDING=true fetcher: image: git.georgew.dev/georgew/surf-hub-fetcher:latest diff --git a/fetcher/index.js b/fetcher/index.js index 0ad169f..4b6e6ce 100644 --- a/fetcher/index.js +++ b/fetcher/index.js @@ -23,10 +23,10 @@ async function fetchSurfData() { .tag('location', 'rhossili_beach') .floatField('swell_height', current.swell_wave_height) .floatField('swell_period', current.swell_wave_period) - .floatField('swell_direction', current.swell_wave_direction) // 0-360 degrees - .floatField('wind_wave_height', current.wind_wave_height);// You can add weather-api for wind! + .floatField('swell_direction', current.swell_wave_direction) + .floatField('wind_wave_height', current.wind_wave_height); - console.log(`📡 Sending to InfluxDB: ${swellHeight}m...`); + console.log(`📡 Data Captured: ${current.swell_wave_height}m at ${current.swell_wave_direction}°`); // Write and explicitly flush writeApi.writePoint(point);