project hobby
Pi Baby Monitor
A Raspberry Pi that watches a baby, not the internet
A baby monitor built from a Raspberry Pi, a camera module, and a temperature/humidity sensor, designed around one non-negotiable rule: nothing leaves the house. Video streams only over the local network, sensor readings live on the device, and there is no cloud account, no companion app, and no third-party server anywhere in the loop. If the internet goes down, the monitor doesn’t notice.
The rule
Commercial baby monitors are internet-connected cameras pointed at the most sensitive room in your home, backed by whoever’s cloud and whatever their security budget allows. Every one of them asks you to make the same trade: point a camera at your child, then route the feed through someone else’s infrastructure and trust their retention policy, their breach response, and their acquisition roadmap.
I read enough vendor privacy policies to know I didn’t want to be in any of them. So the design constraint came first, and everything else followed from it: the feed must be physically incapable of leaving the LAN.
Architecture
The parts list is short:
- Raspberry Pi 4: any model with the camera connector works
- Pi Camera Module (NoIR variant, so it sees in a dark nursery with a cheap IR illuminator)
- DHT22 sensor: temperature and humidity for the “is the room too warm” question every parent asks at 3am
- A case, a long USB-C cable, and gaffer tape: the underrated hardware
The software is one Python service and deliberate boredom. The entire configuration fits in a dozen lines (illustrative, trimmed from the real thing):
# monitor.conf
[stream]
bind = 192.168.1.40 # LAN interface only, never 0.0.0.0
port = 8080
format = mjpeg # every browser in the house can play it
framerate = 15
[sensor]
kind = dht22
gpio = 4
poll_seconds = 30
And the serving side is a plain HTTP loop, no framework:
# camera thread -> ring buffer -> MJPEG over HTTP
server = HTTPServer((cfg.bind, cfg.port), StreamHandler) # LAN bind only
server.serve_forever()
How the pieces behave:
- The camera feeds a local MJPEG stream over HTTP. MJPEG is ancient and inefficient, and every phone, tablet, and laptop browser in the house can play it with zero apps installed. Open a bookmark, see the crib. Latency is well under a second on Wi-Fi.
- The DHT22 readings render into the same page: a number in the corner of the stream, not a time-series platform. (There is no dashboard. It’s a thermometer.)
- The service binds to the LAN interface only, and the router never forwards a port to it. Watching requires standing inside the house’s Wi-Fi, which, for a baby monitor, is precisely the feature.
No cloud relay, no accounts, no firmware surprises at 2am, no subscription to the video feed of your own child.
What it taught me
The build stays off GitHub for the same reason it stays off the cloud, but the parts list above is the whole secret, and the idea is free. The lasting lesson is a design one: the strongest privacy guarantee isn’t a policy or an encryption badge, it’s architecture that makes the bad outcome impossible. A camera with no route to the internet cannot leak to the internet. Constraints you can verify with ip route beat promises every time.