This post may contain affiliate links. Please see our disclaimer for more info.
I’ve been homebrewing for a few years now. One excellent quality control in my brew process that I’ve found is maintaining a proper fermentation temps. I use a mini fridge for my fermentation chamber – it works great. I received this mini fridge a few years ago, but it was broken. The control unit was dead, but the compressor worked just fine. I rewired the fridge to use an Inkbird temp controller as the brains. This worked great for years, however it lacks a couple nice features – intelligence and accessibility. I wanted to be able to control my fermentation chamber and monitor it remotely. I did some digging and found CraftBeerPi (CBP) – a brewing and fermentation controller. So far I’ve been pretty pleased.
- Works on headless setup
- Low overhead (runs perfectly on a pi zero w lnk)
- Has designated fermentation controls
- Is extensible with add-ons
- Decent setup documentation and troubleshooting
- Open source
That’s not to say it comes without any problems – the primary developer of CraftBeerPi hasn’t spent much time updating v3 lately. Luckily there is enough community support out there to still get things up and running. Apparently the developer is working on v4, but there isn’t anything out there except a video demo or two. Manuel has made some great software – I hope he finds the time again to rejoin his work!
CraftBeerPi 2.2 vs 3
Version 3 is still technically a beta, but it’s the version of choice by many of the community. 2.2 works, but it has its issues as well. I could never get it running properly due to install issues with versions of Raspbian. I eventually switched to v3 and haven’t turned back. V3 has nice additional features, runs well enough, and has decent support from the community, so from my perspective, no reason not to use v3.
This guide is aimed at using a Raspberry Pi to run CraftBeerPi, but it could be run on a variety of devices. For my setup, I use the following:
- Raspberry Pi Zero – this is an amazon link, though you can likely find it cheaper elsewhere during a sale (think Pi day! March 14th)
- Zero Starter Kit
- Power Adapter (I use an iPhone one I had extra) – just about any AC to USB adapter will work. Aim for at least 1 amp, though I’m using a 750ma one without issue for CraftBeerPi. See this article for an analysis on power consumption.
- Download the Raspbian Lite image (you can download a desktop version, but it’s not necessary for this) to install on your pi. Some folks use the NOOBS installer, but I prefer my old fashioned image install
- Download Etcher – this is used to write the image properly to an SD card
- Flash the SD card with the Raspbian image within Etcher – v easy, follow the steps in app.
Depending on if you are running headless setup (no monitor/keyboard hooked up), you’ll want to follow some additional steps so the pi can automatically connect to WiFi and be accessible via SSH. If you are using your pi with a keyboard/monitor, skip the headless setup.
I googled and found many helpful links. The steps are:
- After flashing your SD card, unplug and replug it into your computer. You should see a volume named ‘boot’. This is a fat32 formatted volume so just about any OS can read/write on it.
- Create a file named ‘ssh‘ with no extension and no contents in the file. Save this file in ‘boot’ (no folders needed)
- Create a separate file named ‘wpa_supplicant.conf‘. This file will contain wifi info and credentials so the pi knows how to connect to your network. I’ve included an example of what this file looks like below, but see this page on directions on how to set up the file properly. I highly recommend not storing your wifi credentials in plain text, use the wifi hashing program
wpa_passphrasethat comes with Raspbian – see here for details.
- After you’ve saved these two files to boot, pop the SD card into your Raspberry Pi and power up! It’ll take a few minutes to get the first boot setup. Once it’s done, you’ll be able to SSH into your pi with the default credentials: user is ‘pi’ and password is ‘raspberry’. Change your password at a later time – DO NOT use the default password if exposing your pi outside of your local network.
- For non-headless setup, plug the SD into the Raspberry Pi and power up. It’ll run through some initial first boot setup then prompt for a login. Use the default credentials: user is ‘pi’ and password is ‘raspberry’. Change your password at a later time – DO NOT use the default password if exposing your pi outside of your local network.
- Use this page to set up wifi. I highly recommend not storing your wifi credentials in plain text, use the hashing program that comes with Raspbian – see here for details.
- Use the Raspbian config tool
sudo raspi-configto tweak any other options you may want enabled (such as ssh access)
Now that we are up and running with Raspbian, next is installing the software needed to run CBP. As mentioned before, CBP does not come without its problems. The biggest pain point is installing. Since the repo hasn’t been actively maintained, the install process is outdated. Not all of the required dependencies are properly installed – luckily it’s pretty easy to do manually to get things up and running.
- First run
sudo apt-get updateand
sudo apt-get upgradeget the latest packages and updates (this can take a LONG time on slower CPUs).
- Next install git by running
sudo apt-get install git
- Next clone the CBP repo by following the below steps per the readme. Depending on your setup, this can take 5-10 min. Enter the following commands:
git clone https://github.com/Manuel83/craftbeerpi3
- NOTE: Make sure to use craftbeerpi3 no craftbeerpi
- Then install from the menu. No need to have it run
apt-get upgradeagain but it can’t hurt.
- Additionally, if you are prompted for installing one-wire support, select yes if you plan to do so (most CBP setups use this)
- Now comes the fun part! Depending on how much is outdated when you are trying to install, not all the dependencies are installed properly with the CBP installation. Instead of running CBP from the install.sh script, try running
sudo ./run.py. This will attempt to start CBP, but you’ll be able to quickly see the error trace on the console (vs having to dig in a file). At the bottom of the error trace, you’ll see something along the lines of
ImportError: No module named xx. The ‘xx’ is the component we need to install.
- In order to install the missing components, we need to install pip first. Pip is the python package manager. Run
sudo apt-get install python-pipto get it installed.
- The steps from here are iterative as follows:
sudo ./run.py– see what component is missing
sudo pip install xxwhere ‘xx’ is the missing component from step 1 above
Here’s the code below that I needed to run to get CBP working early September 2019.
UPDATE March 2020: Thanks to the commenter Paul Grimes and Dominick pointing out a few script typos and that the gitdb PyPI package that CBP3 requires was updated early March 2020, and now is only compatible with Python 3.4 or greater. To get gitdb to install, you need to specify the version – added below.
sudo apt-get install python-pip -y #thanks dominik! sudo pip install flask sudo pip install flask_socketio sudo pip install flask_classy sudo pip install PyYAML # use when module 'yaml' can't be found sudo pip install GitPython # use when module 'git' can't be found sudo pip install requests sudo pip install gitdb2==2.0.5 #thanks Paul!
Once you see the line
INIT DB after running run.py, CBP is running. SUCESSS! We want CBP to run as a daemon (on it’s own), so terminate run.py by pressing
ctrl-z. Then run install.sh again and start CBP from here. You can also set CBP to autostart at boot from here.
Once CBP is all set up, access it via port 5000:
- Locally (on your pi) – 127.0.0.1:5000
- Remotely (from a different computer) – use the Raspberry Pi IP address. e.g. 192.168.0.137:5000
Next, follow the hardware setup instructions on CBP to start getting your hands dirty. Also take a look at the add-on plugins available – there are a bunch of them. Install them from within CraftBeerPi. Here are the ones I use: