• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

HOWTO - Make a BrewPi Fermentation Controller For Cheap

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Status
Not open for further replies.
OK, Thanks for getting me straight. I DID read your post, but did not think it pertained to my Error message when I started a fresh new download from this forum's "How To" at the very beginning. I am a lifetime Plumber and HVAC tech, almost 60, so this programming language is a big learning curve to me. I know COBOL, RPG, FORTRAN, and BASIC (I think)...I did LOVE this back in the mid 1970's!! You remember the C> days? LOL!
Thanks for all your efforts day-trippr and Bigdaddyale! Something to these names??
NOW Back to my RPi 3B.....and hopefully a start of a Belgian Pale Ale, bottle conditioned soon....Getting tired, sort of, of kegged Kolsch's (6-10Gal. batches in a row!)
I guess the easiest way would be to just clone my "old" sd card and just use the new copy in my RPi 3
The Install procedures here on this Forum do not work and lead to broken pages, etc...It worked for me almost 3 years ago, so I am determined to attempt a new fresh SD card to run the new Pi, but am getting nowhere so far even after making the changes day-trippr told me to do.....yes, I did a reboot...

UPDATE!! 1-25-2019 I found a blog that gets your BrewPi up and running in an hour, instead of trying to fix the "install" links here.
GoTo - https://dotps1.github.io/homebrewing/2018/01/22/brewing-your-own-brewpi.html#disqus_thread

Very easy to follow and gets your BPi up fast and smooth!
 
Last edited:
Greetings all.

I'm looking for a couple alpha testers for a BrewPi Legacy related project. If you have an hour or two and would like to help, please let me know. You'd need at least a Raspberry Pi available for the test, preferably an Arduino and best case would be an Arduino with sensors set up. I'd like for you to be familiar with the way BrewPi works ideally, so that your feedback can be given in that context.

For your time you will get absolutely nothing except for the warm feeling that you will have helped the "Legacy" community. :)

Please ping me via direct message on this forum.
 
[edit]
Sorry 'bout that dot thing - I was going to tweak Lee about not checking that link I posted, but got interrupted by the delivery of a replacement for a failed DVR that I was anxious to get up and running, so I bailed.

Aaaanyway...Lee has put together a sweet looking BrewPi "legacy" installer that should cope with Stretch without the user haven't to get deep into fixing stuff. Drop him a line and check it out...

Cheers!
 
Last edited:
Ok, for the record, here's how to calibrate probes in BrewPi.
Assumes an RPi host with network connectivity, with the entire procedure performed remotely via Putty or equivalent terminal emulator.

- tie all probes to a trusted thermometer and allow to normalize
- use the BrewPi web gui to record the probe temperatures and note any variances from the trusted reading

- use the BrewPi gui to Stop the running Script

- open a Putty session and log into the RPi host
- if the program Screen is not installed on the RPi, install it as follows:

$ sudo apt-get update
$ sudo apt-get install screen

- use Screen to connect to the serial port used by the Arduino.
Note if you have a multi-instance configuration to be sure to use the correct port reference.
In this example I'm using a Bluetooth-connected Uno using rfcomm1.
For a single-instance, USB-connected Uno, the most likely ports used are either /dev/ttyACM0 or /dev/ttyUSB0.

$ screen /dev/rfcomm1 57600

There will be no indication that Screen is connected.

- dump the data associated with all probes:

h{v:1}

- probes are referenced using an index i with values of 0 through 2.
Examine the data stream dumped above, looking for each value of "i", and the corresponding temperature reading. The One-wire address of each probe is also provided to help correlate datasets with probes.

- apply the desired adjustment factor for each probe:

U{i:n,j:v.v}

where n=probe index (0 through 2) and v.v is the adjustment value (if negative, then -v.v).

For example, I applied a negative 1.4°F adjustment to a room temperature probe, using:

U{i:2,j:-1.4}

After applying the adjustment factor you can use the dump command to verify the setting.

- Disconnect Screen from the serial port using

ctrl-a, k then answering "y".

- Use the BrewPi web gui to start the script and verify the probe data has been adjusted as desired.

Cheers!
Hope you can help. I am trying to calibrate my temp probes per the instructions listed above. I am running a legacy version not the spark. I can install screen but when I put the command screen /dev/ttyACM0 57600 i get a message device or resource is busy. I have stopped the script running before starting this. Sorry my knowledge of programming is very basic so if you have a specific question about my setup maybe you could direct me how to find the info you might need ( version, build etc.) Thanks
 
Hope you can help. I am trying to calibrate my temp probes per the instructions listed above. I am running a legacy version not the spark. I can install screen but when I put the command screen /dev/ttyACM0 57600 i get a message device or resource is busy. I have stopped the script running before starting this. Sorry my knowledge of programming is very basic so if you have a specific question about my setup maybe you could direct me how to find the info you might need ( version, build etc.) Thanks
There's a calibration bug in the final legacy version of BrewPi (0.2.10), I posted a patched version of it here: https://www.homebrewtalk.com/forum/index.php?posts/8448192

Give that a try.

Cheers,

Kal
 
Okay folks, I've got a few things I'm ready to share which I hope will help some people.
  • BrewPi Remix - A re-release of Legacy BrewPi. This repository sports, most notably, a brand new installation method for Arduino users. One command, that's it, to start from scratch. Give it a go and tell me what you think. I'd call it a "public Beta" right now since nothing is ever bug-free, but thanks to a few folks on here I've had some test runs that went well. There are changes in all areas but aside from an uplifted logo, the installation should be the only difference most people see. Click the link, read the readme, and you should have everything you will ever need (no more Wikis needed! :)). I also purchased a little additional hardware to explore at least my appetite for creating an installer (or modifying the main installer) for multi-chamber support. I've no need of it personally, but from what I see it would not be horrible to do, and a lot of people seem to use it. Lots of people have forked BrewPi (86 forks of "Scripts") but as far as I know, nobody has re-released "mainline" support for Arduino. Yes there are brand new projects based on or inspired by BrewPi (Fermentrack is one notable and excellent runner in this category) but this re-release keeps it close to the original.
  • Headless Pi - A (Windows only) program intended to help set up a new SD card for SSH, OTG, and wireless operation. If you intend to use wireless LAN only, up until now you either had to create a couple of files and put them on the card manually, or (worse) plug in a keyboard, mouse and monitor to do your initial setup. No more! I don't think many BrewPi users are OTG users, but if you have a Pi Zero (or I think the old A and A+) it's a pretty cool way to play around with your Pi. Setting that up requires manually editing a couple files and one of them will brick your boot if you do it wrong. I was rather surprised nobody else ever made one of these. If you are not really a computer whiz, or you are trying to help someone else in that category, it may save some heartache.
  • Off With Her Head! - An article I wrote about setting up a Headless Raspberry Pi for the new Pi user. It features use of Headless Pi, as well as a couple manual methods of configuration. It covers as well how to access the Pi via SSH and using VNC for graphical UI fans.
As I said, hopefully this will help a few people out. I'm not going to go out and update any Wiki's or anything just now, but if you guys could help out by at least reading over (and maybe testing) what I've released, I'd appreciate it very much.
 
Package nginx-extras is not installed.
dpkg: error processing package nginx (--configure):
dependency problems - leaving unconfigured
Setting up arduino-core (2:1.0.5+dfsg2-4.1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Errors were encountered while processing:
nginx-full
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
*** ERROR ERROR ERROR ERROR ERROR ***
-------------------------------------
See above lines for error message.
Setup NOT completed.
*** ERROR ERROR ERROR ERROR ERROR ***
-------------------------------------
See above lines for error message.
Setup NOT completed.
*** ERROR ERROR ERROR ERROR ERROR ***
-------------------------------------
See above lines for error message.
Setup NOT completed.
pi@raspberrypi:~ $

Lee, the download stopped here above
 
Well first of all, congratulations on being the first one to break it! :)

However, I don't install nginix so I suspect your RPi was previously configured for maybe something else?
 
I deleted the partially installed files and then ran your second download path and got this error -
=exited, status=1/FAILURE)
Process: 9625 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Jan 30 14:25:42 raspberrypi nginx[9629]: nginx: [emerg] bind() to [::]:80 fa…se)
Jan 30 14:25:42 raspberrypi nginx[9629]: nginx: [emerg] bind() to 0.0.0.0:80…se)
Jan 30 14:25:42 raspberrypi nginx[9629]: nginx: [emerg] bind() to [::]:80 fa…se)
Jan 30 14:25:43 raspberrypi nginx[9629]: nginx: [emerg] bind() to 0.0.0.0:80…se)
Jan 30 14:25:43 raspberrypi nginx[9629]: nginx: [emerg] bind() to [::]:80 fa…se)
Jan 30 14:25:43 raspberrypi nginx[9629]: nginx: [emerg] still could not bind()
Jan 30 14:25:43 raspberrypi systemd[1]: nginx.service: Control process exite…s=1
Jan 30 14:25:43 raspberrypi systemd[1]: Failed to start A high performance w…er.
Jan 30 14:25:43 raspberrypi systemd[1]: nginx.service: Unit entered failed s…te.
Jan 30 14:25:43 raspberrypi systemd[1]: nginx.service: Failed with result 'e…e'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package nginx-full (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up php-mbstring (1:7.0+49) ...
dpkg: dependency problems prevent configuration of nginx:
nginx depends on nginx-full (<< 1.10.3-1+deb9u2.1~) | nginx-light (<< 1.10.3-1+deb9u2.1~) | nginx-extras (<< 1.10.3-1+deb9u2.1~); however:
Package nginx-full is not configured yet.
Package nginx-light is not installed.
Package nginx-extras is not installed.
nginx depends on nginx-full (>= 1.10.3-1+deb9u2) | nginx-light (>= 1.10.3-1+deb9u2) | nginx-extras (>= 1.10.3-1+deb9u2); however:
Package nginx-full is not configured yet.
Package nginx-light is not installed.
Package nginx-extras is not installed.
dpkg: error processing package nginx (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
nginx-full
nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
*** ERROR ERROR ERROR ERROR ERROR ***
-------------------------------------
See above lines for error message.
Setup NOT completed.
*** ERROR ERROR ERROR ERROR ERROR ***
-------------------------------------
See above lines for error message.
Setup NOT completed.
*** ERROR ERROR ERROR ERROR ERROR ***
-------------------------------------
See above lines for error message.
Setup NOT completed.
pi@raspberrypi:~ $
 
Well first of all, congratulations on being the first one to break it! :)

However, I don't install nginix so I suspect your RPi was previously configured for maybe something else?

I did have the partial install files from this thread from the instructions at the beginning. Your path did ask if I wanted to delete the same file that already exists and over write it, I said Y and got the second error above from it
 
Okay, two ways forward: Start with a fresh card, or if that's not a good path for you let me know and I'll look at the other installer and see what needs to be hacked out to make the Legacy version work.

The new versions of BrewPi use nginx and that's undoubtedly a conflict since we use Apache2.

ETA: None of the regular install scripts, even the new ones, use nginx. The ones that do are in a Docker container so that should not conflict. You sure you didn't try to install Fermentrack first?
 
Last edited:
Okay, two ways forward: Start with a fresh card, or if that's not a good path for you let me know and I'll look at the other installer and see what needs to be hacked out to make the Legacy version work.

The new versions of BrewPi use nginix and that's undoubtedly a conflict since we use Apache2.

My sd card is from a year-old Canakit NOOBS. So I can reformat it and start a new. Will have to get RaspberryPi up on it first then retry your git-LeePi !
 
Follow the instructions I posted in a link up there called "Off With Her Head!" to start fresh. Then, after you connect via SSH the first time, start again with the wget command from the new installer.
 
Based on the above, I've cobbled together some nginx cleanup in the script as well. "It works here" but obviously when we get really complex, it gets really complex.

I think with something like a Raspberry Pi we have to assume some simplicity and dedication to purpose. I've not really understood why some people want to run RPints and BrewPi and all the other things on the same Pi when they cost so little. I'm not going to script against it, I'm just not going to script to facilitate every possible permutation. If someone is crafty enough to run all that on the same box, they can stay crafty and figure out a manual install for themselves.

At least until I decide to containerize this anyway. ;)
 
fwiw, wrt your question, it's a simple matter of integrating functions that should (and do) play well together and thus having only to manage a single complex instead of a multitude. Taken to an extreme the single-function model would break with a multi-chamber BrewPi setup, never mind running a tap list along with BrewPi. I'd have five RPis in the shop just to handle the four chambers and the keezer instead of just one. Now that'd be nuts :)

Cheers!
 
Not much of an argument, there just needs to be practical limits. Do a large number of people run multi-chambers? Apparently yes. How many run RPints? I'd argue less based purely on the thread sizes here. How many then run both? Even less I'm betting. I'm not going to actually do a Venn chart, but I have it pictured in my head. When you figure a Pi Zero W at what, $10? There's a low return on investment (never mind I'm working for free! :)).

HOWEVER ... once I figure a good way to script the multi-chamber, the whole issue of a "non-root website" goes away so integrating something else may be much less of an issue.

Take a guy like you who is taking it to the extreme with every gee-gaw ever invented .. I'd never catch up! ;)

A great way to take care of the Home Brew Tech-Sphere (I'm calling TM on that one!) would be to containerize everything. That way a person could go crazy with a swarm, or just a single Pi, and do whatever they like. You could have Fermentrack, RPints, BrewPi, all running together if you wanted. Not sure WHY you would want to but I won't put it past someone to justify it.

At this point I'm going to say I'll probably work on multi-chamber, will look at Bluetooth after that, and on the side I'm already playing with containers on a different project so there's a fair chance that happens. Mostly I just really like having something technical to chew on when I have some spare time. I've been off the front line for so long, this is really enjoyable to me and keeps me sharp.

(ETA: Consider though that when you have them all on one Pi, ALL of them are down when your SD card goes south or you let the smoke out of your Pi. That's not even considering the eventual incompatibilities between packages.)
 
Single point of failure has been considered - I was the project engineer in a company that built fault tolerant servers, after all ;)
Besides keeping a library of backup SD cards I have a complete spare machine running the same image on my desk from which I can either clone the SD card or swap out the entire rack-mount enclosure and be up in minutes. Databases are copied nightly to a NAS device so I'd never be more than a day behind.

The notion of a single Pi per application would multiply the expected failure rate from all causes by whatever "n" is...

Cheers!
 
The notion of a single Pi per application would multiply the expected failure rate from all causes by whatever "n" is...
It would increase the incident rate accordingly, true; but not the rate of a critical system failure. That would remain the same, any system you deem critical would still be subject to the same discrete failure rate. If one fermentation chamber is down and you have four with separate Pi's, you are operating at 75% capacity. Not all have to be running in order to use some of the systems, your statement would only be true if it took more than one Pi to run all of your systems. However, we're going far afield of the scope of beer I think. :)

I have been experimenting with a Pi NAS (NASPi?) onto which I've been doing centralized backups using rsync. I think I shared some early scripts with you. Maybe someday I'll release a less twitchy package for others to use. EVERYONE should be backing up their SD cards.
 
Question for you guys running all of those controllers with Legacy that are Not Arduino UNO / ATmega328P. When you view the output of:
Code:
udevadm info --a -n /dev/ttyACMx
... do they show as something other than "Arduino (www.arduino.cc)"? If so, does anyone have ANY idea how to find out how many permutations there are? Or there as as many as there are Chinese knock-offs? Or do they all say "Arduino" and then some other random crap?
 
Question for you guys running all of those controllers with Legacy that are Not Arduino UNO / ATmega328P. When you view the output of:
Code:
udevadm info --a -n /dev/ttyACMx
... do they show as something other than "Arduino (www.arduino.cc)"? If so, does anyone have ANY idea how to find out how many permutations there are? Or there as as many as there are Chinese knock-offs? Or do they all say "Arduino" and then some other random crap?

You're pulling the USB device info. Most of the knockoffs have one of a handful of serial-to-usb chips, but most don't report as Arduinos.
 
Hrmum .... well hell. How would one for sure find the right device (programmatically) in that tree no matter the depth I wonder then?

I suppose I’ve found a time where having some knock-offs would be a good thing. :)
 
What about this ... we start with:
Code:
udevadm info --a -n /dev/ttyACM*
or
Code:
udevadm info --a -n /dev/ttyUSB*
This should limit it to USB devices that provide a tty. This reasonable so far? Would this capture all Arduino boards? Would there be anything else it would capture? Then, the board should be the last device on the chain so the attribute {maxchild}=="0" would indicate the stanza of the Arduino's information.

Can anyone shoot holes in that?
 
Well, that's what I'm gonna try. Seems reasonable anyway. If any of you have a Pi (or even just a Ubuntu box) and a handful of knockoff Arduino's laying about available to run a test, please ping me?
 
OK Lee! Got a new SD card and your single line Legecy downloaded and the BPi-Remix is up............but will not run the Script...I have a good Internet connection on my Pi-3 since I downloaded and ran everything here, but checking my Log -

2019-02-02 16:12:02 Opening serial port.
2019-02-02 16:12:02 Notification: Script started for beer 'My First Legacy BrewPi Run'
2019-02-02 16:12:17 Checking software version on controller.
2019-02-02 16:12:17 Found BrewPi v0.2.4, running commit 2a6f7f05 build 40, running on an Arduino Uno with a revC shield on port /dev/ttyACM0
2019-02-02 16:12:17 Warning: minimum BrewPi version compatible with this script is 0.2.10 but version number received is 0.2.4.

Not sure what this means?? or if it has any to do with Script not running.

Thanks for keeping the Legacy going for us Grass Hoppers, like ME
 
Means ... the version of the firmware on your Arduino is old. It needs to be updated to 0.2.10. I assume when it prompted you to flash the Arduino you bypassed it?

No worries, enter this command:
Code:
sudo /home/brewpi/utils/updateFirmware.py
I cannot say if things will pick up and run right after that, I can't remember if I've tested this codepath yet. If, after you flash the controller it does not run, reboot with:
Code:
sudo reboot now
That should take care of you.
 
There's a calibration bug in the final legacy version of BrewPi (0.2.10), I posted a patched version of it here: https://www.homebrewtalk.com/forum/index.php?posts/8448192

Give that a try.

Cheers,

Kal

Kal
Thank you for the quick response. Two questions
1. What do I do with the link - sorry very limited programming experience. Once I down load the file how do I insert it into my PI? Will I have to do anything else or will this just incorporate into my current program/application?
2. New problem - my beer temp probe has been working fine but disappeared from the script this morning.. I went to maintenance panel and checked read values. The value was reading NULL . I changed the onewire (beer temp probe) to unassigned and function none and refreshed.
I now get a temp reading in the maintenance panel but not the script and I can not re-assign the probe to installed devices. I changed the device number back to 0 and assigned the probe to beer temp and applied and refreshed. At that time it goes back to unassigned, function none and device type none.
I will check my wiring tonight to see if anything has come lose.
 
Kal
Thank you for the quick response. Two questions
1. What do I do with the link - sorry very limited programming experience. Once I down load the file how do I insert it into my PI? Will I have to do anything else or will this just incorporate into my current program/application?
The easiest way to (re)flash a hex file is with Xloader: https://github.com/xinabox/xLoader
Plug you Arduino directly into your PC via USB and flash the new hex file.
 
Is there really no case for the brewpi? I found the one on thingverse but they don't see it.
 
Status
Not open for further replies.

Latest posts

Back
Top