๐Ÿ’“ 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. 1. You power on Reachy and connect to dashboard
  2. 2. You click the power button to start backend
  3. 3. Everything works perfectly
  4. 4. After 5-10 minutes of no commands...
  5. 5. Backend service times out and stops
  6. 6. Web server stays up but can't control motors
  7. 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