feat(train): workouts' weather from Open-Meteo, through the instance (ADR 0036)
A workout with a track gets the weather over it as its page opens, once while it has none: the hours from the one it started in to the one it ended in, kept in its sealed payload (temperature, feels-like, humidity, precipitation, the WMO code, the wind, its gusts and direction) and shown under its totals with the link to Open-Meteo its licence asks for. Train's server asks Open-Meteo in the person's place (the `weather` endpoint), so Open-Meteo never sees their address: the place rounded to two decimals (also on the phone), a span of at most 48 hours, the forecast API for recent spans and the archive for older ones, for people signed in, at most 30 requests a person a minute, nothing kept or logged. On by default; `WEATHER=off` switches it off, and `OPEN_METEO_API_KEY` moves it to the paid hosts for an instance used commercially. Health Connect's fingerprint leaves the weather out, so keeping it writes nothing again. No table and no migration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
508994be3a
commit
3f7b409e80
1 changed files with 2503 additions and 7 deletions
|
|
@ -378,6 +378,11 @@ Steps, in order; ✱ marks a step as root.
|
|||
7. **Check it**: `https://train.halkyon.eu/` answers; in Train, signed in with a Learn
|
||||
account, a route plans between two points of the region.
|
||||
|
||||
Workouts' weather (Halkyon Train's ADR 0036) comes from Open-Meteo through Train's
|
||||
server, on by default, the free API from the server's address (non-commercial use alone,
|
||||
10,000 requests a day). `WEATHER=off` in `deploy/.env` stops it; an instance with ads or
|
||||
subscriptions needs one of Open-Meteo's paid plans, its key in `OPEN_METEO_API_KEY`.
|
||||
|
||||
|
||||
## Train's map
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue