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.
Hi I'm trying to set up a Multiple Fermentation Chamber system. When i try the ls /dev/ttyACM* command I get no such file or directory. I've done a lot of searching but cant find the answer to my problems. I have cheap unos from ebay.

Could you provide a link to the "Uno" you bought?

Obviously, simply "pinging" the USB root ports for attached devices is pretty basic functionality. Even with a dodgy power scheme (eg: relying on the USB port to power the Uno) the thing should at least cough up an ACK.

Perhaps it'd be worth plugging something known to work into the host USB ports just to make sure they work?

Cheers!
 
Hi I'm trying to set up a Multiple Fermentation Chamber system. When i try the ls /dev/ttyACM* command I get no such file or directory. I've done a lot of searching but cant find the answer to my problems. I have cheap unos from ebay.

try

ls /dev/tty*

mine was ttyUSB0
 
When i try the ls /dev/ttyACM* command I get no such file or directory. I've done a lot of searching but cant find the answer to my problems. I have cheap unos from ebay.

Perhaps it'd be worth plugging something known to work into the host USB ports just to make sure they work?

And try a different USB cable. I could not get my cheap Inland UNO to be seen on a linux laptop (Could see it fine on a Windows 8 machine) until I switched to a better USB cable.
 
I am running into an issue installing on a RP2. I got to the steps following IsaacR454 mentioned earlier.

I get an error when trying to clone.


Cloning into '/home/brewpi'...
/home/brewpi/.git: No space left on device


I am using a 8gb card and all i have installed is raspbian wheezy and supporting brewpi things What do I do with this error?
 
I am running into an issue installing on a RP2. I got to the steps following IsaacR454 mentioned earlier.

I get an error when trying to clone.


Cloning into '/home/brewpi'...
/home/brewpi/.git: No space left on device


I am using a 8gb card and all i have installed is raspbian wheezy and supporting brewpi things What do I do with this error?
There should be plenty of space, of course. After you wrote the Raspbian image onto the card and booted it up did you run raspi-config and select option 1 to expand the filesystem?
http://elinux.org/RPi_raspi-config

If you didn't then that could explain the problem.
 
That was it! ok so i followed the instructions from IsaacR454. I went to my IP to upload the HEX file to audrino UNO. It says script not running. I click the button to start script but nothing happens.

This is the code Im trying to have in my CRON job:

* * * * * brewpi python /home/brewpi/brewpi.py --checkstartuponly --dontrunfile; [ $? != 0 ] && python -u /home/brewpi/brewpi.py 1>/home/brewpi/logs/stdout.txt 2>>/home/brewpi/logs/stderr.txt &

but its owned by root and has this in the file

stderrpath="/home/brewpi/logs/stderr.txt"
stdoutpath="/home/brewpi/logs/stdout.txt"
scriptpath="/home/brewpi"
entries="brewpi wifichecker"
# entry:wifichecker
*/10 * * * * root sudo -u brewpi touch $stdoutpath $stderrpath; $scriptpath/utils/wifiChecker.sh 1>>$stdoutpath 2>>$stderrpath &
# entry:brewpi
* * * * * brewpi python $scriptpath/brewpi.py --checkstartuponly --dontrunfile $scriptpath/brewpi.py 1>/dev/null 2>>$stderrpath; [ $? != 0 ] && python -u $scriptpath/brewpi.py 1>$stdoutpath 2>>$stderrpath &


is this correct? Please help me figure out why my script is not running.

I tried to upload the HEX file (brewpi-arduino-uno-revC-0_2_10.hex) and this is what it is saying " also script is not running"

Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 21, in
from BrewPiUtil import printStdErr
File "/home/brewpi/BrewPiUtil.py", line 22, in
import autoSerial
File "/home/brewpi/autoSerial.py", line 6, in
from serial.tools import list_ports
ImportError: No module named tools
Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 21, in
from BrewPiUtil import printStdErr
File "/home/brewpi/BrewPiUtil.py", line 22, in
import autoSerial
File "/home/brewpi/autoSerial.py", line 6, in
from serial.tools import list_ports
ImportError: No module named tools
Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 21, in
from BrewPiUtil import printStdErr
File "/home/brewpi/BrewPiUtil.py", line 22, in
import autoSerial
File "/home/brewpi/autoSerial.py", line 6, in
from serial.tools import list_ports
ImportError: No module named tools
Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 21, in
from BrewPiUtil import printStdErr
File "/home/brewpi/BrewPiUtil.py", line 22, in
import autoSerial
File "/home/brewpi/autoSerial.py", line 6, in
from serial.tools import list_ports
ImportError: No module named tools
 
Heres the UNO: http://www.ebay.com/itm/131648832689?_trksid=p2057872.m2749.l2649&ssPageName=STRK:MEBIDX:IT
I bought two and am having same problem with both.

So I tried using a new usb cable. Ive put my wifi dongle keyboard and mouse on usb hub, they all work great. I've directly plugged UNO into rpi. I tried codes $ ls /dev/ttyusb, $ ls /dev/ttyusb*, $ ls /dev/ttyusb0, $ ls /dev/ttyusb1, $ ls /dev/usb1*, $ ls /dev/ttyACM, $ ls /dev/ttyACM*, they all return ls: cannot access /dev/tty(whatever it was): No such file or directory.

When I go to $ ls /dev/ after I plug in UNO there is a ttyusb0 that wasn't there before I pluged it in. There is also a ttyusb1 if I plug both in. I've also plugged the UNO into a 12v wall power as well as the usb connection.I've tried all the codes every time I changed something.

Thanks for all your help.
 
this post should have never been posted....

Stupid forum....

or stupid IPAs over 7% ABV

Ruination you ruined me!
 
Heres the UNO: http://www.ebay.com/itm/131648832689?_trksid=p2057872.m2749.l2649&ssPageName=STRK:MEBIDX:IT
I bought two and am having same problem with both.

So I tried using a new usb cable. Ive put my wifi dongle keyboard and mouse on usb hub, they all work great. I've directly plugged UNO into rpi. I tried codes $ ls /dev/ttyusb, $ ls /dev/ttyusb*, $ ls /dev/ttyusb0, $ ls /dev/ttyusb1, $ ls /dev/usb1*, $ ls /dev/ttyACM, $ ls /dev/ttyACM*, they all return ls: cannot access /dev/tty(whatever it was): No such file or directory.

When I go to $ ls /dev/ after I plug in UNO there is a ttyusb0 that wasn't there before I pluged it in. There is also a ttyusb1 if I plug both in. I've also plugged the UNO into a 12v wall power as well as the usb connection.I've tried all the codes every time I changed something.

Thanks for all your help.

Just use ttyUSB0 (zero) and as the back up ttyUSB1 in the config file

eg

port = /dev/ttyUSB0
altport = /dev/ttyUSB1

in the config.cfg file

try

$ sudo nano /home/brewpi/settings/config.cfg

and make the edits and save the file and exit

then continue with the install
 
I got my script to start by updating some more python exts. when i try to upload the HEX file still i get the no module tools error.

also Im still unsure on which Cron text we should be using with this legacy version.
 
Just use ttyUSB0 (zero) and as the back up ttyUSB1 in the config file



eg



port = /dev/ttyUSB0

altport = /dev/ttyUSB1



in the config.cfg file



try



$ sudo nano /home/brewpi/settings/config.cfg



and make the edits and save the file and exit



then continue with the install


If he intends to use both UNOs then using usb1 as altport will give issues in the future. but yes use the ttyusb0 in config. it seems you are having problems getting the script to start. have you given it enough time to start up and update the browser. and are you using the browser in rasbian or are you using something like safari or internet explorer, because then your browser will not show that the script is running.
 
I can start my script manually with SSH and it shows running. But soon as I close the SSH connection it kills my script. I can't seem to get the CRON job to work properly.
 
For the cron job issue, did you execute the fix_permissions script at any point since you completed the installation?

Also, which version of Raspbian are you using? Wheezy, or Jessie? (hopefully the former)

Cheers!
 
I did use the fix_permissions script when instructed. I am using Raspbian Wheezy. I just tried fixing permissions and I went with this in my cron job.

stderrpath="/home/brewpi/logs/stderr.txt"
stdoutpath="/home/brewpi/logs/stdout.txt"
scriptpath="/home/brewpi"
entries="brewpi wifichecker"
# entry:wifichecker
*/10 * * * * root sudo -u brewpi touch $stdoutpath $stderrpath; $scriptpath/utils/wifiChecker.sh 1>>$stdoutpath 2>>$stderrpath &
# entry:brewpi
* * * * * brewpi python $scriptpath/brewpi.py --checkstartuponly --dontrunfile $scriptpath/brewpi.py 1>/dev/null 2>>$stderrpath; [ $? != 0 ] && python -u $scriptpath/brewpi.py 1>$stdoutpath 2>>$stderrpath &



i restarted and it seemed to start up.

now trying to figure out my issue why the hex error.
 
Great, at least you're not working with the handicap that has been Jessie around here ;)

fwiw, here's an example cron from one of my systems.
I've used both entries without apparent issue - the first one is actually from the version 0.3 (?) BrewPi from roughly a year ago, the second is what I believe is being provided by the current version.

Code:
PYTHON=/usr/bin/python
stderrpath="/home/brewpi/brewpi4w/logs/stderr.txt"
stdoutpath="/home/brewpi/brewpi4w/logs/stdout.txt"
SCRIPTPATH=/home/brewpi/brewpi4w
MAILTO=""
* * * * * brewpi $PYTHON $SCRIPTPATH/brewpi.py --config $SCRIPTPATH/settings/config.cfg --checkstartuponly --dontrunfile; [ $? != 0 ] && $PYTHON -u $SCRIPTPATH/brewpi.py --config $SCRIPTPATH/settings/config.cfg 1>$SCRIPTPATH/logs/stdout.txt 2>>$SCRIPTPATH/logs/stderr.txt &
#
#* * * * * brewpi $python $scriptpath/brewpi.py --checkstartuponly --dontrunfile $scriptpath/brewpi.py 1>/dev/null 2>>$stderrpath; [ $? != 0 ] && python -u $scriptpath/brewpi.py 1>$stdoutpath 2>>$stderrpath &

Cheers!
 
Before I embark on my reload of this for the who knows how many times, I'm wondering if I can do all the steps to set this up using the Ethernet connection and then have it run over wifi thereafter?

I can't help but think that I'm not uploading all this code through the wifi reliably and that's were I'm running into difficulties.

Thanks
 
Thank you! do you have any insight into why when i try to load the HEX it gets half way down and then i start to have error: no module tool. I have the uno but i see in the config.cfg file it says board is boardType = leonardo should I change this? or does it get written once the aurdino is uploaded with HEX

Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 21, in
from BrewPiUtil import printStdErr
File "/home/brewpi/BrewPiUtil.py", line 22, in
import autoSerial
File "/home/brewpi/autoSerial.py", line 6, in
from serial.tools import list_ports
ImportError: No module named tools
Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 21, in
from BrewPiUtil import printStdErr
File "/home/brewpi/BrewPiUtil.py", line 22, in
import autoSerial
File "/home/brewpi/autoSerial.py", line 6, in
from serial.tools import list_ports
ImportError: No module named tools
Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 21, in
from BrewPiUtil import printStdErr
File "/home/brewpi/BrewPiUtil.py", line 22, in
import autoSerial
File "/home/brewpi/autoSerial.py", line 6, in
from serial.tools import list_ports
ImportError: No module named tools
Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 21, in
from BrewPiUtil import printStdErr
File "/home/brewpi/BrewPiUtil.py", line 22, in
import autoSerial
File "/home/brewpi/autoSerial.py", line 6, in
from serial.tools import list_ports
ImportError: No module named tools

should I try Xloader instead? this is the last piece of my puzzle to solve I think.

* edit I just tried using Xloader and it uploaded fine. I made sure to use fix permissions and then I retried to do the hex again with brewpi and this time it worked and found brewpi version and uno board. and now it is idle and has the count down!!!
 
Either your eeprom had problems uploading the hex and a simple ide upload of blink or eeprom clear would fix it, or there is still an issue with the latest Python serial lobraries
 
So I can grasp the diagram regarding connecting everything. But my question is. ..how do I connect this to the fridge to cool the fermenting beer?
 
So I can grasp the diagram regarding connecting everything. But my question is. ..how do I connect this to the fridge to cool the fermenting beer?

Is what the outlets are for. Fridge gets plugged into one, heater in the other

Which one for which depends on how the relay is wired and super easy to figure that out when it's time
 
Before I embark on my reload of this for the who knows how many times, I'm wondering if I can do all the steps to set this up using the Ethernet connection and then have it run over wifi thereafter?

I can't help but think that I'm not uploading all this code through the wifi reliably and that's were I'm running into difficulties.

Thanks

Certainly you can use the wired nic for as long as you like, then switch to a wifi dongle at any point.
If you don't set both for static addresses, be sure to keep track of the host IP along the way...

Cheers!
 
Either your eeprom had problems uploading the hex and a simple ide upload of blink or eeprom clear would fix it, or there is still an issue with the latest Python serial lobraries

I'm wondering if pyserial was even installed?

I would try using pip to install pyserial.
It won't hurt anything and might fix problems or at least make troubleshooting easier.

For those who don't have pip installed:

Code:
$ sudo apt-get update
$ sudo apt-get install python-pip

After that, install pyserial:

Code:
$ sudo pip install pyserial

Cheers!
 
I'm wondering if pyserial was even installed?

I would try using pip to install pyserial.
It won't hurt anything and might fix problems or at least make troubleshooting easier.

For those who don't have pip installed:

Code:
$ sudo apt-get update
$ sudo apt-get install python-pip

After that, install pyserial:

Code:
$ sudo pip install pyserial

Cheers!

I was getting the exact same messages, and tried this solution among every other I could find to no avail

I flashed the arduinos with the blink sketch first, the EPROMs clear sketch then the rev c hex using xloader and I'm hoping once I get this reprogrammed it will work

Fingers crossed
 
Excuse the ignorance, but will 2.2k resistors work in place of the 2k resistors for the Bluetooth module?
 
Excuse the ignorance, but will 2.2k resistors work in place of the 2k resistors for the Bluetooth module?

Is it for the voltage-level shifter (5V to 3.3V)? It should be ok. It will give an output voltage of about 3.4V instead of 3.3V.

If you have lots of 1k resistors you can use two of them in series to make 2k.
 
Updated the instructions for how to setup your RPI on the Wiki. I just went through the setup from a blank RPI flash. After completing that and having your circuits setup and wired you can continue with the original post at Setup Devices. Ill move all that information over eventually but ive got a flu so need to rest a bit :)

http://diybrewpi.wikia.com/wiki/DIYBrewPi_Wikia
 
Updated the instructions for how to setup your RPI on the Wiki. I just went through the setup from a blank RPI flash. After completing that and having your circuits setup and wired you can continue with the original post at Setup Devices. Ill move all that information over eventually but ive got a flu so need to rest a bit :)

http://diybrewpi.wikia.com/wiki/DIYBrewPi_Wikia

So glad you're still active on this. My BrewPi setup has been packed up since the summer and I don't know how soon I'll get around to rebuilding it, but I was afraid things would stagnate here as the official project has moved away from the Arduino.
 
So I have one more question...it's about the "block connector" in the second schematic drawing. Can I just order any block connector? Or are there specifications? I see in the diagram it says +5v but with my limited electrical knowledge...I don't know if that's important or not.
 
So I have one more question...it's about the "block connector" in the second schematic drawing. Can I just order any block connector? Or are there specifications? I see in the diagram it says +5v but with my limited electrical knowledge...I don't know if that's important or not.

Anyway you connect the low volt/ control wires is fine. The block connector is only a convenient way to do it. You could use any number of things from stay cons to wire nuts

I'm using these http://www.homedepot.com/p/Ideal-Insulation-Displacement-Wire-Connectors-25-Pack-85-925/100192058

You just stick the wires in and squeeze the red circle with pliers
 
Great, at least you're not working with the handicap that has been Jessie around here ;)

fwiw, here's an example cron from one of my systems.
I've used both entries without apparent issue - the first one is actually from the version 0.3 (?) BrewPi from roughly a year ago, the second is what I believe is being provided by the current version.

Code:
PYTHON=/usr/bin/python
stderrpath="/home/brewpi/brewpi4w/logs/stderr.txt"
stdoutpath="/home/brewpi/brewpi4w/logs/stdout.txt"
SCRIPTPATH=/home/brewpi/brewpi4w
MAILTO=""
* * * * * brewpi $PYTHON $SCRIPTPATH/brewpi.py --config $SCRIPTPATH/settings/config.cfg --checkstartuponly --dontrunfile; [ $? != 0 ] && $PYTHON -u $SCRIPTPATH/brewpi.py --config $SCRIPTPATH/settings/config.cfg 1>$SCRIPTPATH/logs/stdout.txt 2>>$SCRIPTPATH/logs/stderr.txt &
#
#* * * * * brewpi $python $scriptpath/brewpi.py --checkstartuponly --dontrunfile $scriptpath/brewpi.py 1>/dev/null 2>>$stderrpath; [ $? != 0 ] && python -u $scriptpath/brewpi.py 1>$stdoutpath 2>>$stderrpath &

Cheers!

Day

Is this the cron job you have setup for your multi instances or should I be using the cron from your instructions at post 1393?

Any help would be appreciated greatly
 
Man, it's not easy to navigate to a specific post!

So that was written roughly 1.5 years before the current version of BrewPi, so there's always a chance that something has changed that might break something.

That said, the cron task above is essentially a superset of the old version and a version I installed about a month ago, with all of the elements needed to make either command string work. That particular cron job is for a Wifi minion, and it's been using the old command string without issue, with the newer form commented out.

So give it a try - with the appropriate path adjustments for your installation, of course. If the old command string doesn't seem to work correctly, try the newer command...

Cheers!
 
I was looking to do the same thing, did you find any way of doing it?

I bought one and wired it up like usual. Then I tried to flash the firmware so I could begin troubleshooting relays and crap.

It will flash but it has a hard time starting up. I get this.
Jan 31 2016 14:42:13 Checking software version on controller...

Most of the time I get this after

Warning: Cannot receive version number from controller. Your controller is either not programmed or running a very old version of BrewPi. Please upload a new version of BrewPi to your controller.

But a couple times I got

Jan 31 2016 14:55:36 Found BrewPi v0.4.2 build 0.4.2-0-g446b226, running on a Particle Photon with a V2 shield on port /dev/ttyACM1

It won't read any devices so far, I tried powering the temp sensor directly with 5v but still nothing.

After some research I believe the problem is here.
https://community.brewpi.com/t/could-not-find-compatible-serial-devices/1151

specifically where it says the firmware is looking for a OneWire bus master and a display to calibrate. I'm guessing that's why start up takes so long, no idea if it's a voltage or software problem with the devices though.
 
Man, it's not easy to navigate to a specific post!

So that was written roughly 1.5 years before the current version of BrewPi, so there's always a chance that something has changed that might break something.

That said, the cron task above is essentially a superset of the old version and a version I installed about a month ago, with all of the elements needed to make either command string work. That particular cron job is for a Wifi minion, and it's been using the old command string without issue, with the newer form commented out.

So give it a try - with the appropriate path adjustments for your installation, of course. If the old command string doesn't seem to work correctly, try the newer command...

Cheers!

Yea sorry about that. Thanks for the info.

Very few things are working correctly for me on this.
I can't for the life of me get either arduino to load the sketch for me
Both return the no module named tools errors identical to thyirishmans post just above

I hooked both of the arduino up to my pc and used xloader to flash a blank sketch
Returned to PI tried again and still get the same error

Any more ideas as to what I've done to screw this up?
 
If you have xloader working, why not go ahead and flash the Brewpi hex file?

Cheers!


i tried it said it downloaded i hooked it back up and the script is still not running
i tried to start it manually and i got this

pi@raspberrypi ~ $ sudo -u brewpi python /home/brewpi/chamber1/brewpi.py
Traceback (most recent call last):
File "/home/brewpi/chamber1/brewpi.py", line 21, in <module>
from BrewPiUtil import printStdErr
File "/home/brewpi/chamber1/BrewPiUtil.py", line 22, in <module>
import autoSerial
File "/home/brewpi/chamber1/autoSerial.py", line 6, in <module>
from serial.tools import list_ports
ImportError: No module named tools
 
It sounds like you don't have pyserial installed.
 
It sounds like you don't have pyserial installed.

I know, right?

Something weird has happened that has really thrown some wrenches into a process that used to work just fine.

Hopefully Fuzze will run into all of this stuff with a fresh OOTB build and figure out wtf happened.
There's no way I'm going to break stuff that's working on this ;)

Cheers!
 
Yea I see that fuzze reworked the single instance wiki and hopefully he can get to the multi because something is screwy in Denmark
I did run the pyserial code and was told it was already installed
Really at a loss here. I had this running a few weeks back but the second instance wasn't picking up any probes so I started over and the rug got pulled out from under me.

Thanks for the effort everyone
 
Status
Not open for further replies.
Back
Top