Jan-Lukas Else

Thoughts of an IT expert

New purposes for my Raspberry Pi 4

Published on in ✍️ Posts
Updated on
Short link: https://b.jlel.se/s/4e1
⚠️ This entry is already over one year old. It may no longer be up to date. Opinions may have changed.

Last year I was wondering what I could do with my Raspberry Pi 4 (with 4 GB of RAM) that I got for Christmas the year before. I think I have now found a use for it.

Last week I found two notes on my front door saying that on two days (tomorrow and the day after tomorrow) the power will be cut off for 2 hours each. This is a bit of a bummer, after all, it means I’m forced to work from the office during that time (but fortunately I can).

So far, I’ve been running Tailscale on my Synology NAS to be able to access my home network from outside. First, I’ve set up the installation as an exit node, and second, I’ve also set it up as a subnet router (a really helpful Tailscale feature!). However, since it’s probably not so good for the hard drive if the power just goes out, I’m going to turn off the NAS during that time. But by doing that, I also lose the ability to check if the power is back on by accessing the network from outside.

I was thinking that a Raspberry Pi would probably handle a power outage better. That’s why I dug my Pi 4 out of the drawer, copied Ubuntu Server 20.04 to an SD card, and set up the Pi with Tailscale. It was pretty quick and easy.

One problem, though, was that the Pi gets pretty warm even when idle, around 50 degrees Celsius. The case with the fan makes a lot of noise. That’s why I bought a better case with a quieter fan and screwed the Pi in there. And how well it works, well below 40 degrees!

The Pi in the new case

But since it would be a bit of a waste of resources to have a Raspberry Pi in continuous operation for Tailscale alone, I have now also installed Pi-Hole to block DNS requests to advertising domains on all devices in addition to uBlock Origin in the browser. Pi-Hole is now the default DNS server on the network, but also additionally set up as a DNS server in Tailscale.

Another application idea I have, but need to do some research on, is a weather station. My idea is that I can connect thermometers and humidity sensors via USB and then program myself a simple web interface to read the values. My dad made something like this a few years ago and the thermometer has been up and running ever since, but the web interface isn’t readable well on mobile devices and I don’t have much of an overview of the code he used back then. So if anyone has any tips, feel free to share!

Tags: , ,

Jan-Lukas Else
Interactions & Comments