I Let AI Build a Tool to Help Me Figure Out What Was Waking Me Up at Night

· ai · Source ↗

TLDR

  • Software engineer used AI tooling to build a weekend Home Assistant + Raspberry Pi + Garmin sleep-data correlation tool that pinpointed city noise disrupting sleep.

Key Takeaways

  • Built in ~8 hours: two USB mics, a Raspberry Pi rolling audio buffer, Garmin Connect sleep-stage pull, and a DAW-style web app stitching all tracks onto a synced timeline.
  • Detection only activates when Home Assistant confirms the user is home and in bed; no audio hits disk until a volume threshold is crossed, limiting unnecessary recording.
  • AI wrote the code and was given SSH access to the Pi to iterate directly on the device; author tested results only and never reviewed the code itself.
  • Root causes found: neighbor door slams, dishes, street motorbikes, and trash trucks. Fixes were acoustic panels, door/window insulation, and one conversation.
  • Author argues AI lowered the “effort-to-payoff” bar enough to move personal tooling projects from “not worth it” to “sure, one weekend.”

Hacker News Comment Review

  • Simpler alternatives (earplugs with clinical evidence, white noise apps, or a phone recording plus a basic Python amplitude script) would solve the same problem faster for most people, and commenters pushed back on the complexity-to-outcome ratio.
  • CO2 levels visible in the app screenshot drew immediate attention: one commenter noted unhealthy nighttime concentrations and linked bedroom ventilation, not noise, as a likely sleep-quality factor the tool surfaces but the post underweights.
  • Several commenters noted non-acoustic causes for 3am wake patterns, including digestive issues and blood sugar, suggesting noise logging alone can miss systemic causes.

Notable Comments

  • @babblingfish: cites a peer-reviewed sleep study showing earplugs reduce noise-triggered awakenings, framing the build as solving a problem with a known cheap fix.
  • @simonbarker87: consistent 3:30am wake-ups in a silent environment traced to IBS and hunger response, confirmed by a dietician as common.

Original | Discuss on HN