Post

My Pi obsession

June 28, 2024 - the day I purchased my first Raspberry Pi.

The Raspberry Pi 5 was released in October 2023, which is the latest generation of the popular SBC that first came out in 2012. It has a 3-4x performance boost over the previous generation of Pi, which has a 3-4 performance boost of the previous generation, which has… I’ve been interested in this thing since the beginning but until now I was never convinced that this size of device was capable of anything useful. But the new model was available in up to 8 GB of RAM. Now that sounds useful.

I have almost always had two regular PCs running in my home - the new generation and a repurposed last generation, usually running a simple file and media server. In hindsight, the early Pis probably could’ve done that too but you never could have convinced me that I didn’t just need a second Windows computer. I was in love with building PCs, ordering new components, checking compatibility, and that moment of truth when you have it built and press the power button the very first time hoping it comes on and not burst into flames. Nothing could be better than that.

And so it went, every 3-4ish years I built a new round of hardware, and sometimes conceiving new ideas for things to self host. At the start of 2024 I built the latest iteration, a gaming PC. I’m not really a gamer but my kids play Minecraft and random other games, and I had an increasing interest in playing Microsoft Flight Simulator so that was my justification. Sometime after that the idea started forming that I wanted to incorporate some sort of AI to manage my thousands of pictures and videos. But I didn’t want to set anything up on my new, pristine gaming PC that can only be used for one purpose EVER. And I was already using the last generation of hardware for other things so I didn’t want to put this added compute demand on top. This is how I accumulate hardware so fast smdh.

Enter: the Raspberry Pi Hailo 8L AI kit. In the beginning of June Raspberry Pi released the AI kit, which adds a Hailo 8L AI accelerator for the Raspberry Pi 5. I watched some videos and became convinced that this was the solution to the AI picture mgmt solution that I had been thinking about. Spoiler, it wasn’t - at no point did I encounter anything that said, ‘you can use this chip for analyzing photographs.’ The Hailo 8L does pose estimation, image segmentation, and object classification on streaming video. But the idea wouldn’t die. So there it was, the events were set into motion. I bought the Pi 5 with 8 GB of RAM and the AI HAT.

The AI HAT was new and on back-order everywhere so I couldn’t get started on my conceived project right away. No matter, by then I was already obsessed with this tiny computer basically binging Jeff Geerling’s entire video collection, and others. Surely I could find other things to play with in the meantime. That’s basically how I decided that I needed more of these things. If I purpose-build them, then I would need a dedicated server per use case. And I was deeeeeefinitely going to build them each with a single purpose. As you can see, I’m really good at justifying purchases.

The AI kit didn’t arrive until the end of August so by then, I had already dreamt up a million use cases. That said, this is the state of my current homelab. I’ll start with the generally more stable stuff:

Web server

Yes, this site runs on a Raspberry Pi 5 8 GB. And some other sites including fuckeverybodyfuckeverything.com. They run in Apache Docker containers that I registered with Github Packages, and served securely through a Cloudflare tunnel.

Video game emulator

It was absolutely an upgrade to start running my emulators from a dedicated Raspberry Pi and not my laptop plugged into my TV. A Raspberry Pi 5 8 GB runs Batocera and all my ethically-sourced retro game ROMs.

NAS

Another Raspberry Pi 5 8 GB has a four-slot NVMe PCI HAT with a 2 TB in each slot. It runs Open Media Vault which serves a ~5.3 TB ZFS share that is one of my solutions in the 1-2-3 data backup best practice: keeping 3 copies of your data, on at least 2 different media (disk type), and 1 copy off-premise. OMV can use Docker to run containers so this server also runs:

  • Plex (which is convenient because all my media is already on the server)
  • two Twingate connectors (a remote VPN solution)
  • Pi-hole (an internet ad blocker)
  • an internet speedtest tracker that monitors my internet connection speed around the clock, tracks the data over time, and presents a simple dashboard

A server server

Raspberry Pi 5 4 GB intended to run ‘critical’ services. Mostly, I needed a secondary Pi-hole instance because I was still spending a lot of time testing OMV and I frequently broke my only DNS. Actually that wasn’t as bad as allowing the ads back in. I really fucking hate ads. I also run a secondary set of Twingate connectors for redundancy. I’m working on a project that requires a relatively highly available database so I also run MariaDB. Everything runs in containers here too.

NVR

Eventually my AI kit arrived so I picked up a couple Raspberry Pi camera modules and my first Pi Zeros and deployed a mini home security solution. A Raspberry Pi 5 8 GB with the AI kit runs Frigate, which is configured to receive streams from two Pi Zero 2 Ws running MotionEye with a Pi Camera Module 3 attached. I’m also testing a third but I think I’m starting to reach some hardware limits on the Pi 5.

Dev box

Raspberry Pi 5 8 GB that I just run as a second non-Windows desktop. I use the Raspberry Pi OS desktop, and use it to test crazy new ideas. When you’re doing development for Linux systems, it helps to have a Linux system on which to do it. I also picked up the Raspberry Pi monitor for this, my previous display was 21” but only 1366 x 768 resolution - puke. I’m much happier with this one.

The dawn of Pi Zeros

Once I got my hands on the Pi Zero, I had a sub-obsession. A subsession. At this point I might be done with any new full-size Raspberry Pi projects (might is doing a lot of work here) but I have a slew of new projects with the Zero:

Friend lamp

I was searching for new project ideas and came across a project where you build your own friend lamp, also known as a distance lamp. I’ve never heard of the idea, it sounded cool so I checked it out. You can purchase these lamps for $90+ and they require signing up for a service which involves handing over some personal data. That’s not my bag, baby. A Pi Zero 2 W is only $15, materials can’t cost that much, and you can build it all with open source tools that exist today. Challenge accepted, I set out to make one. Well, two. This was my foray into GPIO tinkering, I have the Pi Zero connected to a breadboard with all the wiring, LEDs, buttons, resistors, and have some dev code for running different functions required for the lamp functionality. This is the reason for the MariaDB on the server server. I enlisted the help of a friend in another state and sent them a Pi Zero to help me test.

Picture frame

A Pi Zero 2 W with a Hyperpixel 4.0 4” 800x480 display that loops a collection of pictures from a local SMB share

Long range radio

Meshtastic is a LoRa messaging solution that you can use with the Pi Zero 2 W, and can give up to 15 km range with clear line of sight between devices. I plan on doing some testing this summer in my outdoor adventures.

Clustering

I picked up four Pi Zero 2 Ws to start testing clustered compute technology like Kubernetes, and device management solutions like Ansible. Unfortunately that was before I read that typically Kubernetes cluster nodes run with 4 GB of RAM - the Pi Zero 2 only has 1/2 GB so that won’t work. For the first time, I checked out other makers of the same Zero 2 form factor and purchased four Orange Pi Zero 2 W at 2 GB. Fuck it.

…and beyond

After those Orange Pis, I started messing with different OSs for the first time. I tried to find one compatible with both Raspberry and Orange Pi, that also had a headless installation method so I only needed to know one setup method. DietPi worked for this. The more I messed with these Orange Pis, the more limited the Raspberry Pis felt so I picked up 2 more 4 GB versions. I’ll cluster these all someday, I do some development on them (I’m writing this remoted into one of the 2 GB Orange Pis), and probably come up with other things.

Oh by the way, I never did get around to building the AI picture management system that started this obsession in the first place.

This post is licensed under CC BY 4.0 by the author.