Run window
Give it a location and the hours you can run. It returns the best weather window for each session length, today and tomorrow.
Example request
GET /api/window?lat=52.37&lon=4.89&avail=07-09,12-14,17-21
lat and lon are required. avail, dark,
rain and lang are optional. The full contract is in
openapi.yaml.
Capacity
The service accepts at most 300 locations per UTC day, to stay within the weather provider's free limits. A location that was admitted keeps working all day. A new location over the limit gets a 503 until UTC midnight.
Privacy
- The service receives the coordinates you send.
- TRMNL users also send a Tredict token in the Authorization header. nginx removes it, and the app removes it again. The service never reads, logs or stores it. It never stores tokens.
- Weather is requested from Open-Meteo with coordinates rounded to 2 decimals.
- The cache holds coordinates rounded to 2 decimals for about 3 hours. Data older than 3 hours is never served.
- The count of distinct locations is stored as salted hashes, with the key kept only in memory and replaced daily, not written to disk or logs.
- Logs hold known paths, coordinates rounded to 1 decimal and the User-Agent. Logs go to Better Stack.
- Logs hold a client ID that is salted and changes every day, instead of an IP address.