How frogcaller/ha-gesture-remote works
This is a single-file, local webcam gesture remote for Home Assistant. The main workflow is camera frames → hand tracking and gesture interpretation → configurable action mapping → Home Assistant commands for media-player or remote entities; the app also displays camera/video feedback. Setup connects to Home Assistant to discover entities and save configuration, while runtime controls support remapping and multiple cameras. The tree contains only one runtime source file, so distinct responsibilities share its path. The sampled excerpts are partial; links reflect the README’s documented workflow and avoid assuming finer internal call order.
Main entry points: ha_gesture_remote.py HA service client
Components 19
Setup and settings
- Setup UI
ha_gesture_remote.py - Config read/write
ha_gesture_remote.py - Entity discovery
ha_gesture_remote.py - Gesture remapping
ha_gesture_remote.py
Camera and gestures
- Camera sources
ha_gesture_remote.py - Hand tracking
ha_gesture_remote.py - Gesture detection
ha_gesture_remote.py - Camera selection
ha_gesture_remote.py
Remote runtime
- Action mapping
ha_gesture_remote.py - Remote control loop
ha_gesture_remote.py - HA service client
ha_gesture_remote.py - Command queue
ha_gesture_remote.py - Media-player control
ha_gesture_remote.py - D-pad remote control
ha_gesture_remote.py - Video feedback
ha_gesture_remote.py
Other components
- User
- Webcam
- Home Assistant
- TV
Connections 25
- User → Setup UI: configures
- Setup UI → HA service client: connects
- HA service client → Home Assistant: queries entities
- Home Assistant → Entity discovery: returns entities
- Entity discovery → Setup UI: fills selectors
- Setup UI → Config read/write: saves settings
- Config read/write → Remote control loop: loads settings
- Webcam → Camera sources: provides frames
- Camera sources → Hand tracking: supplies frames
- Hand tracking → Gesture detection: provides landmarks
- Camera sources → Camera selection: provides views
- Camera selection → Gesture detection: selects view
- Gesture detection → Action mapping: identifies gestures
- User → Gesture remapping: opens remapping
- Gesture remapping → Config read/write: saves mappings
- Action mapping → Remote control loop: selects action
- User → Remote control loop: uses controls
- Remote control loop → Command queue: queues commands
- Command queue → HA service client: dispatches commands
- HA service client → Media-player control: calls services
- HA service client → D-pad remote control: calls services
- Media-player control → Home Assistant: targets entity
- D-pad remote control → Home Assistant: targets entity
- Home Assistant → TV: controls
- Remote control loop → Video feedback: updates display