HOWTO - Make a BrewPi Fermentation Controller For Cheap

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Status
Not open for further replies.
I have a few questions about BrewPi...

1) Can the PID function be turned off such that it acts simply as a high-low limit switch (like an STC-1000)?
2) Can it be configured such that it only tries to maintain the temperature inside the fridge and ignores the temperature of the beer?

I will not be using this for homebrewing, but rather for a work project where I need a temperature controller that can accept temperature vs. time profiles.
 
I have a few questions about BrewPi...

1) Can the PID function be turned off such that it acts simply as a high-low limit switch (like an STC-1000)?
2) Can it be configured such that it only tries to maintain the temperature inside the fridge and ignores the temperature of the beer?

I will not be using this for homebrewing, but rather for a work project where I need a temperature controller that can accept temperature vs. time profiles.

1 - Kind of. That’s basically how the fridge constant mode works.

2 - Yep. That’s how the fridge constant mode works.

The problem is that there isn’t a “fridge profile” mode in BrewPi. One could be hacked in by edits to BrewPi-script, however, if one was so inclined. ;)
 
I have been using my brewpi setup for over a year and never had major issues. Last month we moved to a different house with a different internet provider. It's been a long time since I had to set up the brewpi and now I'm stuck to get the port forwarding bit working again.

In my local network I can reach the brewpi both with the page without controls (by just entering the device Ip adress) and the full control page by going to 192.168.0.x/admin.php. So all that stuff still works perfectly. BUT, with my previous provider port forwarding towards port 80 (default port on raspberry) worked straight away without hassle. Now with this new provider I tried about everything and still can't get the port to correctly forward to the device.

I want to try it from a different port (so not the default 80 port). But can somebody tell me where I need to change this in the brewpi installation so it listens to the new port?
 
I have been using my brewpi setup for over a year and never had major issues. Last month we moved to a different house with a different internet provider. It's been a long time since I had to set up the brewpi and now I'm stuck to get the port forwarding bit working again.

In my local network I can reach the brewpi both with the page without controls (by just entering the device Ip adress) and the full control page by going to 192.168.0.x/admin.php. So all that stuff still works perfectly. BUT, with my previous provider port forwarding towards port 80 (default port on raspberry) worked straight away without hassle. Now with this new provider I tried about everything and still can't get the port to correctly forward to the device.

I want to try it from a different port (so not the default 80 port). But can somebody tell me where I need to change this in the brewpi installation so it listens to the new port?

I had an internet provider which did the same thing (blocking incoming traffic on port 80) so I think you may be on the right track. You've got two options on how to do this --


Change the Port Forwarding

For my router at least, when setting up the ports to allow through/NAT redirection, there's a "from" and "to" port. I think I've seen this on a number of routers. If you set the "from" port to something other than 80 and set the "to" port to 80, you should achieve what you want without having to touch your Apache configuration. For me the setting looks like this:

Screen Shot 2018-04-24 at 7.58.25 AM.png


Change the Apache Port

If your router can't support port redirection (or you don't have a router) you can also change the port that Apache listens on (assuming you're using apache which most BrewPi installations are). Take a look at the answer to this question on StackExchange and it should explain how to do that.
 
If I were to implement this function, I'd ditch the Pi and Arduino and go with just a $10 ESP32.
It can do both the temp controlling and web/internet stuff. No unix/Pi required.

You could always take a stab at porting @pocketmon ’s BrewPiLess to the ESP32. It’s basically what you’re describing.

That said, unless you either have a need for the extra pins/radio or want the project, I would give the ESP32 a bit more time to mature before taking the project on, and stick to the ESP8266. From my experience the tool chain still isn’t anywhere near where the Arduino or ESP8266 are.
 
You could always take a stab at porting @pocketmon ’s BrewPiLess to the ESP32. It’s basically what you’re describing.

That said, unless you either have a need for the extra pins/radio or want the project, I would give the ESP32 a bit more time to mature before taking the project on, and stick to the ESP8266. From my experience the tool chain still isn’t anywhere near where the Arduino or ESP8266 are.

I'm busy working on a much bigger project right now. I'll announce it here when I finish up the prototype.
Basic unit uses the 8266, full blown needs the 32. Board is socketed to accept either.
Tool chain hasn't really been a hindrance since I'm writing my own device drivers. Other libraries I need already work.
 
I'm busy working on a much bigger project right now. I'll announce it here when I finish up the prototype.
Basic unit uses the 8266, full blown needs the 32. Board is socketed to accept either.
Tool chain hasn't really been a hindrance since I'm writing my own device drivers. Other libraries I need already work.

Huh. That's good to know. The last time I tried cross-compiling something it failed miserably, but admittedly that was a few months ago. I've got a different project I picked up the ESP32 for which I'm working on now, which explicitly won't work on the ESP8266 (it requires the bluetooth radio). I'll have to try again here later.
 
Ordered 4/16. Relay board, pin connectors, uno and probes showed up today. Waiting on the 100 resistors I bought and all I need is a cord, a box and an outlet.
 
216872C3-D121-49D6-BE02-B312312F28A3.jpeg

Resistors showed up yesterday. Started putting it together last night. The probes are shorter than I thought they would be. Even the wires are shorter than I expected. Oh and soldering the 3 pin aviation connectors kind of sucked. Hopefully there isn’t so much solder it’s touching the metal housing and connecting all 3 pins in a circuit.
 
Okay I have it wired up and plugged in. The Fermentrack recognizes the temperature sensor and the 4 available pins. I set it to heating and cooling relays and the sensor to beer temp but it tells me it cannot heat or cool. Wiring problem?
 
Okay I have it wired up and plugged in. The Fermentrack recognizes the temperature sensor and the 4 available pins. I set it to heating and cooling relays and the sensor to beer temp but it tells me it cannot heat or cool. Wiring problem?

If you only have 1 temperature sensor, it must be assigned as the "Fridge Sensor". BrewPi doesn't work with only a single sensor assigned as "beer sensor"
 
So if I use brewpi currently is it work redoing setup and using ferment track does this still use brewpi algorithm for heating and cooling is that why you still install the brewpi flash but install the ferment track software instead also does anyone have the ft UI I can't find any screen shots of what the graph and stuff looks like. Is it more modern
 
Stupid question...if the UNO is programmed does it need to remain plugged in to the Raspberry pi?
 
Stupid question...if the UNO is programmed does it need to remain plugged in to the Raspberry pi?

Kind of. If the Uno is programmed but unplugged, it will maintain the last temperature setting as if it was in "beer constant" or "fridge constant" mode. It will NOT proceed through a temperature profile.
 
I'm running the raspberry pi / Arduino setup (see page 1 of this thread) to control my fermentation chamber and would like to integrate raspberry pints with flowmeters on the same raspberry pi. Has anyone done this and if so can they share their lessons learned / wiring diagrams?
 
I have RaspberryPints with flow meters along with four BrewPi Arduino instances running on an RPi2B with Raspbian Wheezy.
The BrewPi instances control my keezer via USB and my three brewery fridges via Bluetooth links.

As long as you are using Raspbian Wheezy or Jessie there's not much to putting it all together, no real tricks involved, the only thing to avoid is installing Raspberry Pints on top of BrewPi if your BrewPi.www installation was to the Apache2 DocumentRoot folder (on Wheezy that was /var/www, on Jessie it was /var/www/html) as both packages use index.php as their root document file name. As I run multiple BrewPi instances that would conflict with each other nevermind other packages I use subordinate folders for their files (eg: /var/www/brewpi1, /var/www/brewp2, etc), let RaspberryPints own the /var/www folder, and just add the /brewpi(n) instance to the end of the url (eg: 192.168.1.245/brewpi1 will get me into the first BrewPi instance on the host system).

If you're using an original Stretch, however, you'll run into a problem as RaspberryPints uses phpmysql5 with a database connection method that was eventually deprecated in phpmysql7 - AND Raspbian Stretch removed phpmysql completely and replaced it with mariadb, which RaspberryPints does not like.

There is a chance that one can install phpmysql5 on an original Stretch OS. It's an experiment I intend to pursue at some point.

Otoh....If you upgraded an SD card from Jessie to Stretch there's a good chance phpmysql5.7 is still installed, which would solve everything :)

We have a long running thread here https://www.homebrewtalk.com/forum/...spberrypints-digital-taplist-solution.487694/ and we've recently gotten into the whole Stretch conundrum...

Cheers!
 
Just a heads up on a component that might have been attractive to others.

71Kelu7T6wL._SL1500_.jpg


This 220VAC 10A rated bulkhead with integrated switch and fuse holder is cursed by a switch module that is actually under-rated for the rest of the assembly - my research shows it's 7A at best and more likely 5 or 6A. I've had three of these suffer switch failures (burned out in various fashions - the latest one literally melted off the hot side external terminal!) Bypassing the switch modules results in a stable, 10A fused configuration - but then requires a line cord pull to shut down.

I'm not quite pissed but definitely displeased. It's not like the seller could have missed the down-rated specs on the switch module.
Anyway, best avoided...

Cheers!

[edit] It's 6A @220VAC, printed right on the switch module :drunk:
 
Last edited:
I have RaspberryPints with flow meters along with four BrewPi Arduino instances running on an RPi2B with Raspbian Wheezy.
The BrewPi instances control my keezer via USB and my three brewery fridges via Bluetooth links.

As long as you are using Raspbian Wheezy or Jessie there's not much to putting it all together, no real tricks involved, the only thing to avoid is installing Raspberry Pints on top of BrewPi if your BrewPi.www installation was to the Apache2 DocumentRoot folder (on Wheezy that was /var/www, on Jessie it was /var/www/html) as both packages use index.php as their root document file name. As I run multiple BrewPi instances that would conflict with each other nevermind other packages I use subordinate folders for their files (eg: /var/www/brewpi1, /var/www/brewp2, etc), let RaspberryPints own the /var/www folder, and just add the /brewpi(n) instance to the end of the url (eg: 192.168.1.245/brewpi1 will get me into the first BrewPi instance on the host system).

If you're using an original Stretch, however, you'll run into a problem as RaspberryPints uses phpmysql5 with a database connection method that was eventually deprecated in phpmysql7 - AND Raspbian Stretch removed phpmysql completely and replaced it with mariadb, which RaspberryPints does not like.

There is a chance that one can install phpmysql5 on an original Stretch OS. It's an experiment I intend to pursue at some point.

Otoh....If you upgraded an SD card from Jessie to Stretch there's a good chance phpmysql5.7 is still installed, which would solve everything :)

We have a long running thread here https://www.homebrewtalk.com/forum/...spberrypints-digital-taplist-solution.487694/ and we've recently gotten into the whole Stretch conundrum...

Cheers!

I am also running Raspbian Wheezy on my Raspberry Pi B (original).

I'll take a look at the file structure to see what lives where this weekend and report back. I don't recall customizing my installation in any way so it's likely that my brewpi instance does in fact live in /var/www
 
Just a heads up on a component that might have been attractive to others.

71Kelu7T6wL._SL1500_.jpg


This 220VAC 10A rated bulkhead with integrated switch and fuse holder is cursed by a switch module that is actually under-rated for the rest of the assembly - my research shows it's 7A at best and more likely 5 or 6A. I've had three of these suffer switch failures (burned out in various fashions - the latest one literally melted off the hot side external terminal!) Bypassing the switch modules results in a stable, 10A fused configuration - but then requires a line cord pull to shut down.

I'm not quite pissed but definitely displeased. It's not like the seller could have missed the down-rated specs on the switch module.
Anyway, best avoided...

Cheers!

[edit] It's 6A @220VAC, printed right on the switch module :drunk:
With a little prying, the switch will pop out. 6a @250 and 10a@125 part number KCD1-104. Can the switch be replaced with one with proper specs? I just bought a bag of 10 of these things.
 
Yes, it would by default. A work-around would be to change BrewPi's index.php to brewpi.php. I believe you could then root R'Pints to /var/www without stepping on BrewPi, let R'Pints own the default index.php and append /brewpi to the url to access your BrewPi instance...

Cheers!
 
Yes, it would by default. A work-around would be to change BrewPi's index.php to brewpi.php. I believe you could then root R'Pints to /var/www without stepping on BrewPi, let R'Pints own the default index.php and append /brewpi to the url to access your BrewPi instance...

Cheers!

I will happily try this. I thought I could ssh into my box at home to take a look, but the workstation that I'm on at the moment doesn't allow me to turn on ssh features (admin lockdown).

Thanks for the insight.
 
With a little prying, the switch will pop out. 6a @250 and 10a@125 part number KCD1-104. Can the switch be replaced with one with proper specs? I just bought a bag of 10 of these things.

I haven't had a chance to dig into potential upgraded switch modules that would fit (and yes, when I popped one of mine out I was sad to have my concerns confirmed). My expectation is the housing and switch modules aren't quite so standard that one could randomly replace them, but that could be me being cynical ;)

There was a post in the last couple of days in the brew rigs forum showing the same form factor assembly - illuminated switch & fused - that allegedly has a switch module rated for a full 10A. Haven't gotten to confirming that, either.

I have used six of these units, two of them on my cold side management system and its backup clone, and the other four on BrewPi minions, and I've had to bypass the switch on all of the minions. It was quite bizarre - first, the neutral side fries - I had a couple of minions run for months with just the hot side switched, which means the indicator lamp doesn't work - but then eventually the hot side fries. That switch just can't handle even a modern, mid-capacity compressor...
 
Yes, it would by default. A work-around would be to change BrewPi's index.php to brewpi.php. I believe you could then root R'Pints to /var/www without stepping on BrewPi, let R'Pints own the default index.php and append /brewpi to the url to access your BrewPi instance...

Cheers!

Looks like I did in fact change my brewpi instance name:

pi@Weiss_Brew_Pi:~ $ pwd
/home/pi
pi@Weiss_Brew_Pi:~ $ ls /var/www
do_not_run_brewpi place PublicBeerPanel.php weisspublicpi.php
html private publicpanel

So I shouldn't have any conflict with spinning up Rpints in the default /var/www directory.

I'm working on it from the road so we'll see how it goes.
 
My brewpi just crapped out on me in the middle of holding a fridge constant. I noticed that the web interface would no longer work. I restarted it several times and tried three different power supplies, but no luck. The red and green leds on the Arduino stay lit and the red led stays lit on the pi. If I hook it up to a monitor, I see a bunch of stuff that means nothing to me anymore since I built this thing years ago. Does anyone know where I can start poking around?

0IOv3kj.jpg

So I re-imaged my SD card with Raspbian Wheezy as per these instructions (http://diybrewpi.wikia.com/wiki/Setting_Up_Your_RPI) and I'm still having the exact same problem (see screenshot above). Does anyone have any clues? Can this be a Raspberry Pi hardware problem? I am really at a loss here.
 
So I re-imaged my SD card with Raspbian Wheezy as per these instructions (http://diybrewpi.wikia.com/wiki/Setting_Up_Your_RPI) and I'm still having the exact same problem (see screenshot above). Does anyone have any clues? Can this be a Raspberry Pi hardware problem? I am really at a loss here.

If you have one, can you try a different SD card? That looks like filesystem errors, which would imply the SD card is bad.
 
If you have one, can you try a different SD card? That looks like filesystem errors, which would imply the SD card is bad.

Thanks, I may have to buy one. Can an SD card go bad all of a sudden after working for years?

Can anyone recommend a good, 8GB or larger SD card that can be found locally (Best Buy, Walmart, etc.)?
 
Any flash memory device can suddenly develop a fatal error - that's pretty much how they die.
Fatal errors can also be induced by improper shutdown or line power loss.

fwiw, I run Samsung and Sandisk 16GB class 10 (aka "Ultra Plus" and "UHS-1") cards here. They seem to be fairly equal wrt lifespan.
Perhaps more importantly, I keep a cloned and tested backup card for each of the nine RPi's I have running here.

Both Best Buy and Walmart carry Sandisk in their stores, and the latter often carries Samsung as well...

Cheers!
 
Thanks a lot. I'll try a new card tomorrow. How do you properly shut down a pi if you don't have a monitor and keyboard hooked up to it? I always just unplugged mine, and it worked fine for a few years, but I would rather shut it down properly if possible.
 
Yeah, that's pretty much begging for a croaked SD card. What can happen is the card is opened for a file system write by any of the multitude of processes that are running and the file system index gets corrupted as the power drops. Bad juju. Don't do that.

I rarely use the local console on any of my RPi systems (that'd be a crazy number of extra monitors in the house!) but they're all networked. So I use Putty for terminal sessions and WinSCP for file system manipulation and editing, both using SSH.
A "sudo shutdown -h now &exit" command issued via a Putty session is all it takes to cause an orderly shutdown...

Cheers!

[ps]@Thorrak nailed it, the file system can't mount the root file partition. "It's Dead, Jim"...
 
Last edited:
I put the image of my "bad" SD card on a new SD card and everything is back to normal. I didn't lose the brewpi setup or any of my old brews. I tested it out and the fridge heats and cools as it should. Maybe the pi was just having a hard time reading the card and it wasn't corrupted after all... not sure. The SD card was pretty full (7.7 GB on a 8 GB card). Could that have had something to do with it?

I have some brews on the card that I don't need anymore. Is there a way to delete specific brews?
 
Miraculous.

If you look under /home/brewpi/brewpi/data and /var/www/brewpi/data (or /var/www/html/brewpi depending on where you rooted the web side stuff) you'll find all of the data files for every brew you've done. I don't know why the data is replicated across those two folders but there you are. The file names should allow you to delete the ones you don't want to keep.

I don't think they take up a lot of space, however. The longest run I have ever recorded used a bit over 14MB. You could fit 70 of those in a gigabyte of card space.

Back to sd card failures...I have a well-retired Samsung GS4 with a 64GB uSD card that I've been using in my brewery as a music player feeding a Bluetooth speaker for the last couple of years. I used it Friday while getting ready for a brew on Sunday, then this evening I was kegging a batch and I wanted to have the music playing.

But, none of my player apps could play a single song from the card in the phone today. I couldn't copy anything to the card, couldn't delete anything either, stuck it in my peecee workstation and it couldn't change anything on it. Stuck it in the Spousal Unit's old GS4 and it couldn't do anything with it.

Fortunately, her old uSD card still worked, so I wiped it, rebuilt my mp3 collection on it, stuck that in my old phone. Et voila! I'll have tunes tomorrow :)

Cheers!
 
Last edited:
Ironically, there is a world wide shortage of multi-layer ceramic capacitors that is already causing major havoc across the whole electronics industry. This act of incredible stupidity isn't going to help.

Cheers! (He's Not My Megalomaniac)
 
I am having a problem with my wlan0 dropping. I sure thought I saw a solution in this forum, but my searches couldn’t find it. I seem to remember adding a crown job to check the WiFi or the status of wlan0 then restart it if necessary.

I reboot the pi and all is well, but after some time I can not access the rpi or BrewPi. I am using a rpi3 and turn off the power save mode in the rc.local file on boot.

Edit: I looked at the wifiChecker.sh script and noticed the check for “wlan0 auto” in the network/interfaces file. The checker says ifup doesn’t work well without it. I added auto wlan0 and rebooted and it has not dropped the WiFi connection for several hours.

Anyone know if the wifiChesker script is automatically added to cron? I am not familiar enough to really know what I’m looking at in Debian.
 
Last edited:
I've got a problem with calibrating the temp sensors...

I'm using an Uno with a RevC shield and the last Arduino version before it became legacy, 0.2.1.0. When using U{i:n,j:v.v} to adjust the offset, most values I use as v.v eg. 0.5 (U{i:3,j:0.5}) won't actually set the offset, it just remains at 0.000.

But, some v.v values seem to give random offsets, eg. 0.3 saves an offset of -0.250:
U{i:3,j:0.3} gives this result: U:{"i":3,"t":1,"c":1,"b":1,"f":6,"h":2,"d":0,"p":18,"a":"28FF1375641603CC","j":-0.250}

0.188 seems to be another common random offset...

Any ideas?
 
Status
Not open for further replies.
Back
Top