Skip to content

Space Window ability#272

Open
hassan1731996 wants to merge 11 commits into
openhome-dev:devfrom
hassan1731996:feature/space-window
Open

Space Window ability#272
hassan1731996 wants to merge 11 commits into
openhome-dev:devfrom
hassan1731996:feature/space-window

Conversation

@hassan1731996
Copy link
Copy Markdown
Contributor

What is Space Window?

A sky-watching ability that tells you exactly what's happening above your location tonight — ISS passes, aurora activity, and rocket launches — and alerts you before anything good happens so you never miss it.

Say your city once. After that it handles everything: ISS alerts 10 minutes before a visible pass, aurora alerts when the Kp index spikes high enough for your latitude, and launch countdowns 24 hours and 1 hour before liftoff.

Key Features

Proactive Alerts (background daemon)

  • ISS: fires ~10 minutes before any visible pass with rise time, compass direction, peak elevation, and duration. 40-minute look-ahead window prevents passes falling between 30-minute polls
  • Aurora: monitors NOAA Kp index every 30 minutes, alerts when it crosses the visibility threshold for your latitude — auto-calculated, adjustable
  • Launches: 24-hour and 1-hour warnings before confirmed launches via Launch Library 2
  • Morning brief at 9am local time: today's ISS passes, launches, and aurora status in one sentence

Interactive Queries

  • TONIGHT: full sky summary — ISS, aurora, launches — in one shot
  • ISS: next 2 days of visible passes with quality rating (great/good/fair by peak elevation), compass directions, and local times
  • AURORA: current Kp, whether it's above your threshold, how far away you are from visibility
  • LAUNCHES: next 7 days of confirmed launches with rocket, site, and countdown
  • SETUP: set city once, persisted across sessions with timezone auto-detection
  • ALERTS: toggle each alert type, adjust minimum elevation, set aurora Kp threshold

Smart Details

  • ISS pass quality rated by peak elevation: great (≥60°), good (≥40°), fair (≥30°) — only alerts on passes worth going outside for
  • Aurora threshold auto-set from latitude — London needs Kp 6, Oslo needs Kp 4, both hemispheres supported
  • 80+ cities in built-in map with LLM fallback for anything else
  • All times shown in user's local timezone via stdlib zoneinfo
  • Aurora and launch monitoring need zero API keys — active immediately after location is set

APIs Used

API Data Key Required
N2YO ISS pass predictions with elevation + compass Free (registration)
NOAA Space Weather Kp index / aurora None
Launch Library 2 Rocket launches None

Files

  • community/space-window/main.py — foreground skill (6 intents, LLM router, all handlers)
  • community/space-window/background.py — daemon (ISS/aurora/launch monitoring, morning brief)
  • community/space-window/README.md — trigger phrases, setup, full example conversation

github-actions Bot and others added 2 commits April 21, 2026 05:10
Voice-native sky-watching ability: proactive ISS pass alerts, aurora
activity monitoring, and rocket launch countdowns — all location-aware.

main.py (foreground skill):
- Six intents: TONIGHT, ISS, AURORA, LAUNCHES, SETUP, ALERTS
- LLM intent router with cheap pre-filter for SETUP
- 80+ city map for instant location resolution, LLM fallback
- ISS passes via N2YO API (free key, full elevation + compass data)
- Aurora Kp index via NOAA Space Weather API (no key required)
- Upcoming launches via Launch Library 2 (no key required)
- Timezone-aware time formatting via stdlib zoneinfo
- Aurora threshold auto-calculated from user latitude (both hemispheres)
- Pass quality rating: great (>=60deg), good (>=40deg), fair (>=30deg)

background.py (daemon):
- 30-minute poll interval; 40-minute ISS alert window prevents missed passes
- ISS alert ~10 minutes before pass: rise time, direction, peak elevation
- Aurora alert when Kp crosses user latitude threshold, once per day cap
- Launch alerts at 24h and 1h before confirmed launches
- Daily morning brief at 9am local time
- All times in user's local timezone via stored tz string

Zero required API keys for aurora and launch features;
N2YO free key needed only for ISS pass tracking
@hassan1731996 hassan1731996 requested review from a team as code owners May 24, 2026 06:04
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 24, 2026

🔀 Branch Merge Check

PR direction: feature/space-windowdev

Passedfeature/space-windowdev is a valid merge direction

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 24, 2026

✅ Community PR Path Check — Passed

All changed files are inside the community/ folder. Looks good!

@github-actions github-actions Bot added the community-ability Community-contributed ability label May 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 24, 2026

✅ Ability Validation Passed

📋 Validating: community/space-window
  ✅ All checks passed!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 24, 2026

🔍 Lint Results

__init__.py — Empty as expected

Files linted: community/space-window/background.py community/space-window/main.py

✅ Flake8 — Passed

✅ All checks passed!

hassan1731996 and others added 6 commits May 24, 2026 11:08
- Remove empty f-string in background.py (F541)
- Rename ambiguous variable 'l' to 'launch' in two places in main.py (E741)
- Reset CONTRIBUTORS.md to upstream/dev
Root cause: _handle_tonight, _handle_iss, and _handle_aurora all spoke
a prompt asking the user where they are, then immediately returned and
called resume_normal_flow(). The user's answer landed in the generic AI
instead of SpaceWindow, so location was never saved and every follow-up
trigger hit the same dead end.

Fix: add _ensure_location() helper that asks for the city inline,
resolves and saves it, then returns True so the original handler
continues. All three content handlers now call _ensure_location()
instead of early-exiting. First run is now a single natural flow:
say "space window" → asked for city → say city → ability proceeds.
@hassan1731996 hassan1731996 force-pushed the feature/space-window branch from 7b80644 to bc87837 Compare May 24, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-ability Community-contributed ability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant