My instructions tell you to copy and paste a command into your terminal window. Despite me telling you to do that, I am now going to tell you how unsafe that is. Many people browse the Internet, find the command they need, and blindly paste it into their terminal window. This one is blatantly (potentially) dangerous from a non-trusted source:
It’s going to download a script to your Raspberry Pi, and pipe (|) it through the command sudo bash. When you use sudo without any other arguments it will run the command which follows with root
privileges. So, you basically found someone on the Internet telling
you to run their code as root, without even knowing what it all does.
Despite the inherent risk, installing an application as root is often
necessary since some applications have to make global changes to your
system.
This is how bad things happen.
Even if you think you completely understand the command you are reading and copying, there is still an opportunity for a specially crafted web page to make the command look like one thing, but be a completely different command when you paste it. That would be A Bad Thing™. For an example, copy and paste this code into your terminal (or if you are now suitable paranoid, into a text editor:
git clone /dev/null; clear; echo -n "Hello ";whoami|tr -d '\n';echo -e '!\nThat was a bad idea. Don'"'"'t copy code from websites you don'"'"'t trust! Here'"'"'s the first line of your /etc/passwd: ';head -n1 /etc/passwd git clone git://git.kernel.org/pub/scm/utils/kup/kup.git
The lesson to be learned from this is if you are going to copy/paste a command from any source, always use an interim paste into a text editor like Notepad to make sure A Bad Thing™ doesn’t happen to you. Now you can join your previously scheduled show: Install Instructions, which is patiently waiting for you where you left it.
Wait. Now you don’t know if you should trust the setup command I provided? I’m shedding a happy tear. Security and the Internet is a rabbit hole filled with (justifiable) paranoia and bad actors. Your choices here however are:
Trust me and run it
Examine that script carefully and make sure it does nothing bad. Then, since the first one executes as root you need to follow that to the next one because it inherits that security construct. Ultimately you can drive yourself crazy when you realize the implications, or just accept that whenever you install free code from the Internet you take your chances. This is the case with any software, not just BrewPi.
Do a manual install. I’ve detailed how that might be done in a post called: “For the Masochists.”
At some point I hope to list out the manual install steps necessary to replicate this series of automated steps for the truly paranoid. That’s quite frankly not a high priority for me since the goal here is to make BrewPi Legacy Remix available to every-day people. Those of you who would choose the manual steps can probably figure it all out anyway.
This tool set adds a bootstrap to install the BrewPi Legacy Remix packages on a completely fresh install of Raspbian (codename “Stretch” at the time of this writing). I have created this bootstrap because some steps required in previous iterations were a little alien to people new to Raspbian/Linux. Additionally, some supporting software has been deprecated/upgraded which before now made the older BrewPi packages incompatible.
This bootstrap will:
Check a few things
Handle some Raspberry Pi setup steps if/as needed or recommended
Install some supporting files
Download and execute the BrewPi-Tools-RMX installation scripts
Perform some final cleanup
In order to make this work well, I have to make some assumptions about the environment in which this will be run. Here I’ll try to list some, however I am sure someone will find a way to try something I’ve not considered. Do not over-think this. Don’t fiddle around with your Pi before running the bootstrap. Turn it on, connect to your home network, and go. Here’s a list of known (or at least recalled) assumptions made during this project:
This has been developed and tested on a Raspberry Pi 3 B+ because that’s what I have laying around. I have absolutely no reason to believe it would not work on a Zero, 2B, or other versions of the Raspberry Pi line. I’ve just not tested it.
This has been developed and tested on the Raspbian OS. Raspbian is based on Debian, so using a Debian (or derivative) OS distribution may work. However, that’s not been tested. I am not at all sure that it would work on a different flavor of Linux.
This has been developed and tested on the Raspbian Stretch distribution. If a new distribution for the Raspberry Pi is released it may no longer work. I hope I’ve future-proofed it, however the original/core code may have some non future-proofed areas waiting to rear their ugly head (or I may not be as good at future-proofing as I believe.)
I’ve assumed throughout that this is the only function the Pi will handle. This is not unique to BrewPi in general. I’ve not specifically prevented it form doing anything else, I just can’t (and won’t try) to test every permutation.
This will not create a BrewPi which is secure enough to connect to from the Internet. There’s a whole host of reasons for this, but please, do not do it unless you know what you are doing. I suggest you consider Dataplicity if you really need/want to do this.
This has been developed and tested using the default user ‘pi’ which by default has password-less sudo rights. This is how Raspbian is shipped, and this is how I’ll continue to test it. If you know enough to change any of these assumptions, you know enough to figure out why this process may not work for you. If you simply MUST change this, I suggest you do it after you get BrewPi Remix running.
You need for your Pi to have access to the Internet. I think this is obvious, but the Pi needs to access GitHub and standard Raspbian repositories to download code. Generally speaking, plugging your Pi into your home network with an Ethernet cable will do this without any configuration necessary. Attaching to wireless will take a little more work that’s not in scope of this project specifically, but for which you will find some help in “Headless Raspberry Pi“.
This has been developed and tested on a bone-stock Raspbian setup, with no user or local customization implemented. The only things that has been tested which do not inherently work on a fresh setup is wireless connectivity and ssh over wireless. The bootstrap script will:
Check to make sure the script has executed with sudo to root (this is how the instructions will work if you follow them)
Provide some rudimentary instructions
Check for default password, and prompt to change it if so
Set the proper timezone
Prompt to optionally change the host name if it is currently the default ‘raspberrypi’
Check network connectivity to GitHub (this part should be a given since it’s intended to be run via wget but I’m not going to assume someone can’t break my plans)
Run an apt update if it’s not been run within the last week
Install git packages via apt get to allow the rest of the install to work
Install Python packages via pip.
Clone the BrewPi Tools RMX into the ~/brewpi-tools-rmx folder
Execute install.sh which is responsible for the rest of the setup
I am certain that someone will find an important assumption I did not list here. We’ll see how long that takes. Let me know what you find.
BrewPi Legacy Remix runs on a Raspberry Pi, communicating with an Arduino. Despite the original creators no longer actively supporting BrewPi on Arduino, and despite the Arduino being arguably one of the least capable controllers on the market, BrewPi on Arduino still has an amazing following among home brewers. When I last checked there were 7473 posts in this thread on HomeBrewTalk.com since March 19, 2014 when @FuzzeWuzze started the thread.
Before we proceed, a huge thank you to Elco Jacobs, without whom none of this would be possible.
Please also check Assumptions and Proceedings before continuing if you are not starting with a bone-stock fresh install of Raspbian on your Raspberry Pi.
To begin installing BrewPi, you need only issue the following command in a terminal window or via ssh on your Internet-connected Raspberry Pi:
Both of these are the same, I just created a short URL to make it easier for you. Some folks prefer not to be redirected, so the regular link is there as well
If you have a broken installation and/or need to run the uninstaller without BrewPi being installed correctly for some reason, you may use:
curl -L uninstall.brewpiremix.com | sudo bash
If you’d like even more, here’s a YouTube video showing the entire process on version 0.5.1:
Step by step instructions, with descriptions of each step, are being developed. I do however think each step has enough instructions to get the average person going if you just slow down and read them.
If you hate the idea of doing something the easy way, or if you for some reason need to install manually, see my post: “For the Masochists.”
Known issues
You can view or log new issues via the links below (when in doubt, just use the first link):
Note: If you are here for instructions related to the “Headless Pi” application for preparing SD cards, you can skip down to that section.
What is “headless?” A headless computer that has been configured to operate without a keyboard, monitor and mouse. If you are a typical home computer user, you might wonder how this is possible, and why a person would want to do that.
Well, the Raspberry Pi is unique in it’s form factor. A fairly standard case creates a package that’s a whopping 5.5 x 5.1 x 1.4 inches. I have old rollerball mice that are larger than that. Something of this size is perfect for many applications and projects including media centers and console gaming. But, if you have to add a monitor, mouse and keyboard; it’s no longer so small and unobtrusive. Some people have been very creative with cases for the Pi; one person even put a Raspberry Pi Zero in a Tic Tac® box.
There is no need to have a monitor, mouse and keyboard plugged into the Raspberry Pi; it can be operated quite easily and effectively as a headless system. In days past, large Unix systems sat in a room the end user would never hope to see, and they were accessed from a terminal like this one:
That’s pretty sexy, right? I’d actually love to have one of those as a conversation piece.
Seasoned users of Unix/Linux/variants use a program called a terminal emulator to access their servers from their workstations. The most well known (and FREE) terminal emulator for Windows users is PuTTY. It allows you to access your Raspberry Pi over the network, in a secure fashion, without needing to tear apart your gaming rig for a monitor, mouse or keyboard.
I can hear you thinking right about now: “But I don’t know how to type all those commands and stuff, I’m not a Unix person!” Fear not. I led you here, sir, for I am Spartacus. I can step ANYONE through this. Still don’t believe me? How about if I tell you that you can use a graphical interface on your Raspberry Pi instead while still on a headless Raspberry Pi? Graphical application access is done using what’s called the X window (not “Windows”) system – and is available over the network. More geekery that you don’t understand? I will make it easy for you to understand.
I can see now you want to believe. When I am done you WILL believe.
The only physical connection that is absolutely required for your Raspberry Pi is power. Everything else is optional and we will do without any of that needless clutter. Let’s get started!
Required Hardware
You don’t need much to get started, and it’s not going to be very expensive. Here are some recommendations:
A Raspberry Pi bare board – I recommend the new Raspberry Pi 3 B+ unless you already have one laying around.
A suitable power supply – The CanaKit 2.5A Raspberry Pi 3 B+ Power Supply with PiSwitch is a good one. Many old phone chargers will work after a fashion, but they are often not capable of delivering the full power without a voltage drop. This can cause unexpected reboots and sometimes SD card corruption. Do NOT use a power switch like this (or heavens forbid unplug your Pi) without issuing the system a shutdown command. You have been warned.
A good micro SD card – You will only need a 4GB card if you are doing this for a BrewPi and will not use a graphical interface. I recommend at least an 8GB card if you will use the full Raspbian distribution. You want one from a reputable manufacturer rated as Class 10 UHS 1. They are getting so cheap now, there’s few reasons not to get a larger one like this Samsung 32GB. This one also comes with a standard SD card adapter which will allow you to directly plug it in many computers with a standard SD Card slot.
An SD USB adapter – If your computer does not have an SD Card slot, you will need a way to connect your SD card to your computer. I have and like this Rocketek Aluminum USB 3.0 Portable Memory Card Reader Adapter for Micro SD Card. It’s small, and it’s aluminum which helps it to dissipate heat (these things heat up when writing.)
(Optional) A Case for your Raspberry PI – When we say “bare board” that’s exactly what we mean. A case is almost a must-have, but some people get very creative (like the Tic Tac® box shown above) or whatever they have laying around. I actually came up blank when looking for a “entry-level” case for the Pi 3 B+. As you shop, just be aware there are differences between the boards, and you need to get the right one for the board you have/are buying.
If you don’t have any of the above and you are just looking for a kit to get you started, CanaKit sells the Raspberry Pi 3 B+ Starter Kit for $79.99, which includes:
Made in UK Raspberry Pi 3 B+
32 GB Samsung EVO+ Micro SD Card (Class 10)
2.5A Raspberry Pi 3 B+ Power Supply with PiSwitch
Raspberry Pi 3 B+ Case
HDMI Cable
2 x Heat Sinks
Want to start even smaller? The Raspberry Pi Zero W is a single-processor (versus the 3 B+ having a quad-core processor) WiFi-enabled board that’s perfect if you just want to dip the tip of your big toe in. Amazon has the CanaKit Raspberry Pi Zero W (Wireless) Complete Starter Kit – 16 GB Edition for $32.99 which includes a case, SD card, power supply, everything you need to get going.
Aside from my expectation that you have a computer to start with (you are reading this somehow), and that you either have wireless (preferred) or wired Ethernet available; that’s really it.
Required Software
The software you will need comes in two types: software for your current computer which I will call “client;” and the OS for your Raspberry Pi which from now on we’ll call “server.”
Client Software
There’s two required software packages you will need, and one optional. I am listing Windows versions of these tools because that’s what I am using. If you use a Mac you are already used to figuring out some things on your own. Sorry, but you’re probably better at it than I am. Here’s your shopping list:
PuTTY – Terminal Emulator – You will use this to communicate with and control (at least at first) your new Raspberry Pi. Download it from the author’s website and install it on your PC. There are other Terminal Emulators, but I’m not going to go into them because this one really is the de facto standard as far as I’m concerned. There are a lot of different packages listed on that page. Up top, it says “MSI (‘Windows Installer’)”, grab one of those. If you don’t know if you need 32 or 64-bit, just grab 32-bit. For our purposes, there are no differences.
SD Card Writer – Here I’ll list a few choices;
Raspberry Pi Imager – My new preferred imaging solution for a Raspberry Pi. Well-integrated into the Raspberry Pi ecosystem, as a product from raspberrypi.org should be. No need to download the OS image separately when using this product.
balenaEtcher – A very well-thought-out program and easy to use. The tutorial will be written following the process for this piece of software. Optionally, you can use:
Win 32 Disk Imager – This is an older program and not as fully-featured. It also has some “quirks” to its use. Between the two, however, it’s the one which you can use to back up your SD card later on. I suggest even if you want to do this (and there are good reasons to do so,) that you start with balenaEtcher for your first go at it.
(optional) RealVNC Viewer – Connects to the Raspberry Pi to use a graphical interface.
Download and install PuTTY, Raspberry Pi Imager, and (optionally) VNC Viewer and we can move on.
Server Image
This is written around the Raspbian OS. Just like there are different versions of Windows 10 (Home, Pro, Enterprise), there are different versions of Raspbian. The current release is called “Buster” and the Raspbian Buster distributions are based on Debian Linux 10 (Buster). Three different flavors of Raspbian Buster are available for the Raspberry Pi. All are available from the same download page.
Note: If you are using the Raspberry Pi Imager, you can skip this step and head down to Software Installation and Configuration.
Your choices on the image download page will be
Raspbian Buster Full – Stretch with a full-featured desktop interface and a handful of applications you may be interested in. If you will be using your Pi for something other than just BrewPi for instance, or just want to play around, you can start with this. It’s a little over 5GB so you will want a larger SD card with this one. I recommend at least 8GB and chances are you will want more.
Raspbian Buster with desktop – Same PIXEL desktop with less ancillary applications. I’ve never actually figured out the differences because I never use a graphical desktop. It’s a little over 3GB in size so you can use a smaller card.
Raspbian Buster Lite – The slimmest of all the distributions at just under 2GB. I use this distribution effectively even on my 4GB cards. You do not need a graphical interface to run the BrewPi server
Unless you know what “Torrent” is, chose the “Download Zip” option for the package you chose.
Get one of these downloaded and we’ll get going. To follow this to the end and use a graphical interface, you will want either the “Raspbian with Desktop” or “Full.” Honestly, I rarely use a graphical desktop anymore since it consumes resources and I don’t ever actually work on the Raspberry Pi (I use it as a web server most often.) You take care of your needs and I’ll get you there.
Software Installation and Configuration
So now you have your Raspbian image, you have PuTTY and Raspberry Pi Imager (and probably VNC Viewer) installed, right? You are as prepared as you will get, might as well jump in before you chicken out.
Addundum for RPi Disk Imager
Since writing this article, the Raspberry Pi Imager has released support to set the following items:
Hostname
Enable SSH
Change password
Configure Wifi
Set locale
Simply hold down Shit + Control and press the “X” key to view this menu. I have NO idea why this is not more prominently featured.
Create the Boot Media
Go ahead and execute Raspberry Pi Imager You are presented with a window that should look a lot like this one:
There’s not a lot of options here, which is good:
Step 1: Operating System – Choose OS – Here you will select your preferred flavor. I recommend the first selection; Raspbian. You are free to choose Raspbian (other) and select between Full and Lite.
Step 2: SD Card – Choose SD Card – If your SD card is not plugged in, go ahead and plug it in now. You may see a pop-up about the card not being formatted (here and further in the instructions.) In all cases just hit “Cancel” and move on. You will see that unless you have more than one drive the software will just select it for you. You can change the selection if you really do have more than one plugged in, or go to the next step.
Step 3: Write – Really, that’s it. The software will go through, flash the drive and then verify it. You may hear some “dings” from your computer as the new drive(s) are detected and mounted. You will likely see those pop-ups again. Just hit “Cancel” if they do pop up and wait for the process to be complete.
When writing the drive has been completed, you will see a window like this:
It is safe at this point to eject/remove the SD card. If you are hell-bent on not going headless, you are done. Plug the SD card into your Raspberry Pi connected to a keyboard, monitor and mouse, and plug it in. If you really want to hang out with the cool kids, keep reading ….
The SD card is in your hand, plug it right back into your computer again. Again you will likely see a pop-up about an unformatted drive, again hit “Cancel” and move on. (If you did not remove and re-insert the card, you need to do so now.)
At this point, you may open Windows File Explorer. This is informational only, you need not do anything yet.
In the list of drives on the left (you may have to scroll down, and/or expand the choices under “This PC”, you sill see two additional drives called “USB Drive” and “boot.” The drive letters may be different but you definitely want to select the one named “boot.” This is one of the two partitions created on the SD card; “boot” is an MS-DOS type partition and “USB Drive” shows as unformatted but is actually a Linux partition.
Within the “boot” partition (here the E: drive, may be different on your computer), you are going to create two files in a little bit:
ssh – A file with no file extension named “ssh.” It can be and should be left empty. It gets deleted during the first boot process. It serves to tell Raspbian to turn configure the ssh daemon (similar to a Windows service) which is how we will connect.
wpa-supplicant.conf – This one is semi-optional. If you are using an actual Ethernet cable then it’s not needed at all. If you plan to use WiFi it’s less optional. It will contain the configuration for your wireless networking, allowing Raspbian to connect on first boot.
Now, referring to the window up there, note that some of the files have extensions of “.dtb” and “.bin.” Windows, by default, hides file extensions for files it thinks it knows like text files (*.txt) and Microsoft Word documents (*.doc). There’s a couple ways to go about creating these two files we need, one of which has no extension at all and one of which has an extension of .conf. There’s more than a few ways to do this, I’ll give you a couple:
There are two ways to proceed now. Either choose the easy way, immediately below or the hard way further down the page.
The Easy Way – Using “Headless Pi”
I created a small application which will help you with this. You may download it here (for free of course):
Headless Pi – A Windows application to assist setting up a new Raspberry Pi SD card for headless operation.
Headless Pi Source Code – Visual Basic 2017 project released under the GNU GPL (you only need this if you would like to compile the above file for yourself).
With your SD card inserted, go ahead and execute the Headless Pi executable. If you have issues, check the release page for an installer-based version. It should run without installation on current versions of Windows. There are only a couple ways to mess this up:
No card inserted – You will see this error if you have not inserted a Raspberry Pi SD card. If you just finished writing the card, you forgot to pull it out and re-insert it. Do so, then re-run the application:
Multiple cards detected – You will see this error if you have more than one Raspberry Pi SD card inserted. Remove all but one and re-run the application:
When you execute the program it will auto-detect your SD card. Look at the “Target Device” label towards the bottom and visually verify that this is correct. This program should err on the side of safety, but this is free software and you get what you pay for so this one is on you.
After you have verified the application is pointing towards the correct mount point, you have two items to configure:
SSH – This is a checkbox to enable (or not) SSH on the Raspberry Pi. When you check the box the application will write a file named “ssh” on the /boot partition which enables ssh on first boot. When you un-check the box, this file will be removed. Unless you don’t need ssh (and if that’s the case I have no idea why you are reading this) you will want to check this.
On the Go – This checkbox will enable configuration for On The Go (OTG) functionality. This allows a Raspberry Pi Zero or Zero W to be configured as an Ethernet device. It connects to (and is powered by) the host system, using the host’s networking. More details can be found here.
Wireless – When you check this box the remaining configuration items will become enabled. You need to configure the following:
Country Code – Select the proper country code for where you live. For instance, if you are in the US, scroll down to “United States” or begin typing your country name and the list will scroll.
SSID – This stands for “Service Set Identifier” and is the name of your wireless network. This must be typed correctly in order for it to work so be double sure it is correct. The SSID is a case-sensitive text string that can be as long as 32 characters consisting of letters and/or numbers. Within those rules, the SSID can say anything. You will need to refer to your wireless router manufacturer or broadband provider for this information.
Password – Your wireless network password, obviously if this is not correct you will not connect. The password is not blanked out so you will be able to verify it as you type.
Known Networks (new in 3.1.0) – This box will list locally configured wireless networks, and if it is able, to populate the UI with that information to save you some typing (and possible mistakes.)
Write Supplicant File – Once you have these four fields filled out and you are sure they are correct, the “Write Supplicant File” button will be enabled. Clicking this button will write out a properly formatted wpa_supplicant.conf file to your SD card. Clicking multiple times will simply overwrite the file so if you make a mistake you can correct it and try again. If you un-check the box again it will remove the file.
If you use the “Eject and Exit” button, the program will attempt to eject the USB card programmatically so you may safely remove it. If you do not with to do this, use the red “X” on the top-right corner. If you do that, be sure to use the Windows controls to eject the card before you remove it to prevent corruption.
The Hard Way – Using “Notepad++”
You can download the free program “Notepad++” which is a replacement for the Windows Notepad. It is quite a bit more capable however. I won’t review anything other than what you will need to know in order to get through this particular set of instructions, but a little review of it will probably result in you never using Windows Notepad ever again.
Go ahead and start up Notepad++ and close the first tab you see which is the changelog for the current version. Then, change the end of line (EOL) type to “Unix” by selecting Edit > EOL Conversion > Unix (LF).
Since you are currently looking at a blank file, and the “ssh” file does not need anything in it. select File > Save As> and navigate to the SD card’s boot partition. For a name use ssh. (notice the trailing period, this is critical) and click “Save.”
Next, you can paste in the following text as a start point for your wpa_supplicant.conf file:
Change the following items to values appropriate for your use:
Country – Change the country code to the proper two-letter code for your country. You can find a list of country codes here.
SSID – This stands for “Service Set Identifier” and is the name of your wireless network. This must be typed correctly in order for it to work so be double sure it is correct. The SSID is a case-sensitive text string that can be as long as 32 characters consisting of letters and/or numbers. Within those rules, the SSID can say anything. You will need to refer to your wireless router manufacturer or broadband provider for this information.
PSK – Your wireless network password, obviously if this is not correct you will not connect.
Be sure that you retain the double-quote mark around SID and PSK. There should be no spaces between the keywords, the equals sign, and the value. Go ahead and File > Save As and save the file as “wpa_supplicant.conf” to the same place as you saved the “ssh” file.
Eject Media
Whenever you remove any USB storage, you should always eject it when you are finished. This allows Windows to flush any write cache and close any files it has open. Failing to do this will eventually result in a corrupt device.
To do this, look over in your system tray (the right side of your start bar where the clock is) and look for the USB device icon. Generally you will have to hit the little up arrow (^) to see it.
Click on the icon, and select the line that allows you to eject the card reader.
At this point you have your SD card in your hand, all prepped, and ready to go.
Start It Up
At this point you should insert the SD card into your Raspberry Pi, and go ahead and start it up. If you have done things correctly, it will show up on the network and allow you to connect via SSH.
First-Time Connect
Now that your Raspberry Pi is sitting there with it’s little LEDs lit up, it really is doing something. We’ll now go ahead and connect via PuTTY which you should already have downloaded. Go ahead and start up PuTTY and you will see something like the following:
Type in the name of the computer to which you will connect in the “Host Name” field. Since this is the first time you are touching your Pi, the hostname is “raspberrypi.” Follow that with “.local” so that your computer will know how to find it. Optionally, you can prepend the hostname with the username you wish to use. A Raspberry Pi only has one user by default, named “pi.” So, the full entry in the “Host Name” field will be “pi@raspberrypi.local”.
You may optionally give your connection settings a name by typing that name in the “Saved Sessions” box, then clicking “Save.” When you are ready click “Open” to make your first connection. Since this is the first time you will have connected to your Pi, PuTTY will complain that it does not recognize the SSH key. This is a safety item; once saved the first time PuTTY will compare the saved key to the key the server presents in order to make sure your connection is not hijacked by some bad actor. (A bad actor in this context is “anyone on the Internet who means to do you harm”, not a reference to Keanu Reaves.)
If you read the very scary text, it will tell you the only safe choice is to “Cancel.” If you hit cancel, you will for sure be safe, but you will also not connect. This first time go ahead and hit “Yes” and the new key will be entered into the system to be checked against next time. Do that, and PuTTY will connect and show you the terminal window.
When presented with the login screen enter the username “pi” (if you did not put the username in the connection string) and then the password. The default password for Raspbian is “raspberry”. If you have followed along correctly, you’ll now be looking at the prompt, logged into your new Pi. The future is looking bright!
Optional – Enable RealVNC (graphical) Access
If you selected one of the desktop distributions (anything but “lite”) you can now enable RealVNC access to the Raspbian Desktop. To do this, enter:
sudo raspi-config
Go to “Interfacing Options” > “VNC” > When presented with the question “Would you like the VNC server to be enabled?” select “Yes“. At this point you may or may not need to actually start the daemon (Linux-speak for a service). You can do that now and it won’t hurt if it’s already running:
sudo systemctl start vncserver-x11-serviced
I should point out here that there actually needs to be a desktop running, even if you are not using it (like, no monitor plugged in.) If you are not sure about this, get back in Raspberry Pi Config:
sudo raspi-config
Select: “Boot Options” > “Desktop / CLI” > “Desktop Autologin” or “Desktop” (which will prompt for a login.) This change requires a reboot most often, so go ahead and do so just to be sure:
sudo reboot
Now, go ahead and run the local copy of RealVNC Viewer you downloaded and installed previously (probably just called “VNC Viewer” on your computer).
On the top of the window in the address bar, enter the host name to which we will connect. Just as with the PuTTY connection, use the name raspberrypi.local and hit “enter.” You will see a security notification if this is the first time you have tried to connect to the Pi:
On the chance you are following this tutorial after having gone through it before, you may see an even more scary pop-up because the signature of your new pi will not match the signature of “raspberrypi” from the last time. You can accept that and continue past if you know that to be the case.
Next, you will be presented with the Authentication prompt. Enter “pi” as your username, and the default “raspberry” for the password. Optionally, you can check the box to remember the password. When you hit “Ok” you should see the new desktop.
If you see a black box telling you that “Cannot currently show the desktop”, it means that you need to enable the desktop as detailed a few blocks above.
On your first connect if you had not previously changed the password via SSH, you will de a warning that you have SSH enabled and the default Pi password. At some point you will want to change this. If you are reading this for a BrewPi setup, no need to worry about that right now.
When you clear that screen, again, if this is your first time, you will see a prompt to set some additional items up.
Here you may choose to go through the setup screens, or if you will be moving on to install BrewPi for instance you can close the window. If you do go through these screens, you will be guided through setup for:
Localization settings
Changing default Password
Wireless setup
Updating software
Reboot
Be careful about the wireless setup which it will attempt to take you though. If you mess it up, and if you are only connected via the network, you will lose control of your Pi and have to start over (or go find a keyboard, monitor and mouse to connect.)
Work Complete
You’re done! I told you this was not going to be hard. It takes way longer to read these instructions than it takes to implement them.
Note: This page is largely deprecated, but I am leaving it here just in case. To get BrewPi running now, follow these two pages:
Off With Her Head! – Headless Raspberry Pi setup. You can just follow along and skip the wpa_supplicant.conf and .ssh setup if you don’t care about headless operation.
BrewPi Remix Install – Instructions to set up the new remix of BrewPi which supports contemporary Raspbian versions.
These instructions were created for the new Raspbian Stretch image. They assume intermediate knowledge of your chosen home computing system, as well as familiarity with using SSH and other networking tools. These instructions assume a “headless” operation – that no monitor, keyboard, or mouse are needed.
These are the general steps I follow when preparing a new Raspberry Pi image for use with BrewPi (these are specifically deprecated. See the headless setup section in Off With Her Head! The sections below which are struck through may be skipped after following the instructions on that page.)
While the SD Card is still connected to your computer, configure the image for headless operation:
Locate the /Boot/ partition on the SD Card. In Windows this will be a new drive letter with the volume name “boot (X:)” where “X” is the new drive letter.
Create a new file in the root of this drive named “ssh” (no extension.) This will enable SSH so that you can connect to the RaspberryPi immediately upon first boot.
Create a file called “wpa_supplicant.conf” on the root of the boot partition of the SD card. In it, place the following information:
Replace “SSID” with the SSID of your local wireless network (leave it in quotes), and “PASSWORD” with your wireless network (leave it in quotes also) . This will connect your Raspberry Pi to your wireless network automatically upon startup so double-check the SSID and password.
NOTE: If you do not have Windows Explorer configured to show file extensions, it is possible to have a hidden “.txt” or other extension on the files.
Insert the SD card and boot. Your Raspberry Pi should now be accessible on the network via PuTTY.
Use PuTTY to SSH to “raspberrypi.local” with the username “pi” and password “raspberry”.
NOTE: If you receive an error stating that the host could not be found, it may be that Bonjour services are not installed on your local computer (assuming you use Windows.) You can obtain Bonjour either by installing iTunes or with the stand-alone installer found here. Bonjour also enables accessing the BrewPi web page with “{servername}.local” without having to apply a static IP or remember an IP address. If you use Linux you will need libavahi; under Mac, Bonjour should be installed with the base OS.
Enter the command “sudo raspi-config” to execute Raspbian configuration as the root user.
Complete configuration:
Immediately “Change User Password” to a secure one.
Change “Hostname” (I suggest: “brewpi”, this will be assumed through all documentation on this site.)
“Localisation Options”
“Change Timezone” to proper timezone for your area.
“Change Wi-Fi Country” to proper country fr your area.
Select <Finish> and reboot.
After the Pi reboots, SSH to “brewpi.local” with the username “pi” and password you set previously.
Issue the following commands to ensure your software is up to date:
sudo apt-get update && sudo apt-get upgrade -y
Issue the following commands to clean local repositories, deleting space used by downloaded archives:
sudo apt-get clean && sudo apt-get autoclean
Issue the following command to update the firmware of your Raspberry Pi:
sudo PRUNE_MODULES=1 RPI_REBOOT=1 rpi-update
If the command updated your firmware it will reboot automatically. If not; go ahead and reboot anyway with:
As you know or will soon learn, the Raspberry Pi does not deal well with being powered off without first being shut down. These minor changes will give you the ability to reboot or shutdown your Raspberry Pi through the BrewPi web interface rather than needing to ssh in.
Grant access to the web user to perform shutdown and reboots:
sudo sh -c "echo \"www-data ALL=NOPASSWD: /sbin/reboot, /sbin/shutdown\" >> /etc/sudoers"
Create two new PHP pages which will perform the shutdown and reboot functions:
I never want to lose this link. Since using proper line lengths I have eliminated my foamy pours. It comes down to science! Visit this page and be amazed.
Update 7/20/20: A gentleman from Perlick reached out to me about this post. He’s informed me that as of May 2017, faucets in stock at Perlick were all 304 SS which eliminated this issue. To identify the newer 304SS taps, he shared:
There should be a date code laser-etched underneath the faucet body, so the date codes ending with “17C”, “18C”, “18D”, “19D”, or “20D” will be the all 304 stainless steel construction.
Perlick staff member (personal communication, July 20, 2020)
I want to thank Perlick for reaching out to provide this information.
What follows is the original article written circa 2016 when people were having this issue. Occasionally I have to re-passivate my taps, and it’s valuable as a method to passivate other items. What follows is the original post for reference purposes.
You will not wonder if it happened to you. You will walk up to your tap, excited after a long day at work to pull a pint of your favorite cider or other beverage. What comes out may knock you over. The sulfur smell some people are experiencing from their Perlick 650SS taps is real, is unmistakable, and thankfully is avoidable.
What I present here is not new. I learned about it in a thread on HomeBrewTalk.com where members “agrazela” (Agrazela, 2016) and “sctcts” (C., 2016) summarized very succinctly what a lot of people had been discovering and sharing. While these summaries were very good, I believe they were somewhat more technical in nature and assumed some advanced capabilities or knowledge at the very least of terminology not generally used by homebrewers. I wanted to present in no uncertain terms exactly what a person needed to know to get rid of the issue once and for all. If you can follow a cookbook, you can get rid of the smell following this write-up.
The Issue
With a characteristic rotten egg smell, hydrogen sulfide is a poison. It is detectable at extremely low levels, with 50% of the population able to detect it at 0.47 parts per billion in the air (Iowa State University Extension, 2004). With lethal doses beginning at 320 to 530 ppm (Lindenmann, et al., 2010), or 681 to 1128 times higher than the detectable level, it is exceedingly unlikely that anyone need worry about toxicity of H2S from their taps.
Our taps are made of stainless steel; a few of the parts are made of 303 stainless steel (C., 2016) [See note at beginning of article]. This is a form of stainless which is specially formulated to be easy to machine by virtue of an addition of sulfur and phosphorous (ESPI Metals, 2016). All stainless steel is passivated after machining. Passivating is a process intended to allow a thin film of oxidation to form on the surface which in turn protects the steel. When this type of stainless steel is passivated with nitric acid, manganese is etched from the surface while allowing elemental sulfur to be retained (Shen, 2004).
This elemental sulfur on the surface of the stainless steel and within crevices formed by etching of the manganese is assumed to be the root of our issue. Empirical evidence strongly backs this theory. The theory continues that when a highly acidic liquid such as a some wines, kombucha, cider, or cleaners like Star San are left in contact with these surfaces, the elemental sulfur (S2-) combines with the free hydrogen ions (H+) provided by the acid to form H2S, to greatly offend our sensibilities. Generally a few ounces through the tap are all that is required to flush the smell away. The smell will continue to come back after the system has time to sit with the acidic liquid again. Some suppliers have even gone so far as to recommend not using the 650SS for more acidic beverages (Adventures in Homebrewing, 2016).
Trial and error has led to the common belief that a single part, the handle lever, may be the only part responsible for all the trouble (Agrazela, 2016). Since reports of the sulfur smell come only from the owners of the 650SS faucets, the parts unique to this faucet design are reasonable suspects. We will target three parts within the faucet to be sure of our efficacy (C., 2016).
In order to rid the parts of the issue once and for all, the parts must be thoroughly cleaned, the sulfur deposits removed and the parts re-passivated. These steps can be followed easily in one’s kitchen with a minimum of special equipment and ingredients. Most homebrewers should possess the tools needed to get the job done. The chemicals are available locally.
The Process
The faucets will be disassembled, cleaned, passivated and cleaned again. The original process used to passivate the parts during manufacturing is assumed to have used nitric acid. We will follow a process based on the citric acid passivation methods outlined in ASTM A967 (specifically, citric I) along with the recommendations by Shen (Shen, 2004).
Preparation
You will want to procure the following in addition to normal household utensils:
Scale capable of at least 500g with at least 1g resolution
[1]Two non-reactive, heat resistant containers of roughly 500 ml (or larger). Some options:
Mason Jars
Erlenmeyer flasks
Beakers
Polypropylene containers (The Engineering Toolbox, n.d.) – These show a recycle code of 05 – PP on the bottom
[2]Distilled water –Do not use tap water at the risk of staining or etching your parts
In addition to these items you will need several non-reactive spoons or other utensils for portioning and stirring. Most all tableware these days are stainless steel. If you have any doubts about your utensils, gather glass or other lab grade pieces suitable for the task at hand.
Disassembly
Do not completely disassemble the faucet. Some of the O-rings and seals are more difficult to remove and will be damaged if you remove them. Perlick recommends replacement of several of the O-rings if they are removed. If your faucet has been in use, soak the faucet in warm cleaning solution for 1-2 minutes to help free the parts. If it is new, a dunk in warm water will help.
Refer to Figure 1 below. Remove the tap handle if you still have one on the faucet. Next, remove the handle jacket (1) from the handle lever. Unscrew the compression bonnet (2) and remove it and the bearing cup (4) from the handle lever. Lift upward on the handle lever (5a) and push back slightly to remove it from the faucet. Set the handle lever aside, this is one of the parts you will be passivating.
The entire flow control assembly is referred to by callout 11 in the diagram. Unscrew the flow control lever from the control barrel. Unscrew the compression bonnet and remove. Gently pull the control barrel from the body, noting the relationship between the pin on the end of the control barrel and the corresponding hole in the flow control compensator.
The control barrel has two O-rings. These may be gently removed to ensure the entire surface of the control barrel is accessible for passivation. There are two schools of thought on removing these O-rings. Some will remove them and some will recommend not risking damage to the O-rings believing that the solution will reach anywhere the beer will. This is a personal decision and the implications and risks should be considered.
Set the flow control barrel aside, this is the second piece to be passivated. At this point the flow-control compensator (9) should freely slide out of the rear of the faucet. Removal of the coupling gasket (8) is not necessary. The flow-control compensator is the third and final piece to be set aside to be passivated.
The Mix
Lye solution, especially as it gets hot, will cause severe burns to skin, eyes, and mucous membranes (Certified Lye, 2013). It is a severe caustic substance and will ruin your day. It is used in soap making and a lot of people use it safely every day with reasonable precautions, so have a look on the Internet for Lye Safety and have a good read before messing with it. One such article is the Soap Queen’s Back to Basics: Lye Safety Guide (White, 2015). Regardless, it is pretty nasty stuff so do yourself a favor and make this a beer-free endeavor. You can RDWHAHB afterwards.
If you have at least two containers, prepare them ahead of time to make things go more smoothly. If not there’s no time-critical nature to the process and you can do it as you go along. In one of the containers prepare a 5% lye solution, in one prepare a 10% citric acid solution. To prepare either solution, follow these steps:
Don your safety gear (glasses & gloves at a minimum).
Mark your container with the name of the solution you intend to make (5% Lye or 10% Citric).
Place your container on your scale and tare the scale.
Pour ~300 grams of distilled water into the container. The exact amount is not important, measuring it is.
Multiply that weight by 0.05 if you are making the lye solution, and 0.10 if you are making the citric acid solution. g.: if you poured 312 grams of water and you are making the 5% lye solution: 312g * 0.05 = 15.6g
Tare the scale with a dry cup or plate. Measure that amount of the dry chemical (in this case 16g of lye) into the cup or plate.
Pour the chemical into the water (NOT the other way around, EVER!) and stir until it is in solution. Lye dissolving into water will create heat. Do not let the undissolved lye rest on the bottom of the container or it will create localized heat and potentially crack the container. If stirred, this amount of lye will not create enough heat to cause a problem. Do this in/over the sink in case of accidental spillage or breakage.
Set the marked containers back from the edge of the counter to prevent accidents, and proceed.
You’ve completed the hardest part of the entire process. You can reward yourself with a pat on the back and a deep breath of relief. The rest is easy.
The Cook
First, give the parts a good cleaning with dishwashing detergent. The initial lye wash is more than likely going to remove almost anything that is on the parts, but I don’t know if it will remove keg lube for instance. Taking a few extra seconds is pretty cheap insurance. Use a brush to get the nooks and crannies. Once the parts are clean, place them in a dish or other container with your cheap alcohol which is used as a wetting solution.
Next, raise the temperature of your first 5% lye solution to between 160° and 180° F (70° and 80° C). I found this easiest to do in a double-boiler setup. I first raised a pot of water to boiling and then placed the flask containing the solution in the pot while turning the heat to low. Keep the outer water at 170° F (75° C) and swirl occasionally. It will take a few minutes for the temperatures to equalize so you can either measure the inner container, or give it about 5 minutes arbitrarily. After it has reached temp (or after 5 minutes) set your timer for 30 minutes and drop in the parts carefully to avoid splashing. Stir or swirl occasionally.
After 30 minutes has passed, fish or strain out your parts and give the parts a quick rinse with distilled water. Drop them back in the alcohol wetting solution as you prepare the next bath. Repeat this process with the 10% citric acid solution at 150° F (65° C) for 30 minutes, rinse and rest in the wetting solution while bringing the lye solution back to heat. Bathe in the 5% lye solution again at 160° to 180° F (70° to 80° C) for 30 minutes. After completing all three baths, you will have completed the process to remove the sulfur deposits and re-passivate your faucet parts.
You will also note that the second bath, the 10% citric acid, may generate some odor. This is a good thing. The odors we generate here are smells we will not get when we pull a beer. I did not notice the smell was as strong as it was when I had a cider on tap, but it was definitely noticeable so you will want to make sure you have the windows open or an exhaust fan running.
When it comes time to dispose of these solutions: Pouring the solutions down the drain poses no issues to your drains. Lye is commonly used to clear drains, and citric acid is generally regarded as safe (U.S. Food and Drug Administration, 2015). Be sure to check local regulations of course, and be sure to flush with plenty of cool water.
Assembly
Refer to Figure 1 above for an exploded diagram. Slide the flow-control compensator (9) in from the rear of the faucet. The open end goes in with the rounded end out. Note that there is a single hole in the smooth part on the side of the compensator that corresponds with the pin on the flow control barrel. This hole should be visible through the hole in the faucet body for the flow control assembly.
Replace the O-rings on the flow-control barrel. Slide the barrel into the side of the faucet. A thin coat of keg lube on the O-rings will help assembly. The post on the end of the barrel must engage the hole in the side of the flow-control compensator. Replace the compression bonnet hand tight on the valve assembly and tighten until snug. Replace the flow-control lever and verify operation of the flow-control valve. Turning the level should cause the flow-control compensator to move in and out of the rear of the faucet.
Slide the handle lever (5a) back into the faucet body with a slight forward motion and then to the back until it seats against the front seat (7). Ensure the flat sides of the threaded portion of the handle lever are oriented to the sides of the faucet, slide the bearing cup (4) concave surface down over the handle lever. The bearing cup fits into a recess into the faucet body when properly installed.
Re-install compression bonnet (2) hand tight only over the faucet body and handle lever. Re-install handle jacket (1) onto handle lever.
Summary
Again I want to be clear I’m not presenting data that is new. I’m not an expert at this and I don’t presume to be breaking news. I would not be able to share this were it not for the people who came before me. I wanted only to allow someone who might not yet follow what’s going on to be able to fix their faucets. Frankly it sucks to have to go through this and I think Perlick ought to own up to it. Until then, this is what we have.
References
Adventures in Homebrewing. (2016). Perlick 650SS flow control faucet. Retrieved from Adventures in Homebrewing: http://www.homebrewing.org/Perlick-650SS-flow-control-faucet_p_4896.html Agrazela. (2016, March 10). Examining possible solutions to issue of sulfur smell from Perlick 650ss faucets. Retrieved from HomeBrewTalk.com: http://www.homebrewtalk.com/showpost.php?p=7463562&postcount=17 C., S. (2016, March 13). Examining possible solutions to issue of sulfur smell from Perlick 650ss faucets. Retrieved from HomeBrewTalk.com: http://www.homebrewtalk.com/showthread.php?p=7468733#post7468733 C., S. (2016, March 16). Examining possible solutions to issue of sulfur smell from Perlick 650ss faucets. Retrieved from HomeBrewTalk.com: http://www.homebrewtalk.com/showpost.php?p=7472964&postcount=66 Certified Lye. (2013, May 1). Material Safety Data Sheet: Sodium hydroxide. Retrieved from Certified Lye: http://www.certified-lye.com/MSDS-Lye.pdf ESPI Metals. (2016, April 17). Stainless Steel 303 – Alloy Composition. Retrieved from Welcome to ESPI Metals: http://www.espimetals.com/index.php/technical-data/199-stainless-steel-303-alloy-composition Iowa State University Extension. (2004). The science of smell part 1: Odor perception and physiological response. Iowa State University Extension. Lindenmann, J., Matzi, V., Neuboeck, N., Ratzenhofer-Komenda, B., Maier, A., & Smolle-Juettner, F. M. (2010, December). Severe hydrogen sulphide poisoning treated with 4-dimethylaminophenol and hyperbaric oxygen. Diving and Hyperbaric Medicine: the Journal of the South Pacific Underwater Medicine Society, 40(4), pp. 213–217. Magee, J. H., & Mohr, R. K. (2016). Passivating and Electropolishing Stainless Steel Parts. Retrieved from Carpenter Technology Corporation. Perlick. (2014). Perlick Forward Sealing Beer Faucets. Retrieved from Perlick Corporation: https://www.perlick.com/files/8414/0423/2648/Forward_sealing_faucets_-_spec_sheet.pdf Shen, T. H. (2004, April 22). The Cleaning of 303 Stainless Steel. Retrieved from Lawrence Livermore National Laboratory: https://e-reports-ext.llnl.gov/pdf/307089.pdf U.S. Food and Drug Administration. (2015, April 1). CFR – Code of Federal Regulations Title 21. Retrieved from U.S. Food and Drug Administration: https://www.accessdata.fda.gov/scripts/cdrh/cfdocs/cfcfr/CFRSearch.cfm?fr=184.1033 White, E. (2015, July 20). Back to basics: Lye safety guide. Retrieved from Soap Queen: https://www.soapqueen.com/bath-and-body-tutorials/tips-and-tricks/back-to-basics-lye-safety-guide/
[1] Things to consider with these containers: Lye will generate a good amount of heat when added to water. Borosilicate labware is ideal for something like this. Mason jars are capable of withstanding quite a bit of heat however. If the lye is stirred in without letting it sit on the bottom of the jar for too long, it will be fine. Do not use Pyrex measuring cups for reasons that take too long to explain here. Erlenmeyer flasks such as you use for yeast starters are great for swirling, but harder for fishing parts out. Read through the guide and think about how you will work through each step before buying anything. [2] Tap water may be suitable if it is very low in minerals. It is safest to use distilled water especially given the very low cost for a gallon of it compared to the cost of one of these faucets.
(This article is being re-written for BrewPi Legacy Remix. Expect an update within a week or so – LCB on 1/9/19)
This will detail step by step instructions for installing BrewPi for an Arduino Uno. We start with a clean Jessie or Stretch install, prepped according to my previous articles.
Set Timezone (Change zone to proper one for your area:)
Area: America
Location: Chicago
Set WiFi Country (Assuming a US user:)
Country: US United States
Select OK and reboot
After the Pi reboots, open a terminal window:
Issue the following commands to ensure your software is up to date:
sudo apt-get update
sudo apt-get upgrade -y
Install support for Microsoft Terminal Server Client connections*:
sudo apt-get install xrdp
Issue the following commands to clean local repositories, deleting space used by downloaded archives:
sudo apt-get clean
sudo apt-get autoclean
Issue the following command to update the firmware of your Raspberry Pi:
sudo PRUNE_MODULES=1 rpi-update
Menu > Shutdown > Reboot; or:
sudo reboot
Your Raspberry Pi should now be accessible on the network via PuTTY and with Microsoft Terminal Server Client (mstsc) as “{servername}.local”. To validate name resolution, open a command prompt on another computer on the network and type:
ping {servername}.local
You should see something like:
C:\>ping brewpi.local
Pinging brewpi.local [192.168.1.110] with 32 bytes of data:
Reply from 192.168.1.110: bytes=32 time=418ms TTL=64
Reply from 192.168.1.110: bytes=32 time=197ms TTL=64
Reply from 192.168.1.110: bytes=32 time=27ms TTL=64
Reply from 192.168.1.110: bytes=32 time=681ms TTL=64
Ping statistics for 192.168.1.110:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 27ms, Maximum = 681ms, Average = 330ms
If you receive an error stating that the host could not be found, it may be that Bonjour services is not installed on your local computer assuming you use Windows. You can obtain Bonjour either by installing iTunes, or with the stand alone installer found here. Bonjour also enables accessing the BrewPi web page with “{servername}.local” without having to apply a static IP or remember an IP address. If you use Linux you will need libavahi; under Mac, Bonjour should be installed with the base OS.
RDP Errors
There is a new desktop interface called “Pixel” released with the latest Jessie, dated 2016-09-23. There is a bug between this and xrdp which a lot of us use to connect to our Raspberry Pi’s desktop with Microsoft Terminal Server Client (mstsc). It will connect to the familiar X window and hang, displaying something like this:
connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to sesman
login successful for display 10
started connecting connecting to 127.0.0.1 5910
error - problem connecting
If you press “ok” it will present you with a credentials prompt and if you re-enter credentials it will give the same error.
A “headless” install is now possible. Previously one needed to boot the Raspberry Pi in order to connect to wireless networking. This is no longer necessary. To do this, perform the following two steps while the SD card is mounted after flashing the boot image:
Create a file called “ssh” (without any extension) on the root of the boot partition of the SD card. This allows SSH to work on first boot, circumventing new behavior in Raspbian which disables SSH by default.
Create a file called “wpa_supplicant.conf” on the root of the boot partition of the SD card. In it, place the following information: