Examples
Small, whole things people have built. Copy them, change them, make them yours.
In these docs
A tide gauge on a Raspberry Pi
A sonar distance sensor hangs over the water from a pier. The water level is the height of the sensor less the distance it measures. The Pi sends it every minute.
You need: a Raspberry Pi with network, a Maxbotix sensor on its serial port, and a station.
import time, serial, requestsSTATION = 'https://tidewater.example/in/YOUR-STATION'HEIGHT = 4.20 # metres from the sensor down to the zero of the chartsensor = serial.Serial('/dev/ttyAMA0', 9600)while True: line = sensor.readline().decode().strip() # like R2780: 2780 mm distance = int(line[1:]) / 1000 requests.post(STATION, data={'level': round(HEIGHT - distance, 3)}) time.sleep(60)Run it with python3 gauge.py, or as a service so that it starts again after a power cut.
High tide by e-mail
Run this each morning (with cron, or a scheduled job of your host). It reads the last day in hours and writes the highest.
const key = process.env.TIDEWATER_KEYconst url = 'https://api.tidewater.example/v2/stations/bergen-harbour/readings?every=1h'const readings = await (await fetch(url, { headers: { Authorization: 'Bearer ' + key } })).json()const high = readings.reduce((top, one) => (one.level > top.level ? one : top))console.log(`Highest water: ${high.level} m at ${new Date(high.time).toLocaleTimeString()}`)Swap console.log for your mail service’s call, and it lands in your inbox at seven.
A year from a spreadsheet
Save the sheet as CSV with the time in the first column and a heading on each column. Name the columns after what the station measures.
Then send it in one call:
curl -F file=@harbour-2025.csv https://tidewater.example/in/YOUR-STATION/fileA year of ten-minute readings is about 52,000 lines and takes a few seconds.