frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

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

https://martin.sh/i-let-ai-build-a-tool-to-help-me-figure-out-what-was-waking-me-up-at-night/
33•showmypost•1h ago

Comments

ziml77•44m ago
Why use a generated image in that weird dirty yellow style when you have a real screenshot to show?
dev360•42m ago
My mom would love this one :) .. she told me recently about a long-running chat gpt session that she's had for over a week, where she was going back and forth trying to figure out the source of some strange sound in the building.
usernametaken29•40m ago
My sleep was not good so I installed panelling and now I sleep better. There you go. Saved you 8 hours and using AI
bovinegambler•36m ago
Can you tell me more about this panelling?
showmypost•15m ago
They’re called “MITTZON”, made for offices. Also great room separators. I’ve tested them for a few nights and they work surprisingly well.

Otherwise making sure the windows are properly sealed is first resort. And if you’re living with other people (partner, flatmates, family) it also helps to check the doors

_dain_•40m ago
This is cool don't get me wrong, but surely overcomplicated? Why not just record audio to disk the whole night then eyeball the waveform for loudness spikes? If you just don't connect it to any network at all, there's no data breach risk (or am I misunderstanding the justification for the noise-detection toggle thing?).

Also the AI-generated hero image looks vile.

showmypost•5m ago
Thx for the feedback about the hero image. I just removed it. (you weren’t the only one pointing it out)

The intention was to have something less detailed than the screenshot in the post.

About the other thing: yes this would have worked for a night or so. I wanted to be able to go back and forth between nights and compare. I also had concerns about the SD-card durability and storage capacity. Still, after an hour into letting the coding agent do its thing, I was impressed by the result, so more and more ideas popped into my head

cyanydeez•37m ago
hint: your watch is probably lying to you and you're following a normal bifurcated sleep pattern.

AI is melting your real world understanding: https://www.sleepfoundation.org/how-sleep-works/biphasic-sle...

phainopepla2•37m ago
I'm surprised that AI didn't tell him that the most likely cause of regularly waking up around 3 am is a cortisol spike. Try some breathing exercises or some other type of stress relief throughout the day, and you might sleep better.

In my case, thinking too much about the causes of bad sleep actually contributed to making sleep worse, so if this guy is anything like me then this whole project could be hurting his sleep rather than helping.

showmypost•28m ago
I’m actually the author of the post and doing regular breathing exercises and some additional things. Pretty sure my cortisol levels at night are (currently) not an issue. Morning walks looking up into the sky also help me a lot. Falling asleep isn’t my issue

I grew up in the country side and unfortunately, where I live now, double glassing isn’t a thing unless you live in a recently built house.

That doesn’t nullify what you’re saying, obviously putting worries into sleep affects the sleep itself. Still thought it was an interesting project to build as I’m anyways cautious about noise and air pollution topics :)

nekooooo•32m ago
what a waste of technology. you could have had a pen and graph paper hooked up to an microphone 100 years ago and looked for the spikes in the time set.
jijji•21m ago
it could also be common sense.. you live in a noisy city and you are wondering what the noise is.... maybe it could be the city itself? how about sleep in a different smaller town and then ask yourself the same question, you'll probably get a different answer.
lbrito•30m ago
Plot twist: the existential dread of an AI-ified world where "AI" is the answer to everything was what was waking him.
codazoda•28m ago
This reminds me of a weird story...

I went to work at a BBB office once. They turned all their computers off at night and every morning they were back on. It was just "normal" for them.

I can't even remember what problem I was troubleshooting. At the time I was working on IVR systems.

Anwayz, I was working late in their office. Everyone had turned off their computers and went home. At exactly Midnight, every computer in the office turned back on.

I walked around the office looking at desks wondering what had happened. On one persons desk was an alarm clock with a very quiet alarm buzzing. I checked the clock and it was set for midnight (probably a default). About two minutes later it turned off automatically.

I turned off computers and re-set the alarm to go off a few minutes later.

When that alarm clock went off it somehow caused either draw or feedback in the wiring that caused all the computers to turn back on. At the time I wondered if it had something to do with wake on lan.

In any case, I suggested that person take their alarm clock home.

tppiotrowski•27m ago
Related project I did in 2014 tried to do this. I was a web developer so used the web audio APIs to trigger a recording when the decibel level exceeded a certain value. I was living in a big tent in my friends back yard in Sydney at the time and was convinced it was airplanes coming into SYD that were waking me up at 4am but never really captured conclusive evidence because my laptop battery couldn't make it through the night :)
sciencesama•23m ago
long time back i had this sense orb that did something similar and it was night sounds made me wake up !
sciencesama•22m ago
https://sense.io/
amelius•23m ago
I was under the impression that the pattern "I have a problem -> let's ask AI" is frowned upon here.
showmypost•19m ago
I’m also a little surprised about it. The reason I wrote this post was to send the message: I wouldn’t have done this if it wasn’t for the AI tooling
nevi-me•19m ago
It seems fine if you express what you did without focusing on the code.

It resonates well with what some people have been saying about building software for 1 person.

nevi-me•22m ago
That CO2 concentration looks unhealthy, I wonder to what extent it's affecting your sleep quality (as opposed to waking you up).

> Measure before you fix

In my case, I got a few IKEA CO2 sensors, and after leaving them in the bedrooms for a few days, we found that leaving an outside window slightly open + the bedroom door open, kept the CO2 levels below 600PPM at night.

We're 1000ft/300m away from a motorway, but fortunately the noise pollution isn't bad. So ventilating (even as it's getting cold) turned out to be a simple fix. I hadn't thought of collecting sleep data from our devices, but maybe I'll get an AI to do that, so I can correlate our sleep quality with the environment.

bad_username•22m ago
> 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.

I love my Garmin, but it's one of the worst smart watches to track sleep with. It consistently ranks poorly in tests that stack it up against pro sleep equipment, and from my experience it struggles to even detect sleep times properly. That 3:32 event that the watch said has pulled you out of deep sleep may not have been real.

pizzly•19m ago
This is really cool. We did a similar thing around 2 years ago but didn't use AI in that case. Just used a phone to record a few nights sleeping. Then a python script. I manually listened for some time in order to find the threshold amplitude (where all sounds would be ignored below and tracked above). Generated a graph that should the spikes of interest. Clicked on the spikes which went to the timestamp in the audio and listened. Not super scientific I know.

Two observations. 1. Often you wake up after a loud noise but like 5 minutes later with no memory of it. 2. even if you don't wake up from the noise your breathing changes, more likely to talk in sleep and shuffle more. So even if you not waking up your quality of sleep is disrupted.

Our case had some random construction like noise in the early morning, lasted around 10 seconds and disappeared. However, we noted even ordinary sounds we didn't think was loud was effecting our sleep.

Solution for that place was earplugs and a loud fan to generate white noise.

kmm•17m ago
I like the temperate graph halfway down the page. It looks like two decaying exponentials alternating every ~40 minutes, with the downward one steeper than the upward one. It's a neat visualization of hysteresis, where the thermostat presumably has a different temperature threshold for turning off or turning on (or perhaps there's a minimum time between state switches). Without the scale it's hard to know for sure.
curtisblaine•13m ago
This is cool, but a simple circular buffer audio recorder connected to stdin would have been sufficient. The recorder records continuously on a circular buffer that stores the last 5 minutes, and whenever OP wakes up, he can press any key on the keyboard to dump the current 5 minutes on storage, with the timestamp as file name. False positives are much less possible, and the whole system can just be a small CLI program.

A million baby monitors and security cameras were easily viewable by hackers

https://www.theverge.com/tech/926487/meari-technology-hack-baby-monitor-security-camera
1•starkparker•59s ago•0 comments

Ask HN: How are you preparing for interviews nowadays?

1•holden_nelson•3m ago•0 comments

Show HN: Compiled an archive of copium content for SF Bay Area engineers

https://copium.fyi/
1•average_ana•5m ago•0 comments

Uniform Rental Contracts Explain the U.S. Economy

https://www.thebignewsletter.com/p/fine-print-how-uniform-rental-contracts
1•connor11528•5m ago•0 comments

What Challenging a Bowling Monopoly Says About America

https://www.thebignewsletter.com/p/monopoly-round-up-what-challenging
1•connor11528•6m ago•0 comments

Counterfactual samples synthesizing for mitigating hallucination in LLMs

https://pubmed.ncbi.nlm.nih.gov/41729914/
1•fragmede•12m ago•1 comments

Tashk – a todo manager written in pure bash

https://github.com/agamoaltrove/tashk
1•agamoaltrove•14m ago•0 comments

The lab where Ford is trying to crack the code on cheap EVs

https://www.theverge.com/transportation/923704/ford-ev-skunkworks-lab-long-beach
2•dkobia•15m ago•0 comments

Elon Musk and Tim Cook among CEOs expected to accompany Trump on China trip

https://www.bbc.com/news/articles/c5yx757w048o
2•bigyabai•17m ago•0 comments

Tensor Shapes

https://pyrefly.org/en/docs/tensor-shapes/
2•rexledesma•17m ago•0 comments

French woman was told by doctors hantavirus symptoms were just anxiety

https://www.theguardian.com/world/2026/may/11/french-womandoctors-hantavirus-symptoms-hv-hondius
3•cdrnsf•18m ago•0 comments

OpenDyslexic: A Typeface for Dyslexia

https://opendyslexic.org/
2•oldfuture•18m ago•0 comments

Cloud Storage Rapid: Turbocharged object storage for AI and analytics

https://cloud.google.com/blog/products/storage-data-transfer/cloud-storage-rapid-turbocharges-obj...
1•leg•21m ago•0 comments

My First AI Project: An "Evidence-Based" System Architect. Looking for Feedback

https://github.com/maioio/genesis-architect
1•maioio•21m ago•0 comments

Surprise X-Ray Discovery May Explain Red Dots in Early Universe

https://www.sciencealert.com/surprise-x-ray-discovery-may-explain-strange-red-dots-in-early-universe
2•smooke•21m ago•0 comments

Swatch and Audemars Piguet Are Planning a Collaboration Watch

https://www.hodinkee.com/articles/its-official-swatch-and-audemars-piguet-are-planning-a-collabor...
1•nstj•25m ago•0 comments

Lawsuit accuses ChatGPT of helping gunman plan FSU mass shooting

https://www.pbs.org/newshour/nation/lawsuit-accuses-chatgpt-of-helping-gunman-plan-fsu-mass-shooting
5•anigbrowl•27m ago•0 comments

Childhood Computing

https://lilysthings.org/blog/childhood-computing/
2•birdculture•31m ago•0 comments

Olive CSS: Lisp powered vanilla CSS utility-class a la Tailwind

https://codeberg.org/jjba23/olive-css
2•PaulHoule•32m ago•0 comments

Gamingshuvo

https://blog.cloudflare.com/post-quantum-warp/
1•Gamingshuvo•33m ago•0 comments

Family of Florida mass shooting victim sues OpenAI in US court

https://www.reuters.com/legal/government/family-florida-mass-shooting-victim-sues-openai-us-court...
2•tartoran•36m ago•0 comments

Tech Companies Fail to Kill Colorado's 'Right to Repair' Law

https://www.techdirt.com/2026/05/11/tech-companies-fail-to-kill-colorados-right-to-repair-law/
3•cdrnsf•37m ago•0 comments

All Roads Lead to AI Rome

https://medium.com/towards-artificial-intelligence/all-roads-lead-to-ai-rome-1c601f1ec440
1•vektormemory•37m ago•1 comments

Tesla recalls every Cybertruck RWD ever sold because the wheels could fall off

https://finance.yahoo.com/markets/stocks/articles/tesla-recalls-every-cybertruck-rwd-140500699.html
5•cdrnsf•38m ago•0 comments

Day After Grizzly Attack, Dimwitted Tourist Takes Video of Bear from 5 Feet Away

https://cowboystatedaily.com/2026/05/08/day-after-grizzly-attack-dimwitted-tourist-takes-video-of...
3•Bender•38m ago•1 comments

People Who Don't Like People Are Making All of Our Decisions

https://www.theatlantic.com/ideas/2026/05/waymo-self-driving-cars/687119/
3•bentaber•40m ago•1 comments

Griffin PowerMate driver for modern macOS

https://github.com/jameslockman/Griffin-PowerMate-Driver
2•classichasclass•40m ago•0 comments

Making your developer platform agent-ready

https://hookdeck.com/blog/developer-platform-agent-ready
1•mooreds•41m ago•0 comments

Official PCIe 8.0 draft aims for 1 TB/s data rate

https://www.theregister.com/storage/2026/05/07/official-pcie-80-draft-aims-for-1-tb/s-data-rate/5...
1•Bender•42m ago•0 comments

What's in the 2026 Hugo Awards Voter Packet?

https://compellingsciencefiction.com/posts/what-s-in-the-2026-hugo-awards-voter-packet.html
1•mojoe•43m ago•0 comments