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 had 1 instance running, and could not get a second running following the multi-instance directions. Which led to 1 of the fresh installs. I'm not sure if it is possible to install to /home/brewpi/chamber1 if you already have an instance running in /home/brewpi.

If you have the first running by following the multi-instance (installing into sub-directories of /home/brewpi), and want to get the other instances from git, you'll need to use the -b legacy command. Otherwise you'll download the 0.4.0 update. I suppose it depends on what issues you are having. Can you access each web page? Is it issues with the script?

I'm sure day-trippr is correct about cloning the instance, but I have no clue on how it's done. And, I'm pretty sure getting all of the paths correct were a part of my initial problems.
 
I need help flashing my arduino. The set up went smoothly, but I can't get the raspberry pi to flash the arduino.

For reference; I'm using an authentic Arduino Uno R3, with a dedicated 12 volt power supply.

I've read a lot of the advice in this thread, but nothing has helped. Thus far I have:

  • ran "sudo apt-get install arduino"

  • used Arduino IDE to flash a blank program to the Arduino Uno R3 (the one with the setup and loop and nothing else)

  • Cleared the EEPROM

  • verified that the arduino is read as ttyAMC0

I'm at my wits end. If anyone can help, It'd be much appreciated. This is my brewpi web interface output that displays whenever I try to flash the Uno R3


Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 652, in
{'settings': restoreSettings, 'devices': restoreDevices})
TypeError: programController() takes exactly 6 arguments (4 given)
Dec 06 2015 16:30:03 Opening serial port
Dec 06 2015 16:30:03 Notification: Script started for beer 'My First BrewPi Run'
Dec 06 2015 16:30:13 Checking software version on controller...
Dec 06 2015 16:30:23 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.

Thank you in advanced whoever might be willing to help
 
Just use /home/brewpi2 and leave /home/brewpi as it is
 
Interleaved sub-threads. Fun!

So, is there still a problem flashing the Uno?
Have you tried flashing through the BrewPi gui without trying to restore settings?

From the look of the log messages, I suspect the serial eeprom isn't delivering what BrewPi wants to see...

Cheers!
 
Yes, I'm still having trouble.
I'm guessing that by "fashing without trying to restore settings" you mean trying to flash without uploading a blank sketch? If that's the case the answer is yes.
If you think the eeprom is the problem, I'd love to hear your input

Thanks again; I really appreciate your help.
 
Yes, I'm still having trouble.
I'm guessing that by "fashing without trying to restore settings" you mean trying to flash without uploading a blank sketch? If that's the case the answer is yes.
If you think the eeprom is the problem, I'd love to hear your input

Thanks again; I really appreciate your help.

In the BrewPi flash settings theres a check box(i think) that says "Restore settings on Flash" or something ...basically it saves your settings, flashes the image, then restores your saved settings.

Turn that off. I dont think it will change anything but it shouldnt be on.
 
I am in the process of installing brewpi on a Raspberry connected to Arduino Uno R3 via usb cable (which I have confirmed as good), no components connected to the arduino at the moment.

So far I've been following the documentation, but have ran into a few issues. First being: when I open the web interface, it states Script not running!, I click it and wait, but it doesn't change.

I've read a bit about modifying the config.cfg file, but it doesn't exist on my system.

Any thoughts?
 
Have you run FixPermissions.sh?
Code:
$ sudo nano /home/brewpi/utils/fixPermissions.sh

Can you start the script manually?
Code:
sudo -u brewpi python /home/brewpi/brewpi.py
 
Have you run FixPermissions.sh?
Code:
$ sudo nano /home/brewpi/utils/fixPermissions.sh

Can you start the script manually?
Code:
sudo -u brewpi python /home/brewpi/brewpi.py
[/QUOTE

I did try fixPermissions

when I run udo -u brewpi python /home/brewpi/brewpi.py

I get:

pi@raspberrypi:~ $ sudo -u brewpi python /home/brewpi/brewpi.py
Dec 07 2015 14:44:17 Opening serial port
Dec 07 2015 14:44:27 Errors while opening serial port:
Could not find compatible serial devices
 
Have you run FixPermissions.sh?
Code:
$ sudo nano /home/brewpi/utils/fixPermissions.sh

Can you start the script manually?
Code:
sudo -u brewpi python /home/brewpi/brewpi.py
[/QUOTE

I did try fixPermissions

when I run udo -u brewpi python /home/brewpi/brewpi.py

I get:

pi@raspberrypi:~ $ sudo -u brewpi python /home/brewpi/brewpi.py
Dec 07 2015 14:44:17 Opening serial port
Dec 07 2015 14:44:27 Errors while opening serial port:
Could not find compatible serial devices

That means your Arduino isnt being detected by the RPI. What happens if you do ls /dev/tty* (Thats LS lowercase) you should see a /dev/ttyUSB0 device...

If you dont, try reflashing your Arduino via the Windows IDE with a blank sketch and hook it up again. Also make sure its hooked up before your RPI is powered on.
 
What's the easiest way to view a ferment's data on a Windows computer if you're not connected to the Pi? Is there a program other than Excel that you can use? I would prefer if I could zoom in to certain periods of time, switch on and off various data series, etc. (like the way it works when you're in the web interface). Is there any way to do that?
 
Downloading the CSV file and viewing it in Excel is probably your best bet...
 
That means your Arduino isnt being detected by the RPI. What happens if you do ls /dev/tty* (Thats LS lowercase) you should see a /dev/ttyUSB0 device...

If you dont, try reflashing your Arduino via the Windows IDE with a blank sketch and hook it up again. Also make sure its hooked up before your RPI is powered on.

There is no ttyUSB0. I reflashed the arduino from IDE, the hooked it up again. I ran ls dev/tty* before and after I hooked up the arduino and the it seems to be /dev/ttyACM0

I did ensure that it was connected before power up.
 
There is no ttyUSB0. I reflashed the arduino from IDE, the hooked it up again. I ran ls dev/tty* before and after I hooked up the arduino and the it seems to be /dev/ttyACM0

I did ensure that it was connected before power up.

Oops forgot its usually ACM0. That means its detecting your Arduino properly, what happens when you flash it? What does the log window below in the programming window say? Also turn off both Restore functions in that window before flashing.
 
Oops forgot its usually ACM0. That means its detecting your Arduino properly, what happens when you flash it? What does the log window below in the programming window say? Also turn off both Restore functions in that window before flashing.

this is what I get as it is now:

Dec 07 2015 16:03:03 Opening serial port
Dec 07 2015 16:03:13 Errors while opening serial port:
Could not find compatible serial devices

once before when I tried to make my own config.cfg file, I get this:

Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 652, in
{'settings': restoreSettings, 'devices': restoreDevices})
TypeError: programController() takes exactly 6 arguments (4 given)
Dec 07 2015 16:07:03 Opening serial port
Dec 07 2015 16:07:03 Notification: Script started for beer 'My First BrewPi Run'
Dec 07 2015 16:07:04 Checking software version on controller...
Dec 07 2015 16:07:14 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.

the software hasn't ever created it's own config.cfg file, so I just used the example file and removed uncomments until I got the script to start in the web interface. so I'm still not sure that the config file is correct
 
this is what I get as it is now:

Dec 07 2015 16:03:03 Opening serial port
Dec 07 2015 16:03:13 Errors while opening serial port:
Could not find compatible serial devices

once before when I tried to make my own config.cfg file, I get this:

Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 652, in
{'settings': restoreSettings, 'devices': restoreDevices})
TypeError: programController() takes exactly 6 arguments (4 given)
Dec 07 2015 16:07:03 Opening serial port
Dec 07 2015 16:07:03 Notification: Script started for beer 'My First BrewPi Run'
Dec 07 2015 16:07:04 Checking software version on controller...
Dec 07 2015 16:07:14 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.

the software hasn't ever created it's own config.cfg file, so I just used the example file and removed uncomments until I got the script to start in the web interface. so I'm still not sure that the config file is correct

BrewPi should use the defaults.cfg file and only use the config.cfg as an override if you need it.

This page explains it better than i can.
http://docs.brewpi.com/after-install/program-arduino.html
 
What are you putting in the config file?

scriptPath = /home/brewpi/
wwwPath = /var/www/
port = /dev/ttyACM0
altport = /dev/ttyACM1
boardType = leonardo
startupDelay = 1.0
debug = true

vrdudeHome = # location of avr tools, defaults to arduinohome/hardware/tools
avrsizeHome = # defaults to empty string because avrsize is on path on Linux
avrConf = # location of global avr conf. Defaults to avrdudeHome/avrdude.conf
 
I thought you said you were using an Arduino Uno? Are you installing a single instance of BrewPI? If so, I would change to:

port = auto
altport = None
boardType = Uno
 
fwiw, every BrewPi instance on my systems has its own config.cfg that look like this template:

wwwPath = /var/www/brewpi1/
port = /dev/brewpi1
altport = /dev/null
boardType = uno
beerName = RPINTS%20BrewPi1%20Test7
dataLogging = active

When I clone an instance to make a new one this is one file that gets edited, specifically the wwwPath and port values.

All of my RPi's are still running Wheezy...

Cheers!
 
I thought you said you were using an Arduino Uno? Are you installing a single instance of BrewPI? If so, I would change to:

port = auto
altport = None
boardType = Uno

Thanks, Yes it is an uno.

I have tried uno as board type and still get the same errors.

if I change the ports, it states Script not running on the web interface
 
Thanks, Yes it is an uno.

I have tried uno as board type and still get the same errors.

if I change the ports, it states Script not running on the web interface

Ignore the script not running message, thats always going to happen until we get your Arduino programmed. Its simply stating that the script that communicates with the Arduino isnt running, because it errors out and stops if it gets no response from the Arduino.
 
In the BrewPi flash settings theres a check box(i think) that says "Restore settings on Flash" or something ...basically it saves your settings, flashes the image, then restores your saved settings.

Turn that off. I dont think it will change anything but it shouldnt be on.

No dice. Getting the exact same error. I'm including a picture of my maintenance panel. Hopefully it provides more insight
http://i.imgur.com/EW7ydVT.png


Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 652, in
{'settings': restoreSettings, 'devices': restoreDevices})
TypeError: programController() takes exactly 6 arguments (4 given)
Dec 07 2015 18:36:03 Opening serial port
Dec 07 2015 18:36:03 Notification: Script started for beer 'My First BrewPi Run'
Dec 07 2015 18:36:04 Checking software version on controller...
Dec 07 2015 18:36:14 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
 
Have you downloaded the rev-C hex file for the UNO and attempted to reprogram the arduino using the web interface? It looks like it is seeing the arduino and communicating with it. The script won't start until you program the arduino with the HEX file.

Edit: Nevermind, I see that you have.

You can try an older version of the HEX File. The one that I use doesn't have a revision number like yours (0-2-10)
 
Have you downloaded the rev-C hex file for the UNO and attempted to reprogram the arduino using the web interface? It looks like it is seeing the arduino and communicating with it. The script won't start until you program the arduino with the HEX file.

Yes sir-ee. Downloaded version 2.10 for arduino uno rev-c. Some real hair-pulling stuff here. Hopefully y'all can help me, but I'm at a point where I might just buy a new arduino and see if maybe I just currently have that one-in-a-million board that causes a one-in-a-million problem.
 
If you've tried and can upload to it from the Arduino IDE, I don't think it's your problem. Try uploading blink. Then try again.

I sent you a pm. We might want to take it off-line until you figure out what is wrong. (So that we don't de-rail this thread) I'd be willing to help you figure that out.
 
This is starting to sound vaguely familiar.

Please go back to here, read forward along the sub-thread (click the thread tag at the top right of the page), and see if it moves the needle...

Cheers!

[edit] fwiw, all but one of my UNOs are running the "classic" Rev C hex file - which is officially 0.2.4 - but my test minion has run that version and the latest 0.2.10.
I'm pretty sure the differences are all algorithmic tweaks - aside from the version info during start-up, there's nothing obviously different...
 
Hello,

I'm stuck at the exact same point as you are, when trying to set up my multiple chamber system.
Same error message, tried multiple Uno's and versions of the hex file...

I also get the error saying that programController() takes 6 arguments (but 4 given). And indeed, when looking into the programArduinoFirstTime.py file, only 4 arguments are given. So I don't really understand why it is asking for 6...

The last advices didn't help :(

No dice. Getting the exact same error. I'm including a picture of my maintenance panel. Hopefully it provides more insight
http://i.imgur.com/EW7ydVT.png


Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 652, in
{'settings': restoreSettings, 'devices': restoreDevices})
TypeError: programController() takes exactly 6 arguments (4 given)
Dec 07 2015 18:36:03 Opening serial port
Dec 07 2015 18:36:03 Notification: Script started for beer 'My First BrewPi Run'
Dec 07 2015 18:36:04 Checking software version on controller...
Dec 07 2015 18:36:14 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
 
Hello,

I'm stuck at the exact same point as you are, when trying to set up my multiple chamber system.
Same error message, tried multiple Uno's and versions of the hex file...

I also get the error saying that programController() takes 6 arguments (but 4 given). And indeed, when looking into the programArduinoFirstTime.py file, only 4 arguments are given. So I don't really understand why it is asking for 6...

The last advices didn't help :(

Same here. Both of y'alls advice hasn't made the arduino want to play nice with the raspberry pi. I appreciate the help. Tomorrow I'll devote the day to pulling my hair out and getting to the bottom of this
 
You can ad me to the list of people that as of now are unable to program arduino through the Web interface.

I've tried multiple unit's and different hex files, but haven't had time to try anything else.
 
No dice. Getting the exact same error. I'm including a picture of my maintenance panel. Hopefully it provides more insight
http://i.imgur.com/EW7ydVT.png


Traceback (most recent call last):
File "/home/brewpi/brewpi.py", line 652, in
{'settings': restoreSettings, 'devices': restoreDevices})
TypeError: programController() takes exactly 6 arguments (4 given)
Dec 07 2015 18:36:03 Opening serial port
Dec 07 2015 18:36:03 Notification: Script started for beer 'My First BrewPi Run'
Dec 07 2015 18:36:04 Checking software version on controller...
Dec 07 2015 18:36:14 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

Looks like a brewpi-script problem to me. Probably due to the new spark/photon stuff.

If any python whizzes want to hack a solution:

brewpi.py
programController called at line 651 is called with the incorrect parameters

programController.py
programController defined at line 161
program defined at line 198

In the meantime you can upload your hex files manually using avrdude. I'll edit this a little later after I find the command.

[edit] Here is the command to upload to the Uno
avrdude -C*FULL PATH TO CONFIG FILE* -v -v -v -v -patmega328p -carduino -P*USB PORT* -b115200 -D -V -Uflash:w:*FULL PATH TO HEX FILE*:i
Where:
*FULL PATH TO CONFIG FILE* = something like /usr/share/arduino/hardware/tools/avrdude.conf
*USB PORT* = something like /dev/ttyUSB1 or /dev/ttyACM0 etc.
*FULL PATH TO HEX FILE* = where ever you downloaded the hex file to on your rpi

Here is an example of what my command would look like:
/usr/share/arduino/hardware/tools/avrdude -C/usr/share/arduino/hardware/tools/avrdude.conf -v -v -v -v -patmega328p -carduino -P/dev/ttyACM0 -b115200 -D -V -Uflash:w:/home/kraken/brewpi-uno-revC.hex:i
 
In the meantime i would recommend simply pulling an old version of the Brewpi code to see how that works.

Go into your Brewpi directory and type

git checkout tags/0.3.3.1

This should use an older version of the BrewPi software which i still use.

After thats done if it all works and you can flash your arduino properly you can always do

git checkout master

This will pull you back to the latest code, which should work fine for you i think once the Arduino is programmed properly...if not you can stick with the old version until they patch up the issue. Ive been using 0.3.3.1 since i wrote this post years ago.
 
Interesting all of these issues followed the update to brew pi recently uploaded. Are you guys installing the legacy fork?
 
In the meantime i would recommend simply pulling an old version of the Brewpi code to see how that works.

Go into your Brewpi directory and type

git checkout tags/0.3.3.1

This should use an older version of the BrewPi software which i still use.

So, just to make sure I have this right, my command inputs would look something like this?

"cd /home/brewpi"
"git checkout tags/0.3.3.1"

I'm only vaguely familiar with linux OSes, so I need a little more information to go on, haha.
 
Interesting all of these issues followed the update to brew pi recently uploaded. Are you guys installing the legacy fork?

I installed mine over the weekend using the legacy fork, and no issues. I installed a multi-instance on a laptop, but it was a fresh install.

My original post about using the legacy fork is #4316
 
So, just to make sure I have this right, my command inputs would look something like this?

"cd /home/brewpi"
"git checkout tags/0.3.3.1"

I'm only vaguely familiar with linux OSes, so I need a little more information to go on, haha.

Yes it should pop up with a bunch of stuff..near the top should say that it checked out 0.3.3.1
 
I updated one of my test cases using whatever the "update" command pulls and it still works - and still can flash from inside the BrewPi gui.

This is very confusing...

Cheers! :confused:
 
Here is the command to upload to the Uno
avrdude -C*FULL PATH TO CONFIG FILE* -v -v -v -v -p atmega328p -carduino -P*USB PORT* -b115200 -D -V -Uflash:w:*FULL PATH TO HEX FILE*:i

Thanks for this! Worked on my end. (But after a fair bit of fiddling so it may have been a combination of things.) Another reminder to not to update software when everything is working.
 
Status
Not open for further replies.
Back
Top