⌨️ Pi Projects 🥧

Sunday, April 3, 2022 :: Tagged under: blurb culture pablolife. ⏰ 9 minutes.

🎵 The song for this post is Abracadabara, by Brown Eyed Girls. 🎵

Pablo's TV. Pictured are cute plants, a string art thing of Guatemala, plays, Guatemalan textiles.

Little do you know, there are 3 computers hidden in this photo.

The last time I've had an apartment of my own was 2016. A lot has changed!

I mentioned "Project Bobby," my concerted efforts to improve my apartment, in my last post, and I may write about the non-digital parts of my apartment freshening. This time, I'll focus on my Raspberry Pi projects. Maybe they'll inspire you? I'll do them in order of "obviously a good idea, low barrier to entry" to "why, why, why do I do this to myself." Feel free to reach out (or leave a comment) if you want to swap stories or if I can be a resource.

Sidebar: Some prereqs

Open drawer showing a surge protector, 2 Raspberry Pis, a Philips Hue Bridge, and lots of cables. Open drawer showing a surge protector, another Pi, Switch controllers getting charged..

Here they are! In the drawers, each with a surge protector. We're drawing some power here.

It can be nice to have some optional equipment/software if you're working with Pis. It's disheartening to get wound up and ready to work on a project only to realize you're missing something, have to order it, and wait days or weeks.

For nearly all of the projects, you'll want:

Some of these get included in kits like the Canakit sets. I find them pretty handy. Lastly: not all Pis are the same, I'll mention which model I'm using for which project.

Project 1: Pi-hole

Pi-hole user dashboard.

Project page.

What is it: Adblock! For every device on your Wi-Fi! This post makes a compelling case for it, but the internet is a lot faster and generally more pleasant here since we're omitting a massive, useless percentage of it.

How easy is it? Not bad! The thing was built for Pis, so the install process is pretty simple. Learning your router software and having it assign static IP to specific devices is a bit scary the first time you do it, but there are many resources.

What's your setup? I'm using a Raspberry Pi Zero for this; it really doesn't require a whole lot of compute, and I had a few extras lying around. That said, since this intercepts all traffic your house makes, I got an adapter like this so I can use a wired Ethernet connection to it (the Zero doesn't have a port for that on its own). Bonus! USB ports for the keyboard and mouse if I need to debug it!

Also, watch out if your day job involves traffic or analytics — at the beginning of the pandemic, Karen was doing work on her company's marketing site and spent a few frustrated hours wondering why Segment events weren't firing, only to remember our Internet simply didn't allow it.

Project 2: Video games (RetroPie + Moonlight)

Pablo's TV with the title screen of Shaq-Fu.

Yes, you too can replay Shaq-Fu. This was pretty early in the apartment building; peep the Energy Saver sticker on the TV 😛

What is it: Video games, on the TV! A PS5 is impossible to obtain, and I already have a million Steam games I'm behind on. Additionally, I got a TV and I'd love to see games on it. This lets me play hundreds of classic games that I'll truthfully never, ever play, but also play Steam games from my couch.

This is a combination of two products: RetroPie, a collection of emulators that are Known Good Friends of Raspberry Pis, and Moonlight, which streams PC games to new devices like the TV.

How easy is it? Also not bad, but much more involved than the Pi-hole, especially if you include the work around getting a good TV and controller setup, and acquiring ROMs to emulate.

What's your setup? A Raspberry Pi 4, with two major setup phases:

First is RetroPie + EmulationStation, which ship together, and even have a pre-made image you can flash. They support USB controllers, and I already had a PS4 controller. Flash the image, transfer some ROMs, and boom! You're playing the classics. Loading up Mega Man 4 is a great way to remember these games weren't actually that much fun, you just didn't have a choice. But the music still slaps!

It's a bit of extra investment, but you can get wireless USB adaptors for you PS4 controllers, and a docking station to keep them charged.

If you only plan on playing classic games, you might be able to run this on a Zero, but I wanted to emulate old PS1 games I never played (Vagrant Story comes to mind) and so I'd rec the best Pi you can get. Additionally, if you want a bunch of Dreamcast or PS1 games, you'll want a bigger-than-normal SD card since those ROMs are pretty beefy.

As for Steam… while the Steam link was discontinued, they released the software allowing you to turn any Linux device (including a Pi) into a Steam Link via this Debian package. You can bundle it into RetroPie, but… this didn't work for me. I was getting 20ms latency per frame, meaning most of my favorite games (high-skill twitchy ones, like Celeste or Cuphead) were unplayable. So the actual solution was to use a different technology: Moonlight, also available as an experimental package from RetroPie.

Moonlight was a fair bit more finicky than Steam link (you have to do more on your host computer, such as adding games from my Steam library manually), but the latency improvements made it absolutely worth it.

Do I need extra equipment? Probably not, after what I mentioned. That said, you can get lux and sink resources into other stuff, depending on how shmancy you wanna get:

Overall, this took a fair bit of work. But playing Hollow Knight and The Messenger on a beautiful TV and a wireless controller from my living room was a dream come true, after years of hunching at my desk playing on worse monitors.

Project 3: Home Assistant & Internet of Shit

Home Assistant dashboard.

What is it: Smart homes, the ultimate dream! Wouldn't you like to have lights that adapt to how much sunlight you're getting? Would you like presets for when you watch a movie, vs. when you want mood lighting for entertaining, vs. when you're trying to get work done and want everything as bright as possible? Other weird shit?

The dream is beautiful, but the reality of "smart home" is an absolute hellscape. Troy Hunt wrote a great 5-part piece that details fome of the horrors. At a high-level:

Additionally, none of the tech monopolies offers a featureful, compelling, customizable story here. Alexa has some things going for it, as does Google Home, as does Facebook's weird monitor thing, as does Apple…

The offerings all looked incomplete, and I didn't want to feed the tech monopolies data from my home, so I went with HomeAssistant, per Troy's blog series. The idea is that one can wire + program anything they want via open source way rather than get a substandard experience, more expensively, with vendor lock-in.

How easy is it? Really pretty challenging if you don't already have some Linux/Unix experience, and/or have experience hunting down outdated answers in message boards. This one is for the patient.

What's your setup? It looks like:

After a lot of finicking, I've got a few cool automations:

House light automation. With color-changing smart bulbs, my house is on a schedule:

I also have a setting to dim them when I'm using the TV. If I lived with other people, this would all be a little harder, frankly: pressing the light switches in the apartment will flatly cut out the power to the bulbs, so it's usually not what you want. There are smart light switches I could install, but again, it's just me, so I can open the app and make it do what I want.

This happens a little before sundown.

This happens at 8:15. It's normally better-looking, there's still sunlight happening in this video.

Growlight for Treevor. "Treevor Belmont" is a little citrus tree I got. Also new with this apartment: I'm into plants now! Treevor needs better, more direct sunlight than any convenient spot in my apartment provides, so I got him some growlights that are attached to smart plugs. They turn off and on with the Sun.

Note that while this is cool, you could also save yourself a lot of hassle and do this with normal hardware timers, and skip the Pi.

Sapo sleeping in a blanket in a pot. Behind him, a little citrus tree and two growlights. Click for full size.

While this was ostensibly just a photo of Sapo being adorable, it's also a good showcase of Treevor and his growlights.

Hollow Knight Bathroom. This one is just silly. Here's a video of using the bathroom downstairs:

You can't hear it, but when you open the door, a fountain is heard and the Hollow Knight save music plays.

So, let's talk about the what, then the how.

What, well, in a series of funny thread-pulling I ended up getting a Displate of the main character of Hollow Knight sitting on a bench. In the game, these are save points, and there's often the sound or running water and this very tranquil music. I thought it'd be fun to make the bathroom a save point in the same way. I used to do a lot of installation art and while this is not quite that, it's also not not that.

So what happens, when you go into this bathroom:

Thanks for the read! Disagreed? Violent agreement!? Feel free to join my mailing list, drop me a line at , or leave a comment below! I'd love to hear from you 😄