Ask HN: What do you do with your Raspberry Pi?

1741 points by xylo ↗ HN
I have Raspberry Pi and I mainly use it for VPN and piHole. I’m curious if you have one, have you found it useful? What do you do with your Raspberry Pi?

1,092 comments

[ 3.2 ms ] story [ 383 ms ] thread
I'm working on turning it into a IR emitter to control some stuff that I have that lack remotes. I have another I've loaded snips onto an will be experimenting with soon - I'm currently using a PlayStation eye for the experimentation, but will have to get a better microphone/speaker. I wish I could hack a dot/echo/etc. and use their microphone/speaker, but meh, I'll take what I can get.

Also, the IR pi will probably drive some ambient light as well.

> I'm working on turning it into a IR emitter to control some stuff that I have that lack remotes

That's really neat. Please share some details – I was planning on buying a Broadlink IR/RF device for that purpose.

Unpowered in a drawer.
Yep. As much as I’d like to play around with it, I have no projects in mind that aren’t pure-software and easier on my laptop, or just end up filled with pre-made solutions to save on support time. Shame, but there you go.
If yours has wi-fi (Pi 3 and above or Pi Zero W) you can always just leave it plugged in somewhere innocuous as a pi-hole. It's super useful and takes almost no time to set up, provided you can change the settings on your router to use it as DNS.
I'm scared that if the pi is down then the whole internet is down (i'm not always home with my family, so if I'm away I couldn't fix it). How do you manage failover ?
How do your manage your router failing? Do you have a second one in hot standby? Sure, the pi would add a second point of failure but personally I never had a router or rpi fail, so I think the advantage of running a pi hole outweighs that increased risk.
FWIW, I ran Pi-Hole on a RPi for about six months, and it was flawless (long enough for me to forget the root password :p).

One option would be to set up two Pis, and distribute both IPs in DHCP. If one is down, or can't resolve, clients will fall back to the other one. The chance of both being down at once (unless it's something that takes your network down) seems low, and the cost of a Pi Zero W (~$10) wouldn't add much.

If necessary I can SSH in (if the pi is on) and troubleshoot. No one runs a business out of my home so Internet isn't super critical, and the smartphones have data connectivity if need be. I have a couple fresh SD cards in storage and take quarterly SD card images, so if it fails I don't have to rush out and buy anything. If the pi itself blows up, I can talk my wife through changing the DNS server on the router config page from her laptop, or she can just wait until I get home. Not a huge hassle.

Even so, normally you can set a fallback DNS server on your router, and you could have two little Pi Zeros on a plugstrip in a closet somewhere! (Or just set the fallback at opendns or something)

Media player connected to tv. (Kodi or Elec, I can't recall which)

What I found really neat about this is that if you use the HDMI connection, there is some automated setup/control that allows my tv remote to control the PI. (through the HDMI connection)

But also, the smart phone app for Kodi remote control added a new layer of interaction with the media player that is just sort of unique and unexpected. (everything worked so easily)

Does work-in-progress count? I have two with cameras I am attempting to rig up as a frontend/backup camera in my Humvee (very necessary!), hopefully w/ UI on iPhone
I use it to build a cloud backup system. My files in the computer will automatically sync to Raspberry Pi.
What software do you use for your setup?
DNS and DHCP server running on NetBSD.
I have several, I use them for multiroom audio with snapcast (mostly with USB DACs although one has a DAC hat. Some have temp and humidity sensors, one has the rpi cam. One has a always on vpn connection and transmission running. For a while I used one with a Parsec client and cloud gaming. However, I use a Odroid XU4 for all the big stuff (home assistant, NAS, nodered, mopidy, etc.)
I spent a while figuring out the cheapest possible way of doing front end dev for a series of blog posts (that I never wrote) . The result was using a Pi3B+ and a lot of open source tools, Github and Netlify. It works so well I'm still using it for a ton of dev.
I got a bunch of them running Screenly (https://www.screenly.io), so I'd say that's a good use :)

Also, I'm using PiHole and Home Assistant.

Disclaimer: I'm the author of Screenly.

Pi-Hole, RetroPie, and for my 1st-grade son I installed Kano OS for his first computer. I see a couple of Pi 4s as upgrades in my future.

Also looking to get my SDR rig up and running on one of the other Pis i have waiting to be used.

Anything you've learned to share about having it as a computer for your first grader? I recently set one up for my daughter, same age, but haven't put much thought into the software side yet. She's played Minecraft-pi a couple of times, we made the cat meow in Scratch, and we used it to watch a movie the other day, but that's it so far.
Since I only installed the Kano OS image on a bog standard Pi 3, it's basically this without all the accessories. https://kano.me/store/us/products/computer-kit

It's great that Kano makes it available standalone. Kano OS has all the activities built into the image, including visual coding of Minecraft and other tools, and guided lessons around using the Terminal. Chromium and LibreOffice are also installed by default. There's also a curated app "store" like experience to add new games.

Installing CUPS to add our printer to the Kano OS Pi was pretty straightforward, so he also uses it for personal writing and printing out stories.

It's really engaging for our son, and provides ample time for parent-child learning opportunities to boot. We ended up getting the Pixel Kit while we were at it, and Kano OS picked up on it immediately and exposed all the lessons for it.

Hoping their move to Windows 10 doesn't leave their Kano OS image locked to a Pi 3, though. I'd love to upgrade his Pi to a 4 soon.

Kano OS Image: https://hello.kano.me/downloads/

Media center & TV PC. I have a 4 TB external hard drive connected to it (and swap on it). Using a custom compiled kernel with zswap support, browsing the web isn't that bad with the 1GB of RAM on the 3B.

I've also hooked up an RTL-SDR to it and ran rtl-tcp instead of needing to run a long USB cord.

I used it to monitor ADSL device status[0], also created a DIY timecapsule for MacOS[1] — these were all in the past, though.

Currently the Pi is on my roof, connected to an SDR. I sometimes run rtl_server on it, and listen around. Although it's been a hassle, since I have to run upstairs and disconnect it everytime there's a storm. Also, listening to the device over WiFi means I get really laggy control over my SDR. I'm planning on replacing the Pi with something better powered.

[0]: https://github.com/amingilani/scruffy

[1]: https://github.com/amingilani/chronopill

You could probably automate cutting the power with a relay switch also connected to the pi. Just scrape weather data, and if you expect the storm, trigger the switch.
I'm actually more concerned about lightning strikes hitting the antenna, frying the Pi, traveling down the Ethernet cable and frying my router. I'm still a ham in training but I've been told that it's best practice to disconnect the antenna and isolate it from your setup. Some hams as far as placing their connectors in glass jars.

I don't want to use a relay on the antenna cable because 1) it'll pick up RF interference, and 2) if a direct strike hits it, there'll be enough energy to jump the gap in the relay anyways.

I might figure out a more permanent solid-state solution in the future though. Like I said, still learning :)

Ground the antenna.
That is easier said than done, unfortunately. I live in a developing country. My house does home have a home grinding rod.
I've made some interesting projects over the years - only a writeup on a few of these, and some are in pieces and in various states of disrepair after moving so much.

Some write ups on larger projects:

1. I used a raspberry pi to coordinate the firing of multiple cameras, and then had the pi upload to a cloud service that would stitch them together to an "infinite zoom" super selfie. https://medium.com/@thekeithchester/gigasnap- a-prototyping-story-efed72099d32

2. I created a library that made it dead simple for a raspberry pi to communicate to arduinos, and used that to control a lot of hardware projects, like little robots. https://medium.com/@thekeithchester/serial-synapse-94a114aa2...

3. Raspberry Pi's controlled the heartbeat detection (controlled lights and music of your booth) and conductive paint controller (I built it and still don't understand the meaning) for this art piece. https://vimeo.com/207047769

4. I had a video / text message doorbell a couple of apartments ago. https://github.com/hlfshell/doorbell

5. Used one as an MQTT hub for numerous IoT projects. I created https://github.com/hlfshell/mqtt-scheduler to schedule MQTT jobs for things like the arduino powered garden controller (lights + water pumps) I built for my wife. https://github.com/hlfshell/garden-relay

6. This never got off the ground, but when Pokemon Go had first launched and was super popular, I wrote a slackbot that would alert everyone in the office when pokemon (outside of the super common Rattatas and Pidgeots) was nearby. I was repurposing that code to make a portable Pokemon radar that would jump a false account around the area around you, thus hunting down pokemon for you. https://github.com/hlfshell/pokemon-tracker It never got far as the game got super stale quick.

Disney now have exactly what you described in your first project as a photo opportunity at the Magic Kingdom.

https://disneyparks.disney.go.com/blog/2019/05/enjoy-new-dis...

Nice! Thanks for the link. Our goal was to hit a cool shot a mile away on a target in the middle of a giant concert for a "I was there!" memento shot. Good to see it in practice somewhere.

Unfortunately the sales team didn't understand it, and what sales team doesn't understand sales team doesn't sell.

...I'm very happily in another company that gets tech - but man I wish we could have sold that project. The effect was really cool when we had it working fine.

The infinite zoom project is really interesting. I'm shocked that it never got picked up! The use cases you describe sound incredibly obvious for big events.
Running piAware for flight tracking

https://flightaware.com/adsb/piaware/

Is there a benefit to personally tracking flights instead of querying 3rd parties?
Most of the services (FlightAware, Flight Radar 24, ADSB Exchange) get much of their data from volunteer-operated receivers. If you feed your own data to these networks, you get several benefits including multilateration capability (computed location for planes that don't send their own GPS location data) and free business accounts on FlightAware and Flight Radar 24.
Perhaps they are in a remote location that doesn’t have data?
FlightAware in particular gives you access to a greater level of data and services on their site if you're an active contributor via a PiAware. Also, honestly, it's just fun fooling around with the antenna and software setup to maximize the number of flights I can see :)
https://pi-hole.net. Just installed, very happy so far.
How do you deal with it breaking things like Amazon-based UI(Fire, Mobile shopping etc...)?
I'm not OC, but my solution there would be to seek non-Amazon based UI :)
Of a number of different solutions, Amazon has consistently delivered the best UX for streaming, shopping, and wireless music playback. Why would I switch?
I'm sorry, what?

Have you tried searching for a show with multiple seasons on Prime video? It's a fucking joke.

>I'm sorry, what?

"Of a number of different solutions, Amazon has consistently delivered the best UX for streaming, shopping, and wireless music playback. Why would I switch?"

I view shows on Prime with multiple seasons all the time.

So far I have not found anything broken yet. I think I would go for a whitelist in that case.
I tried that in the past. Unfortunately shopping and multiple FireTV apps would break due to non-trivial data being sent from multiple domains.
Homeassistant (Hass with mqtt and grafana), Octoprint, MotionEyeOS, pihole, pivpn, Donkey car, Robot operating system (ROS), and a wireless controller for my crazyflie quadcopter
I'm totally naive with Raspberry Pi..can someone comment on the following project: Is it possible to put a glass eye behind a portrait of a one-eyed pirate and make its eye move around/follow whoever enters the room? A friend has a glass eye but nothing to do with it.
Lemme think. A camera that observes the room from the portrait, anyone that walks in is a dot on a plane, and it points the eye at the point on the plane. Should be doable. Yes, the Pi should handle that fairly easily.

The part that you'll have to figure out is making the eye ball rotate. There are GPIO pins on the Pi, so you can get the commands out, but you'll need to build the eyeball component yourself.

Probably not. Servocity has x-y gimbal controllers. If you can find one small enough, it could control the eye.
If I hadn’t started this startup and had time, I would want to start making this right now
As a one-eyed individual, I love this idea. I have my old one sitting in a drawer doing nothing and I will be replacing my current this year. Two glass eyes.
Right now: I use it as a Flashrom rig, for flashing BIOS chips.

The new Raspberry Pi looks powerful enough to use as a media center PC, I ordered one and want to see if it can do that well enough (read as: I’m curious to see emulation performance.)

I've been happy for a year or two (not even sure, now that I think about it...) with two Pi3s running openElec. Both run over wired ethernet to SMB media server. I'm generally stingy with my storage, so I usually opt for the 1080p file sizes. I don't know how well or if it can handle 4K.
Pi-hole, and my home backup target using an external HDD and Samba.
I have a small Internet kiosk for one-off browsing and guests.

Currently, mine is running on an ODROID-C2 but the Pi 4 should have more than enough performance for one.

My setup is a stripped down install with a minimal window manager. There's only one icon for launching Firefox which is configured in an amnesic mode. The DNS is set to my Pi-hole.

We use it as a front end to our Church's AV system. It runs a GUI written in Python with PySide that controls our cameras, hyperdeck recorder and vision mixer.

It also controls the power switches for the system, and the blinds.

1) PiHole

2) Wired one into a rotary phone to make a weird steampunky smarthouse controller (Dial '0' to turn off all downstairs lights and music, etc)

3) Various LED controls for fun, and Christmas

4) Always experimenting with MycroftAI to stay away from Alexa

2 sounds amazing
Thanks!

A first version of the code is on github: https://github.com/estiens/confessional_booth

It was originally part of a confessional booth taken to Burning Man in 2015. Since then it has evolved and become part of my smart home stuff.

I was intimidated when I started as it was my first "hardware" project, but the rotary phone part was pretty easy! Just a little switch that turns on and off the number of times of the number dialed basically.

It actually has a (new) microphone wired into the mouthpiece and it uses the receiver original speaker ired to the pi sound output.

(At the time I knew nothing about Linux so I think getting pulseaudio working correctly took as long as everything else!)

Those aren't working currently, but eventually I plan to integrate both the rotary dials and voice recognition and "scenes"

So like, dial "721" for light control. Voice: "And what are we doing with the lights today..." Me: "Make the outside light purple" and it is done.

I have custom voice recongition for things like that working with Mycroft, so it will just be a matter of joining the two projects!

As a bonus, since it was originally designed to work in the desert without a screen, it can do things via a weird analog interface. For example, if I press the hangup button 10 times in a row and then dial a number, I can get a report of how much memory is left on the device, etc.
I forgot about Mycroft! Thanks for the reminder!