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.
Arhh..

I just put together my second brewpi. First one was earlier this year and the install went off without a hitch. I ordered the exact same part numbers from amazon but this time no dice....

When trying to program the arduino with the most recent firmware I get the ol


" 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."

error.

I've tried clearing the epromm as suggested on other threads but it's not working. Any suggestions??

Thanks

Well after a lot of tinkering I got it working.

1) Ran across a thread about legacy software. So I reverted to the legacy build because the new software won't work with an arduino i guess
2) Still couldn't load the firmware to the arduino. So I tried loading it manually with hexload. It loaded it but still wasn't working. But it now did allow me to read and re-write firmware onto the arduino. After this it worked and I was able to configure my probes ect... so problem solved.
 
PySerial was updated 2 days ago to 3.0.

This broke some things in the BrewPi code, which I have now fixed.

I have updated the legacy branch with most of the backwards compatible changes.

this includes:
- Receiving serial data continuously in a background thread. This increases responsiveness.
- A button in the web interface to reset EEPROM
- In the profile entering "1d4h10m" is now a supported
- some smaller fixes to HTML and JavaScript.

To update:
sudo python ~/brewpi-tools/updater.py --ask

Make sure you pick the legacy branch if you have an Arduino.

Thank you for this update and keeping the legacy branch updated! this is very much appreciated.
 
Well after a lot of tinkering I got it working.

1) Ran across a thread about legacy software. So I reverted to the legacy build because the new software won't work with an arduino i guess
2) Still couldn't load the firmware to the arduino. So I tried loading it manually with hexload. It loaded it but still wasn't working. But it now did allow me to read and re-write firmware onto the arduino. After this it worked and I was able to configure my probes ect... so problem solved.

When you say you used 'hexload', do you mean in the brewpi web interface or is it something else?
 
I was able to load firmware on the arduino with XLoader. Seems to be working at this point. The update script detects the version properly, tries to download the latest version but fails, presumably because it is downloading the latest (non-arduino compatible) version.
 
I am having a terrible time with this lol.

I have brewpi running on Debian and I can see the web page just fine. When i go to program the Arduino things go wrong. I keep getting "Cannot receive version number from controller". it happens in updating the .py that was just posted and i just tried the legacy branch as well.

Earlier in the week i said to hell with it an ordered a raspberry pi so ill start over.

I do see the arduino on TTYAMC0 and the blink sketch works from Ardunio IDE. also, this has been coming up. Traceback File "/home/brewpi/brewpi.py", line 636, in
bg_ser.stop()

I am just lost but willing to troubleshoot and learn. Thanks all!

*****EDIT
I used xloader in windows to send the .hex file to the arduino as mentioned above. Once that step was done, I was able to configure devices. The devices wouldnt save to installed devices at first. I found a brewpi forum post from Elco, echo -ne 'E\n' > /dev/ttyACM0, and it was fixed. now I am working on which relay is which and ready to try it out!!
 
Last edited:
One other error that I have come across with this new build when testing my relays is

I'm having problems changing temp mode in the web UI. Usually I can change from beer profile to off, but I can never change to beer constant from anything else. I can go into advanced mode and change to beer constant there. Is anyone else having this issue with with the new updates?

I have an older brewpi from earlier this year that is functioning well. I wish I could use the same software version of that.

EDIT: Feeling kinda stupid... was trying to set the beer temp to 20F when testing so it wouldn't let me set the mode because the min temp is something like 32F. So all is working well.
 
Last edited:
First off, thanks to FuzzeWuzze, Prymal, and all the others on this thread for putting this information out there. I'm a total newbie to RPi/Arduino. I haven't used the command line since I was a kid playing with 386 computers and haven't ever programmed anything. You made this process extremely accessible for the uninitiated like me. My hat's off to you!

After setting up the external brewpi page, I think I hit a road block with the script running over the web. I did a standard install script of brewpi (legacy branch) and got the web interface working locally and via port forwarding to the outside world with the help of this thread. I tried stopping the script via the browser and then the script button stopped working. The only way I found to get it going again was by trying “sudo -u brewpi python /home/brewpi/brewpi.py” as recommended in this post: https://community.brewpi.com/t/cannot-get-script-started/248. It got the script running in the terminal and through the web interface. While it is running in the terminal, I see what look to be log entries like this:

Jan 02 2016 14:08:51 {"BeerTemp":null,"BeerSet": 24.18,"BeerAnn":null,"FridgeTemp":null,"FridgeSet": 30.00,"FridgeAnn":null,"State":0}
Jan 02 2016 14:08:51 controller debug message: INFO MESSAGE 12: Received new setting: beerSet = 24.62

Everything looks good over the browser. The script is running and the graphs are advancing according to the profile. However, as soon as I close the script process in the terminal with ctrl-c, it shuts down over the web interface too. The web button for restarting the script doesn't work. It would keep running as long as I am connected via ssh in the terminal view. When my computer goes to sleep, the script stops. I tried a few other things I saw online like fixing permissions, rebooting, resetting the controller, checking that pip and cron are updated -- all shots in the dark that didn't fix the problem.

Any ideas what I should try? Sorry if this has been addressed somewhere else in the thread. I've just started brewing again after a long hiatus and have been learning about all the automation that's possible in home brewing. I'm really excited to get on to wiring everything up to the chest freezer I found on Craigslist.

UPDATE: All is right with my BrewPi script. I figured out that if I run an update of the branch then it will restart the script. There's probably a better way but running the update doesn't take that long. Cheers!
 
Last edited:
Success! I downloaded xloader and successfully loaded the hex file onto the arduino.
I reloaded brewpi and the script started but it still didn't recognize the temp sensors. I then tried loading the hex file through brewpi on a whim and it fixed everything.

Another brewpi success story!
 
Then you most likely had a corrupt boot loader on the arduino
 
not really sure whatsa goin' on here.

did testing for over a month, this is my first live ferment with the BrewPi

pitched on the 27th and once the ferment temp was reached, it locked in and kept within ¼° of temp. at point 1, I started raising the temp 1° per day and, again, temp locked in & kept stable.

at point 3, however, it started getting wacky. 2.5° swings.

not really concerned about the beer, fermentation was nearly done and I was raising it to finish it off before dryhop and cold crash

throughout the entire ferment, outside temperatures have been way above average, so I had turned off the baseboard heater next to the ferment fridge and, coincidentally, turned it back on right around point 3.

any ideas?

brewpi.JPG
 
That's some wild-ish swinging that came outta nowhere.
Seems like the proportional error totally took over from the integral and left the derivative in the dust.
Don't know enough to advise what to do aside from resetting the AVR-side control parameters and see what happens.

btw, I'd have expected some annotation datapoints with the stepping going on.
Is there something that keeps them from showing? (aside from turning them off in the graph).

Cheers!
 
not really sure whatsa goin' on here.

did testing for over a month, this is my first live ferment with the BrewPi

pitched on the 27th and once the ferment temp was reached, it locked in and kept within ¼° of temp. at point 1, I started raising the temp 1° per day and, again, temp locked in & kept stable.

at point 3, however, it started getting wacky. 2.5° swings.

not really concerned about the beer, fermentation was nearly done and I was raising it to finish it off before dryhop and cold crash

throughout the entire ferment, outside temperatures have been way above average, so I had turned off the baseboard heater next to the ferment fridge and, coincidentally, turned it back on right around point 3.

any ideas?

View attachment 327475

Your fridge temp is swinging pretty wildly, I had this happen actually when my stand up freezer door didnt shut all the way and i went away for a weekend...
 
I just wanted to update everyone that after some private correspondence with gromitdj, I got my setup working.

I started with a fresh installation of raspbian weezy, and followed these instructions
http://docs.brewpi.com/manual-brewpi-install/manual-brewpi-install.html

At section 4. "Using Git for BrewPi", after running
"sudo apt-get install git-core"

I entered
"sudo -u brewpi git clone -b legacy https://github.com/BrewPi/brewpi-script /home/brewpi"

Then

"sudo rm /var/www/*"

and finally

"sudo -u www-data git clone -b legacy https://github.com/BrewPi/brewpi-www /var/www"

to install the legacy version of BrewPi

afterwards, it was necessary to run the command
"sudo /home/brewpi/utils/fixPermissions.sh"
to fix the permissions of the /var/www folder to allow the flashing of the arduino.

After the arduino was succesfully flashed, I found that I could not install any detected devices until after I ran the command

sudo echo 'E\n' > /dev/ttyAMC0
to clear the EEPROM of the arduino. After running that command, all devices installed properly, and i'm currently making my yeast starter for my first temperature controlled brew ^_^

I've been trying to follow this guide and when I get here I get stuck.

pi@raspberrypi:~ $ sudo rm /var/www/*
rm: cannot remove ‘/var/www/html’: Is a directory

Any clues?
 
Do and ls -la and see what files are in the if the file or directory doesn't exist the manually remove the rest
 
Your fridge temp is swinging pretty wildly, I had this happen actually when my stand up freezer door didnt shut all the way and i went away for a weekend...

I checked everything when I noticed it wasn't recovering from the peaks correctly; fridge & freezer doors, temperature probe placement. you can tell when I did that because the frequency increased while the amplitude did not (math major + sonar tech = it looks like a sine wave)

That's some wild-ish swinging that came outta nowhere.
Seems like the proportional error totally took over from the integral and left the derivative in the dust.
Don't know enough to advise what to do aside from resetting the AVR-side control parameters and see what happens.

btw, I'd have expected some annotation datapoints with the stepping going on.
Is there something that keeps them from showing? (aside from turning them off in the graph).

Cheers!


yes... I turned off fridge setting & beer setting to take the screenshot, so you could see the beer temp a little better. turning those off seems to turn off the annotations.

so, you suggest going into maintenance panel, advanced settings & reset defaults in the control settings &/or control constants?

brewp2.JPG
 
I don't know if it is the 2 new Uno clones or the update, but I can't flash the hex file onto the them. It works on the Uno I got it all set up on. Just can't upload the hex.... I was able to using the maintenance panel before.

I
 
I checked everything when I noticed it wasn't recovering from the peaks correctly; fridge & freezer doors, temperature probe placement. you can tell when I did that because the frequency increased while the amplitude did not (math major + sonar tech = it looks like a sine wave)




yes... I turned off fridge setting & beer setting to take the screenshot, so you could see the beer temp a little better. turning those off seems to turn off the annotations.

so, you suggest going into maintenance panel, advanced settings & reset defaults in the control settings &/or control constants?

View attachment 327544

Do you have a small fan keeping the air moving in your chamber? I notice this kind of variation occasionally when my in-chamber fan gets moved and pushes a direct stream of air over the chamber temp probe. Rearranging the fan usually helps.
 
Do you have a small fan keeping the air moving in your chamber? I notice this kind of variation occasionally when my in-chamber fan gets moved and pushes a direct stream of air over the chamber temp probe. Rearranging the fan usually helps.

Good question, yes, I do have a fan. It's on the top shelf of 3 in the fridge. Fridge temp probe is on the middle shelf and heater is on the bottom.

All those are on the left side of the fridge, while the fermenter bucket is on the right (top 2 shelves removed)

Been that way since pitching, only change was upped the temp to 70. Well, besides turning on the baseboard heater
 
Good question, yes, I do have a fan. It's on the top shelf of 3 in the fridge. Fridge temp probe is on the middle shelf and heater is on the bottom.

All those are on the left side of the fridge, while the fermenter bucket is on the right (top 2 shelves removed)

Been that way since pitching, only change was upped the temp to 70. Well, besides turning on the baseboard heater

Have you checked your probe placement? I am very skeptical that your beer probe is accurately measuring your beer. Ive had my probe accidentally get pulled slightly out of my thermowell before and had this happen because it was really just measuring the air temp inside the top of the thermowell above the beer line inside my bucket.

I say that because i dont think its possible for you to be moving 5G of wort +-2.5F as quickly as that is swinging in the graph.
 
Do and ls -la and see what files are in the if the file or directory doesn't exist the manually remove the rest

im sorry im not a linux pro. do i enter those commands in the directory?
 
In the terminal window, if you CD into the directory you can type this command and it will list off all the files and dirs that exist
 
I wanted to include a LCD on my build. I am looking at the SainSmart sensor shield (http://amzn.com/B0076FWAAK) to get I2C and the SainSmart I2C 20x4 display (http://amzn.com/B0080DYTZQ).

My Arduino is up and running. Will the parts above work and do I have to send a sketch to the Arduino to get the LCD working?

This is "very non-standard" wrt the box-stock BrewPi package, which is coded for a 4-bit parallel display.

You're going to want to read this post and unless you're prepared to generate your own hex file, make sure your I2C LCD uses the same device address as used by the author...

Cheers!
 
Have you checked your probe placement? I am very skeptical that your beer probe is accurately measuring your beer. Ive had my probe accidentally get pulled slightly out of my thermowell before and had this happen because it was really just measuring the air temp inside the top of the thermowell above the beer line inside my bucket.

I say that because i dont think its possible for you to be moving 5G of wort +-2.5F as quickly as that is swinging in the graph.

this turned out to be the key to solving the problem, but it wasn't measuring the air above the beer, the probe cable was too long and it was measuring the trub at the bottom.

all better now and I'm now shopping for a thermowell

Thanks, Fuzze

brewp3.JPG
 
Since the update I have not been able to use the web interface to upload the Hex file or start the script.

I have also had to use XLoader on a windows machine to upload the hex file. And I have to use the python command line to start the script.

I'm not sure if it is because I am not using genuine Unos and something changed in the update or if it just a glitch in the update.

It seems to work but is just not as elegant.

Now I'm waiting on the DS18B20s to arrive on the slow boat. On a positive note, I ordered some relays from Hong Kong on the 24th and 1 sainsmart from an Aussie seller because I didn't want to wait. The Hong Kong units arrived yesterday before the "local" ones. Go figure.
 
Since the update I have not been able to use the web interface to upload the Hex file or start the script.

I have also had to use XLoader on a windows machine to upload the hex file. And I have to use the python command line to start the script.

I'm not sure if it is because I am not using genuine Unos and something changed in the update or if it just a glitch in the update.

It seems to work but is just not as elegant.

Now I'm waiting on the DS18B20s to arrive on the slow boat. On a positive note, I ordered some relays from Hong Kong on the 24th and 1 sainsmart from an Aussie seller because I didn't want to wait. The Hong Kong units arrived yesterday before the "local" ones. Go figure.

Did you update with the legacy branch? That was the problem for me.
 
Which rpi are you using? I used one of the originals. It was very slow. I got an rpi2 and now it's lightning fast compared to the old one. Though the web page on a different computer was usually pretty quick. I don't know what to tell you if the remote computer is slow, too.
 
I'm using an old G4 iBook instead of a RPi. This seem to be loading quicker today, so maybe it was just an anomaly.
 
Guys,

Hoping you can help me out with a networking problem I am having. Originally when I started this project I had a simple modem from Time Warner Cable to get my internet which of course was then sent to my own router. When that was the case I was able to host a web page for my BrewPi and view the page anywhere. Flash forward to now where Time Warner Cable has upgraded their internet speeds and sent me a new modem which is now a modem/router combo. Now I am "double NAT'd", I know this from a lot of internet searching. I also know that this won't work to host my page. I also know the solution is to run the modem/router from TWC in Bridge mode. However, if I do that sometimes I lose internet altogether, sometimes I don't. Then, if the power goes out or something causes the modem/router to reboot I'll lose internet. Do you guys have ant ideas?? Thanks in advance!
 
Guys,

Hoping you can help me out with a networking problem I am having. Originally when I started this project I had a simple modem from Time Warner Cable to get my internet which of course was then sent to my own router. When that was the case I was able to host a web page for my BrewPi and view the page anywhere. Flash forward to now where Time Warner Cable has upgraded their internet speeds and sent me a new modem which is now a modem/router combo. Now I am "double NAT'd", I know this from a lot of internet searching. I also know that this won't work to host my page. I also know the solution is to run the modem/router from TWC in Bridge mode. However, if I do that sometimes I lose internet altogether, sometimes I don't. Then, if the power goes out or something causes the modem/router to reboot I'll lose internet. Do you guys have ant ideas?? Thanks in advance!

Not sure if this helps but I experienced something similar. I had AT&T internet, and the rPI worked like a charm, could always access the brewPI homepage when on the network. I switched providers to Comcast, and now use my own modem connect to a wireless router. In the beginning, I had to have a tech come out and he had to adjust the dB signal strength coming into the house. This cleared up intermittent connectivity issues I was having when just using internet or streaming media.

Since then, everything seemed to be functional, however brewing again and using brewPI, the device seems to disconnect from my network more than it should. If I want to see the homepage, I have to disconnect and reconnect power to the rPI. What a pain! I even added a 1 minute-interval keep-alive running on the rPI, and it seemed to work for a day or two... but now back in the same boat, and my device is disconnected from network.

Never used to be like this before, and the brewPI is still holding temps, but not seeing the homepage is a pain!

I am open to suggestions as well.
 
Not sure if this helps but I experienced something similar. I had AT&T internet, and the rPI worked like a charm, could always access the brewPI homepage when on the network. I switched providers to Comcast, and now use my own modem connect to a wireless router. In the beginning, I had to have a tech come out and he had to adjust the dB signal strength coming into the house. This cleared up intermittent connectivity issues I was having when just using internet or streaming media.

Since then, everything seemed to be functional, however brewing again and using brewPI, the device seems to disconnect from my network more than it should. If I want to see the homepage, I have to disconnect and reconnect power to the rPI. What a pain! I even added a 1 minute-interval keep-alive running on the rPI, and it seemed to work for a day or two... but now back in the same boat, and my device is disconnected from network.

Never used to be like this before, and the brewPI is still holding temps, but not seeing the homepage is a pain!

I am open to suggestions as well.

Yeah, I don't think I'm having a signal strength problem. It more so I think my webpage is not being hosted on the right internal network. I am racking my brain over this! I just want it to work again!
 
[...]Flash forward to now where Time Warner Cable has upgraded their internet speeds and sent me a new modem which is now a modem/router combo. Now I am "double NAT'd", I know this from a lot of internet searching. I also know that this won't work to host my page. I also know the solution is to run the modem/router from TWC in Bridge mode. However, if I do that sometimes I lose internet altogether, sometimes I don't. Then, if the power goes out or something causes the modem/router to reboot I'll lose internet. Do you guys have ant ideas?? Thanks in advance!

I have essentially the same hardware and simply set up a tiered network.
Leave the cable modem/router/gateway in its normal router mode and set its LAN to 192.168.3.*. Then MY router's WAN side sits on that network, with ITS LAN side set to 192.168.1.*. Most of my network devices sit on that LAN tier (I do have some guest-oriented WAPs on the first tier).

I do have to configure port-forwarding rules for both routers, the first to get to the second which then forwards to the target node. Works just fine though, and it's not like I'm continually mucking with that. I can access all of the pages hosted on my RPi systems from anywhere there's a network...

Cheers!
 
I have essentially the same hardware and simply set up a tiered network.
Leave the cable modem/router/gateway in its normal router mode and set its LAN to 192.168.3.*. Then MY router's WAN side sits on that network, with ITS LAN side set to 192.168.1.*. Most of my network devices sit on that LAN tier (I do have some guest-oriented WAPs on the first tier).

I do have to configure port-forwarding rules for both routers, the first to get to the second which then forwards to the target node. Works just fine though, and it's not like I'm continually mucking with that. I can access all of the pages hosted on my RPi systems from anywhere there's a network...

Cheers!

Hmm, still stumped here. The WAN address on my TWC modem/router is 174.99.115.147 and my LAN it is 192.168.0.1. My WAN on my router is 192.168.0.7 with the LAN being 192.168.1.1. I can get to the webpage locally by entering the BrewPi's 192.168.1.xxx ip address when connected to my WiFi but I can't figure out how to route it through in this new setup.
 
Hmm, still stumped here. The WAN address on my TWC modem/router is 174.99.115.147 and my LAN it is 192.168.0.1. My WAN on my router is 192.168.0.7 with the LAN being 192.168.1.1. I can get to the webpage locally by entering the BrewPi's 192.168.1.xxx ip address when connected to my WiFi but I can't figure out how to route it through in this new setup.

External WAN address is only important when you want to get through ;)

What you have should work fine. There's the discrete subnet 192.168.0 that your TWC box uses to talk to your router. Then, your router provides the final tier subnet 192.168.1, and all your devices should be sitting on that.

To get through from the outside world, you need to tell the TWC box to forward all in-bound port 80 requests to your router - 192.168.0.7. Then you need to tell your router to forward all in-bound port 80 requests to your RPi - 192.168.1.whatever (and it helps to set all your network devices to use static IP addresses.

If you have a situation with multiple page servers, instead of using the default html application port 80 in your port-forward rules, you can use other port numbers. For instance, I have four RPi's serving html pages, and set my gateway and router to forward ports 81, 82, 83 and 84 to the target listeners (which are all listening to port 80).

It works just fine. Even when we're in Italy or a Bahamas Out Island I can see everything going on back home...

Cheers! :mug:

[edit] To dot the I, you'll eventually end up where using a web browser from outside your gateway with a url that looks like http://174.99.115.147 should resolve all the way to your BrewPi host. Because I run multiple BrewPi instances across multiple RPi hosts, each with its own page, my corresponding url looks like http://96.252.xxx.yyy:84/brewpi1/ - where the port number :84 resolves to that specific RPi (of four), and the /brewpi1/ resolves to the BrewPi instance (of four on that host).
 
Set the new modem/router to its own ip and turn off dhcp in the configuration. Use your router for dhcp and wifi.
 
Status
Not open for further replies.

Latest posts

Back
Top