This commit is contained in:
parent
3c6cae92ad
commit
d0c8d34435
|
|
@ -24,6 +24,11 @@ services:
|
||||||
- influxdb
|
- influxdb
|
||||||
volumes:
|
volumes:
|
||||||
- grafana_data:/var/lib/grafana
|
- 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:
|
fetcher:
|
||||||
image: git.georgew.dev/georgew/surf-hub-fetcher:latest
|
image: git.georgew.dev/georgew/surf-hub-fetcher:latest
|
||||||
|
|
|
||||||
|
|
@ -23,10 +23,10 @@ async function fetchSurfData() {
|
||||||
.tag('location', 'rhossili_beach')
|
.tag('location', 'rhossili_beach')
|
||||||
.floatField('swell_height', current.swell_wave_height)
|
.floatField('swell_height', current.swell_wave_height)
|
||||||
.floatField('swell_period', current.swell_wave_period)
|
.floatField('swell_period', current.swell_wave_period)
|
||||||
.floatField('swell_direction', current.swell_wave_direction) // 0-360 degrees
|
.floatField('swell_direction', current.swell_wave_direction)
|
||||||
.floatField('wind_wave_height', current.wind_wave_height);// You can add weather-api for wind!
|
.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
|
// Write and explicitly flush
|
||||||
writeApi.writePoint(point);
|
writeApi.writePoint(point);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue