Skip to content

epic: Sleepypod Mini — Snoo bassinet integration #405

@ng

Description

@ng

Vision

Add support for the Happiest Baby Snoo smart bassinet as a second device type ("Mini") in sleepypod-core. The pod hardware is the host — always-on, always on the network — so Mini runs as a module within the existing server at $0 incremental hosting cost.

Architecture Decisions

  • One app, feature flag — not a separate repo or second Next.js instance
  • Build-time flag ENABLE_MINI=true — CI produces two TARs: standard and mini-enabled
  • Pod hardware: 4-core ARM, 1.9GB RAM, 1.3GB available, 1.7GB disk free
  • A second Next.js instance would be wasteful; Mini is just a PubNub client + tRPC routes + DB tables
  • The Snoo communicates via cloud only (REST API + PubNub real-time), no local hardware access needed

Snoo Communication Protocol

  • Data API (REST, Happiest Baby servers) — session history, device status, read-only
  • Control API (PubNub pub/sub) — start/stop, soothe level, motion control, real-time state
  • Auth — OAuth PKCE flow to Happiest Baby, JWT tokens for PubNub
  • Reference implementations: pysnoo2 (Python), ha-snoo (Home Assistant)

Sub-Issues

  1. #___ — Rewrite pysnoo2 in TypeScript (auth, data API, PubNub control)
  2. #___ — Drizzle schema for Mini (sessions, soothe events, baby sleep records)
  3. #___ — tRPC routes for Mini device control + data
  4. #___ — Feature flag build system (ENABLE_MINI conditional imports)
  5. #___ — Baby biometrics from Snoo telemetry (sleep duration, cry events, soothe responsiveness)

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions