Raspberry Pi

  • Guest, it's time once again for the hotly contested and exciting FoH Asshat Tournament!



    Go here and fill out your bracket!
    Who's been the biggest Asshat in the last year? Once again, only you can decide!

slippery

<Bronze Donator>
7,886
7,701
Anyone have experience using a Raspberry Pi as a Plex server? How'd it work out?

Thinking about doing this for my family
 

slippery

<Bronze Donator>
7,886
7,701
I wouldn't unless it will never do any transcoding. I would wait on the Pi 4.
For stuff I run on Plex I try to always get h264 to avoid transcoding, because fuck that noise. I'll probably wait for the 4 anyways
 
  • 1Like
Reactions: 1 user

Noodleface

A Mod Real Quick
37,961
14,508
My senior project had two raspberry pis communicating wirelessly between a police officers belt and a dog (using zigbee or something) issuing commands/voice to the dog and receiving video back.

And that was back when we used a RPi 1
 

Kais

<Gold Donor>
841
1,525
I've looked into stuffing a pi behind the dash to give my older double DIN stereo Android Auto. Cool project but my stereo ended up being like a generation too old to do it.
i was REALLY hoping that the pi4 would have native PoE support. Sad. So many good IoT applications wasted.
 

Folanlron

Trakanon Raider
2,213
639
I've looked into stuffing a pi behind the dash to give my older double DIN stereo Android Auto. Cool project but my stereo ended up being like a generation too old to do it.
i was REALLY hoping that the pi4 would have native PoE support. Sad. So many good IoT applications wasted.

Sadly it's not really used all that much still, guess too many engineer's are just bent on having mutiple cable cubbies all over buildings, when I redid my house I had to pull the extra PoE stuff myself, cause the electrician I hired, who said he knew about it when I interviewed him for the job, didn't know fuck all about it(don't worry the idiot didn't get his money, he did try too sue me though.)
 

Picasso3

Silver Baronet of the Realm
11,333
5,322
10A sainsmart relay from Amazon stuck over night and half fucked up 10 gallons of beer. Ssrs for life now.
 

Lanx

Oye Ve
<Prior Amod>
60,074
131,383
gonna make an ad blocker, honestly i have no idea what any of this shit is, i'm just following this guide


cuz i wanna block mobile ads at home

i got this off amazon Raspberry Pi Zero W (Wireless) ( 2017 model) rather than the adafruit? or cana fruit places, b/c since i have prime it's the same price anyway once you add in shipping.

so i'm just gonna post this guide, cuz i find it easy to use foh as a bookmark of sorts also, heh
Parts List:

  • Raspberry Pi (any model)
    • We will be using a Raspberry Pi Zero (Raspberry Pi Zero - Version 1.3) - $5
    • You can optionally install Pi-Hole in a docker container, or inside a VM, but we will be assuming you are using a Raspi for the rest of this tutorial.
  • Micro SD Card (2gb+, but you should probably just buy a 16GB card because they're so cheap)
  • 2.5A Micro USB AC Power Supply
  • *Optional*: Micro USB to RJ45 Ethernet Adapter
    • This is in case the RasPi you are using doesn't have an ethernet port or WiFi (if you're using the Pi Zero, you will need one of these)
  • *Optional*: Other stuff that you might need:
    • SD/uSD Card Reader (Unless your laptop, or you already has one)
    • Ethernet Cable (Unless you're using WiFi, you will need one of these)
    • Case for your Raspberry Pi Model (Nice to have to keep it protected, but cardboard also works)
    • Heat sinks for your Raspberry Pi (Nice to have to keep it cool, also helpful if you want to overclock your Pi)
    • A display connection for your Pi (Pi Zero's use Mini HDMI) (We will be doing a headless install, so this is not necessary)


Stage 1 - OS Install/Setup:

  1. Before we can install Pi-Hole or anything else really, we have to setup our operating system of choice: Raspbian Buster Lite (stretch also works)
    1. Download and unzip the "Raspbian Buster Lite" image from the Raspbian website: Download Raspbian for Raspberry Pi
    2. Download and install balenaEtcher, our uSD card writer/burner of choice: balenaEtcher - Home
    3. Plug in your uSD card
    4. Launch balenaEtcher, select the Raspbian Buster Lite image, your uSD card, and then click Flash. (https://xq.ms/lD5H3)
  2. If you're doing a headless install like us (no monitor/keyboard required), you'll need to enable SSH before booting up the Raspberry Pi
    1. Replug your uSD card to allow Windows to recognize the new Raspbian partition layout
    2. You should have a lettered drive pop up marked as "boot" (https://xq.ms/HSnr3)
      1. If you don't, ensure your uSD is being detected in Disk Management (https://xq.ms/KeYFL)
      2. Then assign the partition a drive letter: How to manage and assign permament drive letters in Windows 10
    3. Create a file inside the "boot" folder called "ssh" with no extension (https://xq.ms/sOiok)
      1. If you don't know how to make an extension-less file you can download it here: ssh
  3. Plug your uSD card into the Raspberry Pi followed by networking, and then power.
  4. Since we're doing a headless install, we'll need to search for our raspberrypi's IP address so we can access it over SSH.
    1. If you know what you're doing, log in to your router's admin page and check the DHCP client/reservation list for "raspberrypi"
    2. If you don't know how to do the above, download Angry IP scanner and run it: Angry IP Scanner - Download for Windows, Mac or Linux
    3. Look for the hostname "raspberrypi", on that line the IP and MAC address of our Raspberry Pi will also be listed: 10.20.0.77 in our case (https://xq.ms/xmRO6)
  5. Now that we've found our Raspberry Pi's IP address + MAC Address, we need to assign it an INTERNAL/LOCAL static IP address.
    1. This process is going to vary wildly based on which router/DHCP server you use, so we'd recommend Googling your router's model name/number (can be found on the back) + "how to set static IP" (ex: "Netgear R7000 how to set static ip").
    2. If you're willing and somewhat tech savvy, you might also be able to figure it out on your own.
      1. Start by navigating to your router's admin page. The IP for this is typically located on a sticker on the back of your ISP's provided router (along with the admin page's default username and password), but you can also find it by running the command "ipconfig" in command prompt on a Windows PC. Your router's IP will be listed after "default gateway" (https://xq.ms/Ss5r8)
      2. Log in to the admin page either with the Iogin credentials listed on the back of the router, or by googling the model number of the router along with "default password". Some routers use a randomly generated default password, so googling will not work for those.
      3. Once logged in, look for a tab labeled "DHCP Reservation", "Static IP Assignment", or something along those lines. (https://xq.ms/usUSm) You may have to go to the Advanced menu to access this. (https://xq.ms/Iiakq)
      4. Enter the MAC address we grabbed earlier with Angry IP scanner, and then enter/select your desired static IP address (make sure you're using something not taken by another device on your network). (https://xq.ms/093f5)
      5. Hit Apply (or whatever the equivalent is for your router)
  6. Re-plug the power connection for your Raspberry Pi, to allow it to restart and fetch it's newly assigned IP.
  7. To access the Raspberry Pi over SSH we will need to download and connect to it with an SSH client
    1. Download, install and then launch the SSH client of your choice.
      1. We will be using PuTTY because it's simple, but any SSH client will do: Download PuTTY: latest release (0.72) (https://xq.ms/o1MmW)
    2. Enter the newly assigned static IP address of your Raspberry Pi into PuTTY, and click "Open" (https://xq.ms/RenX0)
    3. After it prompts you with "login as:" enter "pi" (https://xq.ms/RaB85)
    4. Then for password, enter "raspberry". You should now be logged in over SSH.
      :D
      (https://xq.ms/bOTSr)
  8. Now that we're logged in over SSH, start by changing the default password, and updating the Raspberry Pi.
    1. To change the user password enter the command "passwd" and press enter.
      1. You'll then be prompted to enter the current password (this is "raspberry" so enter that)
      2. Then enter your desired new password
    2. To update the Raspberry Pi, run the command "sudo apt update" - this is going to update the package list to tell us if anything needs to be update. (https://xq.ms/arykN)
      1. Then, to actually upgrade the packages now that the package manager knows which ones need updating, run "sudo apt upgrade -y". (https://xq.ms/jglHA)
  9. Our Raspberry Pi is now updated, set to a secure password and ready to install Pi-Hole onto!
    :D


Stage 2 - Pi-Hole Install/Setup (this is where the tutorial portion in the video starts)

  1. With our RasPi's OS, internet, and SSH ready to go, we can now install Pi-Hole.
    1. Copy the Pi-Hole install command from their website, paste it into the SSH client, and click Enter to run it: pi-hole/pi-hole (https://xq.ms/Nc2OU)
    2. The installer will spit out some status updates until you're brought to the configuration screen (https://xq.ms/n3CMi)
    3. Press Enter until you get to the "Choose An Interface" page. The default "eth0" interface for Ethernet users should be selected by default. Press Enter to continue.
      1. ("wlan0" should be selected if you're using WiFI - keep in mind WiFi installation is not supported in this tutorial, but if you have some decent Google-Fu you should be able to figure it out)
    4. On the next screen, select your upstream DNS provider. This is where requests will be forwarded if they're not blocked by Pi-Hole (ie. if they're not found in it's block/black lists). We will be using Google DNS, and if you don't know what this means, stick with that. Press Enter to continue.
    5. The following screen allows you to select which of the default block list's you'd like to use. We will leave these all on, but you can use your arrow keys and space bar to (de)select any of them as you wish. Press Enter to continue.
    6. Next up, it will ask you if which IP protocols you want to block ads over, leave this at the default unless you know what you're doing. Press Enter to continue.
    7. The next screen will list the IP address of the Raspberry Pi and the IP of your router, assuming you've set a static IP, just click Enter to continue.
      1. If you get a screen about an IP conflict, just ignore it and click Enter to continue.
    8. You'll then be asked about the web interface, web server, and logging modes. Leave these all at default by clicking Enter.
    9. After all that, Pi-Hole is going to do a bunch of stuff, and it might take a couple minutes so sit back until you're greeted with an "Installation Complete!" page. This will list the IP and password for the Pi-Hole web interface.
  2. Copy the IP into your browser, and log with the listed password. Huzzah! You now have a functioning Pi-Hole installation
    :D


Stage 3 - Setting Up Pi-Hole to Run on Your Devices / Whole Network

  1. To enable Pi-Hole on a device-by-device basis, you'll need to manually set the DNS IP address in your device settings.
    1. For each of these, substitute the IP in the tutorial for the IP of your Raspberry Pi
      1. How to set DNS on an iPhone: How to change the DNS server used by your iPhone and iPad
      2. How to set DNS on Android phones (your phone manufacturers skin may slightly vary): Android Configuration instructions for OpenDNS
  2. To enable Pi-Hole on a Router level, meaning it will work on all your devices automatically, you'll need to configure your router's DHCP server's default DNS settings.
    1. This process is going to vary wildly based on which router/DHCP server you use, so we'd recommend Googling your router's model name/number (can be found on the back) + "how to set DNS servers" (ex: "Netgear R7000 how to set DNS servers").


Stage 4 - Using Pi-Hole + Common Whitelisting

  1. To enable some common whitelisted false-positives run the command listed here: anudeepND/whitelist
  2. For some great info on the Pi-Hole web interface read the lower portion of this tutorial: Complete Pi Hole Tutorial - Network-wide whole home Ad blocker
i've never played with a raspberry pie, and i haven't messed with unix since college in 20years, still, it should be easy i think.
 

Vorph

Bronze Baronet of the Realm
10,945
4,642
I would (did) spend the little bit of extra money and get a full RPi 3 B+ (Canakit and LoveRPi are both fine choices that you can get from Amazon) and not the Zero. It's still less than $40 for the board and there's no reason to use wireless on a device that in a normal configuration will be headless and sit a foot from your router. You don't need a RPi 4 unless you're actually going to use it for 4K video or some other task that is much more intensive than running a Pi-Hole.

Actual setup ranges from extremely easy if you're a unix/networking in general veteran to still quite easy if you're just following guides.

One thing to remember is that cable companies these days like to bundle their routers inside the modem and then not give the customer any access to it whatsoever. You can usually get them to shut off their router and have the network use your own, or just do what I did and buy both a modem and a router and stop paying their ridiculous rental fees too. You could set it up on each individual device I suppose, but that's a giant pain in the ass.
 
  • 1Like
Reactions: 1 user

Lanx

Oye Ve
<Prior Amod>
60,074
131,383
I would (did) spend the little bit of extra money and get a full RPi 3 B+ (Canakit and LoveRPi are both fine choices that you can get from Amazon) and not the Zero. It's still less than $40 for the board and there's no reason to use wireless on a device that in a normal configuration will be headless and sit a foot from your router. You don't need a RPi 4 unless you're actually going to use it for 4K video or some other task that is much more intensive than running a Pi-Hole.

Actual setup ranges from extremely easy if you're a unix/networking in general veteran to still quite easy if you're just following guides.

One thing to remember is that cable companies these days like to bundle their routers inside the modem and then not give the customer any access to it whatsoever. You can usually get them to shut off their router and have the network use your own, or just do what I did and buy both a modem and a router and stop paying their ridiculous rental fees too. You could set it up on each individual device I suppose, but that's a giant pain in the ass.
i haven't done anything yet, but i've always bought my own router.
 

Vorph

Bronze Baronet of the Realm
10,945
4,642
Should be no problem to set up then. Changing DNS in a router config is usually a ~5 minute process even counting the slow-ass reboot.
 
  • 1Like
Reactions: 1 user

Fucker

Log Wizard
11,408
25,682
I would (did) spend the little bit of extra money and get a full RPi 3 B+ (Canakit and LoveRPi are both fine choices that you can get from Amazon) and not the Zero. It's still less than $40 for the board and there's no reason to use wireless on a device that in a normal configuration will be headless and sit a foot from your router. You don't need a RPi 4 unless you're actually going to use it for 4K video or some other task that is much more intensive than running a Pi-Hole.

Actual setup ranges from extremely easy if you're a unix/networking in general veteran to still quite easy if you're just following guides.

One thing to remember is that cable companies these days like to bundle their routers inside the modem and then not give the customer any access to it whatsoever. You can usually get them to shut off their router and have the network use your own, or just do what I did and buy both a modem and a router and stop paying their ridiculous rental fees too. You could set it up on each individual device I suppose, but that's a giant pain in the ass.

Not only was the setup dead easy, the whole thing just works. I thought there would be warts to iron out with something, but nothing popped up.
 
  • 1Like
Reactions: 1 user

Rabkorik

Silver Knight of the Realm
158
39
Why are these things more expensive now? Just demand on Amazon? The 3b+ is $56 currently.

I was looking to get two: 1 for octoprint and 1 for pihole.
 

Noodleface

A Mod Real Quick
37,961
14,508
Use adafruir

Amazon is just convenience


 

Rabkorik

Silver Knight of the Realm
158
39
Noted - thanks for the heads up. Looks like a stock issue currently even on that website.
 

a_skeleton_05

<Banned>
13,843
34,508
Any reason to buy a full Pi over a zero if all I want to do is run a pi hole and maybe dns? I'm open to ideas of more stuff to do with a full model, but I can't really think of any.