← KettlewiseAll help

Weather module

A 7-day forecast from Open-Meteo (free, no account, no key), cached so answers, panels and the brief work offline. Never writes anywhere: the connector makes two kinds of GET request and nothing else (scripts/check_boundaries.sh fails CI on anything more).

Setup (one line)

The module does nothing until you tell it where you are. It never guesses or looks up your location. Add one of these to ~/kettlewise/data/.env:

KETTLEWISE_WEATHER_PLACE="Boston"              # a city; "Portland, Oregon" to pick one
# or, to skip the name lookup entirely:
KETTLEWISE_WEATHER_LATITUDE=42.36
KETTLEWISE_WEATHER_LONGITUDE=-71.06

Then kettlewise sync weather and kettlewise weather status to check what it found. The scheduled job (make schedule) refreshes it hourly; until a location is set, that job does nothing and makes no request.

Units default to US: °F, mph and inches. For metric:

KETTLEWISE_WEATHER_TEMPERATURE_UNIT=celsius   # also switches rain to millimetres
KETTLEWISE_WEATHER_WIND_SPEED_UNIT=kmh

What leaves your Mac

Only a coarse location, and only to Open-Meteo:

RequestHostWhat's sentWhen
Geocodinggeocoding-api.open-meteo.comthe city name in KETTLEWISE_WEATHER_PLACE (only the part before a comma)once; again only if you change the setting
Forecastapi.open-meteo.comlatitude and longitude rounded to 2 decimals (~1 km), the units, timezone=autoeach sync (hourly)

Coordinates are rounded before any request, whether they came from the lookup or from your settings, so nothing more precise than about a kilometre is ever sent. No account, no key, no cookie; Open-Meteo sees your IP address, as any website would. With coordinates set, no name is ever sent. Nothing about you, your calendar or your questions is ever part of a request.

What's cached

In ~/kettlewise/data/kettlewise.db, replaced on every sync (old days drop out):

KindWhat
placethe resolved place name, its rounded coordinates, units, when it was fetched
forecast_dayone per day: high, low, rain chance and amount, sunrise, sunset, a description of the WMO weather code, and that day's 24 hours (temperature, feels-like, rain chance and amount, code, wind)

Deleting kettlewise.db forgets it all, including the looked-up place.

Facts computed in code

The model is handed these and never works them out itself:

Questions respect their time window: "can I fit a run in tomorrow evening?" gets tomorrow 5–10 PM hour by hour with its dry spans; a whole day uses 6 AM–10 PM; no time named means the rest of today and the week ahead; the past and beyond 7 days say there's no forecast.

Tools

weather.forecast(start, end), weather.hourly(day, day_start?, day_end?), weather.dry_windows(day, min_minutes?, day_start?, day_end?). In orchestrated mode the last pairs with calendar.free_windows for "when can I go for a run?".

Panels

weather.now (headline): "Rain after four." with the temperature now and sunset. weather.today (metrics): now, high, low, rain chance. Without a location, the headline says how to set one.

Removing it

Delete the KETTLEWISE_WEATHER_* lines from .env; the next sync makes no request. The cached forecast stays until kettlewise.db is deleted, or leave the module out of KETTLEWISE_MODULES.