๐ Keep-Alive Setup Guide
โ ๏ธ The Timeout Problem
Reachy's backend motor control service automatically shuts down after a period of inactivity (approximately 5-10 minutes). This requires a power cycle to restore functionality. Our keep-alive solution prevents this by sending periodic heartbeat requests.
๐ Understanding the Issue
What Happens:
- 1. You power on Reachy and connect to dashboard
- 2. You click the power button to start backend
- 3. Everything works perfectly
- 4. After 5-10 minutes of no commands...
- 5. Backend service times out and stops
- 6. Web server stays up but can't control motors
- 7. Power cycle required to recover
Why It Happens:
- โข Safety feature to prevent unintended movement
- โข Power saving for battery operation
- โข Resource management on Raspberry Pi
- โข Prevents motor overheating from stuck positions
โ The Solution
Send periodic "heartbeat" requests to keep the backend service active. We've implemented three different approaches:
1. Browser-Based
Automatic when control page is open
2. Python Script
Run manually from terminal
3. System Service
Runs automatically at startup