DEV Community

Michael Salaverry
Michael Salaverry

Posted on

Why you should get a raspberry pi

I setup a home weather station using Tasmota on an ESP8266 with a BME680 sensor. To record the data, it needs an MQTT hub for uploading it's weather readings.

My raspberry pi runs mosquitto as an MQTT broker. In, you guessed it, the eclipse/mosquitto docker image. This let me tune all the settings and configuration on my laptop, and rest assured it would work on my raspberry pi.

The raspberry pi also runs telegraf as a way to import many relevant home data sources and output them to a data store. For example, a home internet outage detector via a ping every 10 seconds. And an MQTT client for the mosquitto broker. The output is an InfluxDB time series database running on the same raspberry pi. The influxdb is complemented by the chronograf ui, which lets me visualize all the data sources flowing in to the raspberry pi.

I also run a few scheduled jobs on my raspberry pi. For example, the docker image from shellyalmo/weather for creating a local database of official weather station data to compare to my home station.

I also use my raspberry pi as a locked down jump host and simple ssh based vpn. I disabled password login in favor of certificate login, and only opened one port for ssh. This lets me port forward chronograf or the MQTT broker after I login. Certificate based login also lets me grant a few trusted computers I already use for github as passwordless entry to the raspberry pi. I use dynamic dns to give my home connection a memorable hostname.

I actually recycled an old laptop as a home server with Ubuntu server, microk8s, etc, and while it is significantly more powerful, the noisy fan, space, and electrical costs discourage me from running it 24/7.

I’m not currently using my raspberry pi for this, but I previously had Kodi on it and a usb TV tuner for watching local broadcast tv and radio over my home network to anywhere I was. Also came in handy for a few software defined radio experiments I tried out. One day I want to try more RTL-SDR experiments

The raspberry pi excels for projects you want to run locally, or cheaply, which don't require a powerful server or fast connection. I bought the raspberry pi 1b+ in 2012 for something like $35 usd and have used it for the last 7 years. At ~$5 a year, it beats any low end box hosting by a huge margin. I highly recommend it as a home server for projects and services.

Top comments (1)

brandonwallace profile image

The single board computers are surely worth the money for home server projects. I purchased a used single board computer at a discounted price. I have been running it as a server for over 6 years! The operating system is up-to-date and it is showing no signs of slowing down. It allowed me to get rid of my super noisy, dual processor motherboard server. Imagine how much electricity that thing was sucking down each day. Ughhhh!