/BabySleepCoach

DIY Baby Sleep Tracking

Primary LanguageJupyter NotebookOtherNOASSERTION

The Baby Sleep Coach

Shield: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0


This repo contains code to run the The Baby Sleep Coach. The Baby Sleep Coach provides sleep analysis of your baby, using only a video feed. You can access the sleep analysis via a locally hosted web app, which runs on launch.

Pre-requisites

  • Docker
  • Camera which supports RTSP
  • Compute accessible via HTTP requests (I used a Raspberry Pi, but you can use any computer)

tl;dr Run it with Docker

Copy the .env_sample template into .env

cp example.env .env

Configure .env file:

CAM_IP IP of your camera

CAM_PW pw for accessing your camera

PORT Port for accessing web app

REACT_APP_BACKEND_IP IP of your backend/api layer. Likely 192.168.COMPUTER_IP:8001

REACT_APP_RESOURCE_SERVER_IP IP of your resource server (runs on launch) Likely 192.168.COMPUTER_IP:8000

HATCH_IP (optional) IP of your hatch for wake light

VIDEO_PATH (optional) use to set path to recorded footage for debugging

Update docker-compose

Update the path in docker-compose.yml to be the root of this project on your machine.

Run it

docker compose up