CraftBeerPi - Raspberry Pi Software

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.
I got it, thanks. I just added a custom step with the code self.next(). I would love to be able to create multiple recipes though. Have not figured that one out yet.
 
I got it, thanks. I just added a custom step with the code self.next(). I would love to be able to create multiple recipes though. Have not figured that one out yet.
It's not built into CBPi 3 yet. Hopefully in 3.1. Currently you can only load brewsteps. You can not save the automation part.
 
Hey. I'm very new to the raspberry pi and I'm can't get my sensors to work. How do I know if the pi is reading my sensors and how do I get the individuals sensor address to get them to work in craftbeerpi? Any help is greatly appreciated.
 
Hey. I'm very new to the raspberry pi and I'm can't get my sensors to work. How do I know if the pi is reading my sensors and how do I get the individuals sensor address to get them to work in craftbeerpi? Any help is greatly appreciated.
I had to turn on the 1-wire interface in Raspberry Pi to get the sensors to work.
When logged into the Pi, click the Raspberry, go to Preferences and then select Raspberry Pi Configuration
In the window that pops up, click on the Interfaces tab and make sure that the 1-Wire is enabled. Then reboot and see if that helps.
If that's not it, have you checked your sensor connections? Are you getting +5 and ground where you expect them? I've heard that some sensors wire colors may not be the connections you expect to see.
 
I had to turn on the 1-wire interface in Raspberry Pi to get the sensors to work.
When logged into the Pi, click the Raspberry, go to Preferences and then select Raspberry Pi Configuration
In the window that pops up, click on the Interfaces tab and make sure that the 1-Wire is enabled. Then reboot and see if that helps.
If that's not it, have you checked your sensor connections? Are you getting +5 and ground where you expect them? I've heard that some sensors wire colors may not be the connections you expect to see.


Thanks for the help. I figured it out. One of my sensors was bad so the Rpi wasn't sensing any of them.
 
In the folder "brew_steps" you will find the init.py. Replace the self.stop command with this one. I would recommend saving a copy of your init file just in case you make a mistake!
 
If I have a water on/off 12v solenoid controlled by the Raspberry Pi, will Craftbeerpi be able to automate it's use? Not just be a button in the GUI to energize it...but have it automated with other conditions.
Specifically, I built one of the boil steam condenser systems and I want to use a 12v solenoid to turn the water on to the condenser when I'm in the boil phase.
Can I get this to automatically be energized, pumping water when boiling mode? I don't see how to do this in the Craftbeerpi GUI.
 
Last edited:
If I have a water on/off 12v solenoid controlled by the Raspberry Pi, will Craftbeerpi be able to automate it's use? Not just be a button in the GUI to energize it...but have it automated with other conditions.
Specifically, I built one of the boil steam condenser systems and I want to use a 12v solenoid to turn the water on to the condenser when I'm in the boil phase.
Can I get this to automatically be energized, pumping water when boiling mode? I don't see how to do this in the Craftbeerpi GUI.

Yep, there are a number of ways of doing this. One is using a brew step. The other is to set up another "kettle" which shares the temperature sensor of your actual kettle, with it's actor set to the solenoid, and set the logic to hysteresis such that the solenoid will be energized whenever over a certain temperature threshold. You could also write a plugin for a custom KettleController (if one doesn't already exist, it may, I haven't checked) it would be a good application of the plugin system.
 
Yep, there are a number of ways of doing this. One is using a brew step. The other is to set up another "kettle" which shares the temperature sensor of your actual kettle, with it's actor set to the solenoid, and set the logic to hysteresis such that the solenoid will be energized whenever over a certain temperature threshold. You could also write a plugin for a custom KettleController (if one doesn't already exist, it may, I haven't checked) it would be a good application of the plugin system.
If I add a step in the Brew, won't it just take turns going through the steps? So, if I want a 1 hour boil, but also want the water solenoid on for that SAME 1-hour time period, will it do both at the same time? Or will it do one first and then the other? ie. 1 hour water solenoid (then turn off after 1 hour) and then a 1 hour boil?
I have to say, I'm not a programmer and would have no clue how to write some plugin like that.
After looking through the plugin list, maybe the GROUPS plugin might work? Or the TOGGLE STEP plugin? Or maybe the TIMED AGITATOR plugin?

I'm thinking the Toggle Step - like this below?
Capture.PNG


Well, my steps aren't correct, but maybe you get the idea.
 
Last edited:
Can anyone point me to what folder the program is saving the order of my brew steps? It must be writing that info somewhere in the files.
 
I see there is a cbpi-pt100 setup for max31865. I have some thermocouples and MAX31855's laying around. Could anyone provide thoughts on getting these to work in CBPI? I was able to get the sensors working using Adafruit's tutorial on the MAX31855 using python but I can't seem to get them to show up in CBPI. I'd like to get 3 working. The 31855 has 5 connections coming off of it (GND, VCC, SCK,CS,SO).
 
Anyone know the answer to where the order of the steps are being saved?

Also, do not update to 3.1 alpha! broke everything for me. I am going to have to start imaging my SD card.
 
it was running 3.1 alpha and then running 'pull update' that screwed everything for me...

Someone want to come up with a 'cold mirroring' script? run the script from the command line and it makes sure that the SD on another networked pi is mirrored? just run it before updating.. might be best to run it from the standby unit so it only has to read... @$10 for a ZeroW and $8 for a SD card, no issues with what OS/version someone is using, it is cheap insurance for both hardware and software...
 
I see there is a cbpi-pt100 setup for max31865. I have some thermocouples and MAX31855's laying around. Could anyone provide thoughts on getting these to work in CBPI? I was able to get the sensors working using Adafruit's tutorial on the MAX31855 using python but I can't seem to get them to show up in CBPI. I'd like to get 3 working. The 31855 has 5 connections coming off of it (GND, VCC, SCK,CS,SO).

The board has 6 connections.
GND => GND
VCC => +5V
SCK => SPI_CLK GPIO11
SI => SPI_MOSI GPIO10
SO => SPI_MISO GPIO9
CS => any GPIO usual GPIO8 is configures in the sensor setup menu.
 
If you are trying to use Hysteresis and it does not seem to work, it is not you, in the procedure that processes the instructions, the code has what appears to be a safety step at the end to turn the Actor off, but this breaks the function of the hysteresis doing nothing in the deadband.

I have submitted a pull request on github, but it may take a while.

Here is the command line steps to put in to make it work. Yes, it might make an update to a newer version fail, but it fixes the problem.

sudo /etc/init.d/craftbeerpiboot stop
sudo sed -i.bak -e '37,38d' /home/pi/craftbeerpi3/modules/base_plugins/hysteresis/__init__.py
sudo shutdown -r now


To undo so 'pull updates' work:

sudo /etc/init.d/craftbeerpiboot stop
cd /home/pi/craftbeerpi3/modules/base_plugins/hysteresis/
rm __init__.py
cp __init__.py.bak __init__.py
sudo shutdown -r now
 
Moving into a new house soon, and am going all electric for my brewery. I've settled on a Craftbeerpi to run my single vessel biab setup. Looking at a 40a SSR for a 5500w element, and 25a for the pump. Pretty simple setup.

I'd also like to setup my fermentation chamber to be controlled with Craftbeerpi. This would be replacing my existing inkbird controller. Is the software stable enough to be running a batch while leaving my ongoing fermentation as is? Should I just build two separate Pi units? Fermentation would be two 25a SSR's for heating / cooling.
 
I would use a separate unit. I lost count of the number of times I had to reinstall CBPi software. And you should probably use a UPS for fermentation. I had a CBPi running my fermentation chamber, but everytime the power went out, it would default to "off". I switched back to an ITC1000. Simpler and foolproof.
 
one is fine, but if you forego an expansion board in favor of using the GPIO pins on the Pi directly to the 2 SSRs or a powered relayboard, you can easily afford a Pi3B+ for the brewery controller, a PiZeroW for the fermenter, and another PiZeroW for tinkering on and making extra SD cards all prepped for an accident on brewday...
 
Think I'm set to order my materials, have a few more questions I can hopefully get answered. Going small and simple, only controlling a chugger pump and 5500w element.

If I buy a Raspberry Pi Zero W and a Terragady board I do not want a Zero with the pins in the gpio since that's where the Terragady connects?

Do I need any fuses or resistors before / after the 25A SSR for the pump or 40A SSR for the Element?

More or less following the schematic in post #780. Anyone care to take a look at my parts list and let me know if I'm missing anything besides wire? https://docs.google.com/spreadsheets/d/11CyFcNzmenveUIdCWLkRfxgVPEWPOFkiZkWU0cUPyfA/edit?usp=sharing
 
Last edited:
Get the pins either way on any Pi... including the PiZeroW... (do not get a regular zero...) get 3 SD cards...

What function are you getting the expansion board for that the Pi cannot do itself? With a resistor and jumper wires it can easily connect the temp sensors and 2 SSR's... For the cost of any completed expansion board you can get a few extra PiZeroW's. (you would use a 5V power supply then, FYI)

The PiZeroW and a case with velcro on it stays put... you add an expansion board and mounting becomes a hassle...



The main power switch at 30A would be fine protection for the system and the element, a 5A or smaller for the pump and small fusee for the Pi...

Dernord on amazon has that element for $60
 
Last edited by a moderator:
@teamrushpntball - everything looks good, I would also recommend buying additional SD cards,

@clearwaterbrewer - The expansion board delivers a guaranteed solution and piece of mind, especially when dealing with high voltage. How is mounting a hassle when the Pi has four mounting points which line up with the expansion board perfectly with bolts...not tape / Velcro. Plus the board allows one source of power (12V) and if you have shitty SSR's from china good luck getting them to turn on with 5v. I may be a little biased...but hey the solution I provide is a no-brainer to most.
 
That expansion board is bigger than a Pi zeroW. If you ask me it just adds an extra layer of unnecessary complexity. If you have an SSR that wont work directly from a Pi board, it's the SSR, not the board. Mager SSRs I use all work fine on the 3v directly from GPIO pins. No need to Rube Goldberg it with more layers, but thats just my preference.
 
I have two of the boards that I bought to learn with, a 3 and a 5, The 5 is in use but getting replaced with 2 custom harnesses, one that has the thermometer resistor heatshrinked in, the other harness does a powered 8ch relay board.. I do have a couple SSR's, but they work fine, I think I have shown videos of it powering the $5 chinese SSR's on this thread...

When I built these there were people with the adjustable regulators that fried their rPi boards...... I do not consider that peace of mind one bit...

As far as mounting, he is talking about a PiZeroW, which is dwarfed by a cbp expansion board... but even on a Pi3B, all of the boards hang off the side of the rPi, it seems very kludgy... not 'sano' at all...

One thing that really gets me is that most of add-on boards use GPIO5 and 6, and since 2-8 are held high during boot... meaning you cannot use them for a lot things due to safety concerns...

Another annoyance? I think the screw terminals could be much smaller, say, the size used on a BCS. We are not dealing with 14ga wire here...


Now, on the positive side, a pi3b board with the *exact same outline as a Pi3B*, that had smaller screw terminals for the one-wire, 3-4 SSR's, some *inputs*, keep the fixed 12v-5v regulator, add a way to stack 4 RTD daughterboards (or more) on it without much hassle, and uses the higher number GPIO's... Maybe add in a 10-pin header that matches the common 8-relay boards, then you are talking plug and play... I will order as soon as you make that...
 
Last edited:
A nice thing about the expansion board is the 12V power for RPi and SSR.
You can put a 12V 4 or 7A battery with a simple resistor/diode charger and there is the UPS.
 
Hi guys, could someone please help.
I'm a bit new to this but i have installed CBPi and it wouldn't autorun, and I couldn't get the web interface to start using http://IPADD:5000/. I have tried reinstalling the pi OS and reinstalling CBPi, making sure to select the 'run automatically after boot' but to no avail. Nothing happens on booting the Pi.
I tried starting it manually but the get the "no module named flask" so I installed flask using the "sudo apt-get install python-flask" and tried again and got the following.
Code:
pi@raspberrypi:~/craftbeerpi $ sudo python runserver.py
Traceback (most recent call last):
  File "runserver.py", line 4, in <module>
    from brewapp import app, socketio
  File "/home/pi/craftbeerpi/brewapp/__init__.py", line 2, in <module>
    from flask_sqlalchemy import SQLAlchemy
ImportError: No module named flask_sqlalchemy

If anyone could shed some light on this it would be great.
 
Hi guys, could someone please help.
I'm a bit new to this but i have installed CBPi and it wouldn't autorun, and I couldn't get the web interface to start using http://IPADD:5000/. I have tried reinstalling the pi OS and reinstalling CBPi, making sure to select the 'run automatically after boot' but to no avail. Nothing happens on booting the Pi.
I tried starting it manually but the get the "no module named flask" so I installed flask using the "sudo apt-get install python-flask" and tried again and got the following.
Code:
pi@raspberrypi:~/craftbeerpi $ sudo python runserver.py
Traceback (most recent call last):
  File "runserver.py", line 4, in <module>
    from brewapp import app, socketio
  File "/home/pi/craftbeerpi/brewapp/__init__.py", line 2, in <module>
    from flask_sqlalchemy import SQLAlchemy
ImportError: No module named flask_sqlalchemy

If anyone could shed some light on this it would be great.

You look like you are running CBPi2.

This error indicates you are missing a dependency - sql alchemy. Did you run the install.sh script? That script should have installed all dependencies for you. To do this, within terminal, navigate to your CBPi folder and run:

sudo ./install.sh

Alternatively, you could just run the part of that script that installs dependencies, which I've copied below. This would also need to be run in the CBPi folder.

pip install -r requirements.txt
 
I had the same issue. I reran the installer and that seemed to fix things.
 
How does the terragady board connect to the pi? Pins I understand, but how does it power the pi? Or does it power the pi through the pins (I thought they could only handle very little?)
 
Last edited:
How does the terragady board connect to the pi? Pins I understand, but how does it power the pi? Or does it power the pi through the pins (I thought they could only handle very little?)

The Terragady boards connects to the pi with the 40 pin GPIO, it also powers the pi through PIN 2 on the GPIO via your 12v connection to the Terragady board. The board comes with an adjustable MP1584EN 3A buck which we set to 5v. This allows you to use the full 12v for pumps and turning on / off ssr's and also the 5v to power your pi and temp sensors.
 
Question about CraftbeerPi operation. I'm using v3.0. I do BIAB brewing.

What logic should be used on the kettle? Will mashing and boiling use the same logic?

I'm using a 5500w electric element on an SSR. I have a Terragady board.

Today, I tried to run a boil-off rate test with the boil steam-condenser found in another thread here at HBT. I did not use the "Auto" feature of CBPi, but instead just hit the button to turn on the heater. I tried adjusting the power down, since I left the cover on during boil. Whatever I set the power % to - whether 100, 50, 35 or 1%, the temp of the water didn't change after 5+ minutes with the pump still running. I didn't notice any difference in temp. That made me question if the power percentage change I was making in the GUI was really doing anything. And that got me wondering about what boil logic I should be using.

It is currently set to Mod_PWM_Logic for the kettle/heat. Other options are Hysteresis, PID Arduino, PID AutoTune (probably not to use this one), PIDBoil and SimpleBoilLogic.

I don't want to use the "auto" feature during boil because I don't want to run my pump at that time, and my temp sensor is OUTSIDE the kettle and needs wort flow to get an accurate reading.

Because I'm using the boil steam condenser and will have the lid on during boil, I don't need it running at full power. What logic should I be using for both mashing and boiling?
 
I don't think I was running the Mod_PWM logic for both the kettle and the heating element. That may be one of the problems I had.
But, I suspect that if I don't want to run my pump during boil, that Mod_PWM would NOT be the logic to choose, since it's needs a current temperature to control the heating element. Since my temp sensor is outside the kettle, it'll always read low unless the pump is running.

I may just want to use the PIDBoil Logic and set the power to say, 30% during boil - right?

But, during Mash I should use Mod-PWM?

Or, how are other BIAB brewers using CraftbeerPi logic?
 
Last edited:
I did some more testing last night.

It seems that mash and boil really need two different logics in my case since I don't have a temp sensor in the kettle itself, but only outside the kettle in a Tee that the pump connects to. Mod-PWM seems to work very well for mashing. But then I'd have to use PIDBoil for the boil, so I can set the power level for a low rolling boil. Is this the way most people are using Craftbeerpi? Different logic for mash vs. boil?
 
Back
Top