How jalen-cheng/eightpod works
EightPod is a local control system for Eight Sleep Pods: a phone-friendly web app talks to a server on the Pod, which controls firmware and exposes a local API. Users adjust temperature and power, configure schedules and alarms, manage settings, and inspect status and available sleep data. The server also monitors device sensors and runs scheduling jobs; a separate biometrics service processes sensor data. The README documents these product capabilities, while sampled source confirms app routing, server route registration and startup, and biometrics service-status updates; several internal control paths are not shown.
Main entry points: main.tsx Phone web app · server.ts Server runtime · routes.ts Local API routes · jobScheduler.ts Job scheduler
Components 18
Web app
- Phone web app
app/src/main.tsx - Temperature control
app/src/pages/ControlTempPage/ControlTempPage.tsx - Schedule editor
app/src/pages/SchedulePage/SchedulePage.tsx - Settings
app/src/pages/SettingsPage/SettingsPage.tsx - Sleep and vitals
app/src/pages/DataPage/DataPage.tsx - Device status
app/src/pages/StatusPage/StatusPage.tsx
Local server
- Local API routes
server/src/setup/routes.ts - Server runtime
server/src/server.ts - Services state
server/src/db/services.ts
Pod device
- Firmware interface
server/src/8sleep/frankenServer.ts - Sensor monitors
server/src/8sleep/bedSensorMonitor.ts
Schedules and jobs
- Schedules and alarms
server/src/db/schedules.ts - Job scheduler
server/src/jobs/jobScheduler.ts
Biometrics
- Sensor processing
biometrics/stream/stream.py - Sleep detection
biometrics/sleep_detection/sleep_detector.py - Vitals analysis
biometrics/vitals/calculations.py - Health updates
biometrics/service_health.py
Other components
- Pod user
Connections 18
- Pod user → Phone web app: uses
README.md - Phone web app → Temperature control: routes to
app/src/main.tsx - Phone web app → Schedule editor: routes to
app/src/main.tsx - Phone web app → Settings: routes to
app/src/main.tsx - Phone web app → Sleep and vitals: routes to
app/src/main.tsx - Phone web app → Device status: routes to
app/src/main.tsx - Phone web app → Local API routes: calls local API
README.md - Server runtime → Local API routes: registers
server/src/server.ts - Local API routes → Services state: reads and writes
- Server runtime → Firmware interface: initializes
server/src/server.ts - Server runtime → Sensor monitors: starts
server/src/server.ts - Server runtime → Job scheduler: starts
server/src/server.ts - Job scheduler → Schedules and alarms: executes scheduled work
- Job scheduler → Firmware interface: controls firmware
README.md - Sensor monitors → Sensor processing: provides sensor data
README.md - Sensor processing → Sleep detection: supports analysis
- Sensor processing → Vitals analysis: supports analysis
- Health updates → Local API routes: posts health status
biometrics/service_health.py