Back to graph

Topic analysis

I let AI build a tool to help me figure out what was waking me up at night

I try to pay attention to the small things that affect my quality of life. When something keeps bothering me, I want to investigate, find a likely cause, and act on it. What changed recently is what I'm willing to build to support that. With AI tooling, projects I would have dismissed a few years ago as "too much effort for the payoff" now fit into a weekend. So whenever I bump into a problem in my daily life, I catch myself thinking, "actually, I could build something to look into this" . This post is about one of those problems: my sleep. I live in a noisy city. Some nights I wake up at 3 am with no idea what woke me up. Other nights I don't fully wake up, but my watch the next morning shows that something pulled me out of deep sleep at 3:32 am. And without naming the cause, you can't fix it. Was it inside the flat? Outside? A neighbor? A truck? A door? Any "solution" you try is just a guess, and guessing tends to be expensive. So I was on a mission 😏 One bit of context first: I already have a smart home setup with Home Assistant and a bunch of sensors around the flat (motion, doors, lights, temperature, humidity, CO₂, air quality) . A lot of the data I needed for this project was already being collected. I only had to add the audio piece, pull in my sleep data, and tie everything together. I only needed to add a few things: When the Pi hears something loud enough to be interesting, it saves a short clip with a few seconds of context before and after. The whole detection mode is gated by Home Assistant: the Pi exposes itself as a Home Assistant integration, and an automation only switches it on when I'm at home, in bed, and around my usual sleep time. Outside of those conditions, it's completely disabled, no microphone access at all. That's the behavior I wanted, even on my own home network. The web app is where the actual usefulness happens. Each night is laid out like tracks in a music editor: one for sleep stages, one for heart rate and HRV, a few for the sensor events, and one for the noise events with the audio loaded in. The most useful feature, by far, is how it visually marks the moments where my sleep stage shifted or I woke up. That's the entry point. I scan a night, find the highlighted moments (in red) , and click to listen. One more nice touch: the frontend is a progressive web app with web push, served only inside my home network. The moment I wake up and check my phone, I get a notification that last night's data is ready to review. Nothing leaves the network, which I really like. To set expectations clearly: AI is what made it realistic for me to build this in a weekend. The whole thing took roughly 8 hours of work, plus a few small improvements over the following days. Without AI tooling, I would not have started. But I'm not using AI to identify the actual sounds (at least, not yet) . The listening part, recognizing a door vs. dishes vs. a motorbike, is still me with headphones on. The tool just points me at the moments worth listening to. And on the workflow: I didn't read the code (conscious choice) . I tested the results, gave direct feedback when something was off, and let the AI verify its own output by letting it take screenshots of the running app in my browser. For the micro-computer side, I went one step further. The Raspberry Pi was a fresh, empty install, so I gave the coding agent SSH access and let it test things directly on the device. It would set up an experiment, ask me to shout, drop something, or run the kitchen tap, record the sample, and then analyze it for me, sometimes pulling out spectrograms. I had to be explicit about wanting it to work this way, but once instructed, the iteration loop was honestly quite fun. For a personal project running on my own hardware, this whole setup was enough. The interesting shift here isn't that AI solved my problem. It's that AI lowered the cost of building the thing that lets me solve my own problem. I get the sleep data from my Garmin* watch. Every watch and ring calculates sleep slightly differently, and to be honest, I don't fully trust any of them on the exact sleep stage I was in at any given second. What they're all reasonably good at, though, is detecting when you actually woke up. Those wake events, plus the rough transitions between stages, are what I actually care about here. They're not a clinical truth. They're visual markers that tell me "this moment is worth investigating" . Without them, I'd be sitting through hours of audio of the fridge humming and a neighbor doing nothing in particular. I'm not trying to do sleep science. I'm trying to find what sometimes made me feel rough in the morning. Once I started actually using this, the patterns came out fast. The usual suspects: With actual data, I could finally act with some confidence instead of guessing: It's not perfect (cities are cities) , but the difference shows up both in how I feel in the morning and in the Garmin* data over time. A bit more detail for anyone interested in the tech: What I have is already enough. I can take action, which is the part that matters most. But there are a few extensions I might get to at some point: Each of these would probably be another weekend, which is sort of the broader point of this post. I'll get to them eventually, or maybe I won't, because what's already there does the job. The specific project matters less to me than the underlying pattern. There's a whole category of small, personal problems that used to sit in the "would be nice, not worth building" bucket. With AI tooling, a lot of those projects have crossed into the "sure, why not, let's give it a weekend" zone. A few things I'm taking from this one: About my background: I come from software engineering. That's the main reason I could pull this off in 8 hours. I knew what to ask for and when to be skeptical of what came back. Audio processing, on the other hand, is a space I'm new to (I've used Logic Pro and a few of its plugins, but not much beyond that) , and I built most of that side with no prior foundation. That said, I would not publish this code anywhere as-is. It's only tested based on results, with no proper code review. The reason that's fine in my case is that it runs in my home lab, where I can lock it down and restrict what it can access. I'm not a sleep scientist, and this isn't meant to be a guide to good sleep. I'm someone who tries to pay attention to the small things that affect daily quality of life and act on them when I can. There are many things in my life I approach this way, big and small. This is one of them. If you also live in a noisy city and your sleep tracker keeps telling you "your sleep was rough" without telling you why, I'd really recommend trying some version of this. You don't need to build exactly what I built. Even just placing a microphone next to your bed and reviewing the spikes the next morning will already teach you a lot 🤗. Plot twist: now that I've added more insulation to the windows and doors, I have to figure out a smart way to reduce the CO₂ levels.. *= I do not like Garmin, I think they're a fraudulent company systematically breaching consumer rights and I'm looking for alternatives. Already converted multiple people to Coros.

Heat score

1

Sources

1

Platforms

1

Relations

0
First seen
May 12, 2026, 5:04 AM
Last updated
May 12, 2026, 12:01 PM

Why this topic matters

I let AI build a tool to help me figure out what was waking me up at night is currently shaped by signals from 1 source platforms. This page organizes AI analysis summaries, 1 timeline events, and 0 relationship edges so search engines and AI systems can understand the topic's factual basis and propagation arc.

News

Keywords

10 tags
letbuildtoolhelpfigureoutwaswakingnighttry

Source evidence

1 evidence items

I let AI build a tool to help me figure out what was waking me up at night

News · 1
May 12, 2026, 5:04 AMOpen original source

Timeline

I let AI build a tool to help me figure out what was waking me up at night

May 12, 2026, 5:04 AM

Related topics

No related topics have been aggregated yet, but this page still preserves the AI summary, source links, and timeline.