How I Turned a Puppy Cam into a Home Assistant Project
Related Projects
My girlfriend and I recently got a puppy, which meant I had a very normal thought: we should probably get an indoor camera so we can check whether she is sleeping peacefully or redecorating the living room with mud prints 🐶
So I picked up a Tapo C230 from TP-Link. It does the job nicely, and for the original use case it was perfect. But after setting it up, I quickly realised it could double up as a simple security camera too.
That was the moment I ran into the usual modern-hardware experience: yes, you can store footage... if you pay us every month.
Now, to be fair, that is a completely valid business model. It is also the kind of sentence that makes me immediately look around the house for spare hardware and start making questionable engineering decisions 😅
In this case, the spare hardware was an old Raspberry Pi 3 already running Home Assistant. It is not exactly a powerhouse, and I do not have a huge smart home setup, so it felt like a good candidate for a small, focused solution instead of a heavyweight one.
The idea
Rather than paying for cloud storage tied to the camera vendor, I decided to combine three things I already had:
- a local RTSP stream from the camera (nice of them to include)
- a Raspberry Pi running Home Assistant
- enough AWS knowledge to be dangerous
The result was RTSP to S3, a custom Home Assistant add-on that captures the local camera stream, breaks it into MP4 segments, and uploads those segments to Amazon S3.
The full project lives in the Home Assistant Apps repository, where all the setup details, configuration options, and supporting files are documented properly.
Once the camera setup was working, the whole thing naturally expanded into my personal Home Assistant apps repository, complete with automated version bumping and publishing, because why not 🤷♂️.
If anyone miraculously wants to use it too, this is not a HACS thing - you can add the repository in Home Assistant via Settings -> Apps -> Install App -> the three-dot menu in the top right -> Repositories and install it from there.
The fun bits
This is the part I enjoyed the most. It is not just "record a file and throw it somewhere". I wanted the setup to feel reasonably robust and not like something I would regret leaving running for weeks.
So the add-on bakes in a few good practices:
- Temporary AWS credentials via AWS IoT certificates, rather than long-lived access keys living on the device
- S3 lifecycle policies so recordings expire automatically after 30 days and costs stay under control. Avoiding TP-Link fees only to pay AWS is somehow easier to justify 🤷♂️. I am pretty sure it will still be cheaper, but I need a full month of usage before I can say that confidently.
- Home Assistant automations so recording only starts when nobody is home
- Local storage limits so the Pi does not quietly fill its disk if uploads fall behind
- Automatic restarts if
ffmpegexits unexpectedly - CloudFormation-based AWS setup for the infrastructure bits, which saves a lot of clicking around the console
I also quite like the S3 object layout, which stores recordings by date and hour. It makes browsing recordings much less painful than dumping everything into one giant bucket prefix and hoping for the best.
Surprisingly fine on an old Pi
One of the nicest outcomes here is that it runs well on that old Raspberry Pi 3. I went into this expecting at least a little bit of drama, but for a simple single-camera setup it has been surprisingly happy.
That said, I only recommend this approach for simple setups like mine. If you want something more advanced, with richer camera tooling and a more complete surveillance experience, I would point you towards Frigate. It has features like motion detection and is a much better fit once you move beyond "one camera, one lightweight add-on, one mildly obsessive owner".
What is in the repo
The repository has a lot more detail than I have room for here, including:
- the add-on structure for Home Assistant
- configuration options for RTSP, S3, IoT, buffering, and restart behaviour
- AWS setup steps
- an example Home Assistant automation for presence-based recording
- notes on supported cameras and current limitations
There is also already a planned next step in the repo: multi-camera support. Right now the add-on is aimed at one camera per instance, which is fine for my setup, but expanding that cleanly would make it much more flexible.
I would also like to improve the overall setup experience over time, polish the configuration flow a bit more, and keep reducing the number of manual steps needed to get from "camera on the shelf" to "recordings in S3".
Final thoughts
I am very happy with how this turned out. It solves the exact problem I had, it leans on tools I already understand, and it is still running happily on hardware that most people would probably describe as "retired 👴".
Could I have just bought a microSD card, stuck it in the camera, and called it a day?
Absolutely.
But where is the fun in that 😄