Outdoors decision review
Architecture, decision criteria, message rules, and rotation behavior for the LocalPulse Outdoors screen.
Architecture scorecard
| Area | Rating | What is good | Gap / assessment |
|---|---|---|---|
| Store/provider separation | 8/10 | Providers publish plain readings; screens compose without fetching or drawing. | Good foundation. Add freshness/validity to every composed view. |
| Outdoors decision safety | 7/10 | Deterministic priority chain; official alerts and active precipitation override comfort. | Thresholds are hardcoded and fire/UV are not yet decision inputs. |
| Forecast consistency | 8/10 | Forecast and Outdoors consume one normalized precipitation event; dry pages can be suppressed. | Provider-specific confidence metadata and richer snow-rate semantics remain future work. |
| Local-time correctness | 8/10 | City UTC offsets drive clocks, forecast alignment, and day/night decisions. | Provider offset fallback to UTC needs an explicit missing-offset diagnostic. |
| City rotation | 6/10 | Weather/Forecast/Outdoors can be grouped per city in the all-city path. | Local/selected page scopes still need the same Outdoors pairing behavior. |
| Message UX | 7/10 | Decision, cyan reason, and white action are concise and auditable. | Some long alert/AQI strings can still clip; add a length test for every branch. |
| Observability | 9/10 | [OUTDOOR] logs include decision, reason/action, and source metrics. | Add a rule identifier such as rule=RAIN_SOON for machine-readable diagnosis. |
| Production readiness | 6/10 | Compiles, phase checks pass, and the flashed build is traceable. | Build 0.113 is newer than the last flashed image and still needs hardware acceptance. |
What must be fixed or reworked
Completed — City-scope pairingProduction now builds a concrete local/selected/all city playlist and runs Weather → Outdoors → optional Forecast for each city.
Completed — Formal precipitation event
PrecipitationEvent owns current phase, onset, peak range, probability, expected amount, and snow/rain kind. Forecast eligibility and wording use the same object.P1 — Add rule identifiersLog
rule=NWS_ALERT, rule=RAIN_NOW, rule=QUIET_HOURS, etc., alongside the human message.P1 — Add missing evidenceIntegrate UV before using it in decisions. Define fire thresholds before promoting FIRMS detections to a safety recommendation.
P1 — Validate copy geometryAutomate width checks for decision, reason, action, city names, and alert event strings at P1.
P2 — Move thresholds to policyStore named thresholds in one policy module so message behavior can be tuned without editing the renderer.
What the screen is responsible for
Outdoors is a compact recommendation, not a second weather dashboard. It answers “what should I do?” using synchronized city readings. It renders one decision line, one cyan reason, and one white action. During quiet hours it intentionally stays quiet unless a meaningful condition overrides it.
Provider data→Weather/AQI/NWS stores→ProductScreen decision chain→LED renderer + audit log
Inputs and ownership
Weather providerTemperature, humidity, wind/gust, current precipitation/rain/showers/snow, hourly probability and amounts, weather code,
is_day, and utc_offset_seconds.AQI providerUS AQI. Used for exposure guidance at 101+ and an indoor recommendation at 151+.
NWS alertsOfficial active alerts are authoritative. Forecast wind/rain does not become an official alert.
Fire providerFIRMS detections and nearest distance are available for evidence/logging. They are not currently a standalone Outdoors trigger.
Clock modelWeather/forecast/Outdoors city decisions use the vendor-provided city UTC offset. Freshness uses monotonic device time.
Decision tree (highest priority wins)
| Priority | Condition | Decision | Reason → action |
|---|---|---|---|
| 1 | Active official NWS alert | STAY INDOORS | <event> WARNING → FOLLOW ALERT |
| 2 | AQI ≥ 151 | STAY INDOORS | AQI value → LIMIT EXPOSURE |
| 3 | Temperature ≥ 105°F | STAY INDOORS | Temperature → STAY COOL |
| 4 | Temperature ≤ 20°F | STAY INDOORS | Temperature → WARM LAYERS |
| 5 | Gust ≥ 50 mph | STAY INDOORS | Gust → COVER UP |
| 6 | Current aggregate precipitation, rain, showers, or snow > 0 | TAKE COVER | RAINING/SNOWING NOW → UMBRELLA/WARM LAYERS |
| 7 | AQI ≥ 101, gust ≥ 30 mph, or temperature ≥ 95°F | LIMIT EXPOSURE / WINDY OUTSIDE / TAKE SHADE | Metric → specific action |
| 8 | Rain/snow signal in the next three hours or next-hour probability ≥ 50% | PLAN AHEAD | RAIN/SNOW SOON → UMBRELLA + JACKET / WARM LAYERS |
| 9 | 17:00–21:59 local time, no higher-priority condition | ENJOY THE EVENING | NIGHT temperature → COMFORTABLE AIR |
| 10 | 22:00–05:59 local time, no higher-priority condition | QUIET HOURS | NO ACTION NEEDED → ALERTS ONLY |
| 11 | Daytime with no higher-priority condition | ENJOY THE OUTDOORS | AQI/temperature → ENJOY THE DAY |
Forecast consistency rules
- “Raining now” requires current measured precipitation fields; probability alone never means it is raining now.
- Peak times and start times use the same hourly local-time array. The displayed peak range is clamped so it cannot appear before a reported measurable start.
- A Rain/Forecast page is eligible only when current precipitation exists, an hourly measurable rain/snow amount exists, or an hourly probability is at least 50%.
- A fully dry 12-hour window is skipped. Austin showing “NO RAIN NEXT 12H” is therefore expected to have no Forecast page once the eligibility build is flashed.
- Outdoors is always paired with every configured city; Forecast is optional per city. Production sequence is Weather → Outdoors → optional Forecast.
Rotation and observability
Production keeps each city together. Weather uses its configured city duration (minimum eight seconds); Forecast defaults to ten seconds; Outdoors uses the Forecast duration. Development mode remains independently selectable.
Every Outdoors render emits an
[OUTDOOR] log containing city, decision, reason/action, temperature, day state, precipitation components, next-hour probability, wind/gust, AQI, fire detections, distance, NWS activity, and event text. This makes each recommendation auditable.Known boundaries and next candidates
UVNot currently fetched. Add vendor UV fields before making UV a decision trigger.
Fire riskCurrent FIRMS data is detection evidence, not a calibrated fire-danger index. Define distance/count thresholds before using it for safety decisions.
Pollen/fog/ice/tornadoRequire authoritative provider fields and explicit thresholds; do not infer them from humidity or generic weather codes.