Progress Log
Weather Widget with Open-Meteo API
April 12, 202609:55Build Log
Weather Widget with Open-Meteo API
Date: 2026-04-12 Type: Build Log
Context
The Control Center dashboard needed local weather data to help decide when to run tick-dragging missions — temperature and humidity directly affect tick activity. We chose Open-Meteo because it's free, requires no API key, and supports elevation-corrected temperatures (important at 2000ft in the Catskills).
What Changed
- Evaluated free weather APIs (Open-Meteo, OpenWeatherMap, Weather.gov, Visual Crossing). Selected Open-Meteo for zero auth overhead and elevation support.
- Built
src/lib/weather.ts— a typed client that fetches current conditions + next 8 hourly forecasts from Open-Meteo. Includes a WMO weather code → label/emoji mapping table. - Built
src/components/weather-widget.tsx— compact card (max-w-xs, square-ish) showing current temp/conditions/humidity/wind, with a horizontally scrollable 8-hour forecast strip. Auto-refreshes every 15 minutes. - Added the widget to the Control Center page between Rover Live and the Stats grid.
- Documented both API call patterns (current conditions and hourly forecast) in
docs/articles/weather-api.md, including full query params, response shapes, and the WMO code reference table.
Files Modified
src/lib/weather.ts— New. Weather fetch client with types and WMO code mapsrc/components/weather-widget.tsx— New. Compact weather card componentsrc/app/control-center/page.tsx— Added<WeatherWidget />import and placementdocs/articles/weather-api.md— New. API documentation for both call patterns
Key Takeaways
- Open-Meteo uses lat/lon (42.18, -74.53 for zip 12444) with an
elevation=610param that adjusts temperature to actual altitude rather than interpolated grid elevation - The API returns hourly arrays indexed from midnight — to get "next 8 hours" you find the current hour index and slice from there
- Request
forecast_days=2to cover late-night queries that would roll past midnight - No rate limit key needed; they ask to stay under ~10k calls/day (our 15-min refresh is ~96/day)
