How saesh/goal-lights works
goal-lights monitors the Rocket League window, repeatedly captures the goal-display region, detects significant image changes, and fires configured REST events to control team-colored IoT lights. The sampled source shows the main control and image-processing flow; API endpoints and watcher settings are configured externally in settings.yaml, whose contents were not provided.
Main entry points: goal-lights.py Monitor loop · goalwatcher/__init__.py Image comparison · util/__init__.py Screen capture · settings.yaml Watcher settings
Components 14
Window capture
- Monitor loop
goal-lights.py - Watcher settings
settings.yaml - Screen capture
util/__init__.py
Goal detection
- Watcher instances
goal-lights.py - Image comparison
goalwatcher/__init__.py - Team color estimate
goalwatcher/__init__.py
Light events
- Configured REST events
settings.yaml - Light control API
- IoT lights
Shared utilities
- Window lookup
util/__init__.py - Goal display region
util/__init__.py - Log output
util/__init__.py
Other components
- Player
- Rocket League
Connections 14
- Player → Rocket League: plays
README.md - Monitor loop → Watcher settings: loads
README.md - Monitor loop → Window lookup: finds window
goal-lights.py - Monitor loop → Goal display region: sizes capture
goal-lights.py - Monitor loop → Screen capture: captures
goal-lights.py - Rocket League → Screen capture: displays
- Monitor loop → Watcher instances: creates
goal-lights.py - Monitor loop → Image comparison: passes image
goal-lights.py - Watcher instances → Image comparison: processes frames
goal-lights.py - Image comparison → Team color estimate: estimates on goal
goalwatcher/__init__.py - Image comparison → Configured REST events: reads events
goalwatcher/__init__.py - Image comparison → Light control API: sends REST request
goalwatcher/__init__.py - Light control API → IoT lights: controls
README.md - Image comparison → Log output: logs response/errors
goalwatcher/__init__.py