This commit is contained in:
parent
3c6cae92ad
commit
d0c8d34435
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue