The Weather dashboard is a standalone Streamlit frontend for cached Open-Meteo forecast data. CarUi can launch it from the Weather screen, but the dashboard remains independently runnable.
The dashboard contains presentation logic only. Weather retrieval and persistence live under controllers/weather, with atomic byte storage supplied by controllers/cache.
After CarUi becomes ready, it can warm the Streamlit server and refresh the weather snapshot in daemon workers. Opening the dashboard then renders the cached snapshot before any stale-data refresh is needed.
CarUi selects weather coordinates in this order:
Reverse geocoding is intentionally excluded from the launch path. GPS and last-known locations are displayed as coordinates, avoiding a slow external lookup and allowing startup when that service is unavailable.
The default weather freshness interval is 120 seconds. When cached data is fresh, the dashboard performs no forecast request. When it is stale, the controller requests Open-Meteo data and atomically replaces the snapshot.
If a refresh fails and an older snapshot exists, the dashboard renders the last successful forecast and retains its original update time. If no cached snapshot exists, the initial dashboard session must retrieve one before it can render weather data.
Enable the dashboard and background server warm-up in config/runtime.toml:
The dashboard browser uses runtime.auxiliary_display, which defaults to :0. Override the display for one CarUi launch with:
The last-known position used by Weather is configured separately:
From the repository root:
Alternatively:
Then open http://127.0.0.1:8501.
The standalone dashboard uses these optional environment variables:
| Variable | Default | Purpose |
|---|---|---|
| OPENROAD_WEATHER_CACHE_DIRECTORY | ~/.cache/openroadcode/weather | Shared forecast snapshot directory |
| OPENROAD_WEATHER_REFRESH_SECONDS | 120 | Maximum snapshot age before refresh |
When run without CarUi, the first session refreshes the snapshot itself. A subsequent launch can reuse the persisted data.
CarUi-managed processes write to:
The dashboard requires Streamlit, streamlit-autorefresh, and Requests. CarUi launches it with the active Python environment, so dependencies should be installed into the same environment used to run OpenRoadCode.