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.
Is it possible to assemble all at home, connect to Internet, "pull" all software and scripts and after that use it online?

Absolutely. There's no need for the Internet except of course to monitor it remotely. If you are not connected to the Internet (after initial setup) it will run just fine.

I plan to use my old HP mini notebook with Debian OS installed on it (or it works with another Linux based OS too?) combined with Arduino, early explained in this DIY project?

The instructions are written from the point of view of a person using Raspbian on a Raspberry Pi. While I've not done it with a PC/Debian I can't think of anything that should be different using any other Debian OS. I've made it work with Windows so it can be done with just about anything.

The only issue I've had with other OS's is making sure to use the proper Python version. BrewPi uses 2.7 I want to say offhand, and when working with Windows I ended up with v3.x. I even made that work though with some edits (before I downgraded the version) so I'd say you will be fine.
 
Absolutely. There's no need for the Internet except of course to monitor it remotely. If you are not connected to the Internet (after initial setup) it will run just fine.



The instructions are written from the point of view of a person using Raspbian on a Raspberry Pi. While I've not done it with a PC/Debian I can't think of anything that should be different using any other Debian OS. I've made it work with Windows so it can be done with just about anything.

The only issue I've had with other OS's is making sure to use the proper Python version. BrewPi uses 2.7 I want to say offhand, and when working with Windows I ended up with v3.x. I even made that work though with some edits (before I downgraded the version) so I'd say you will be fine.

Thank you very much for your answer.

Actually, I already have windows on my mini notebook, do you maybe have some step-by-step instructions how to install and setup software and scripts if windows OS is in question? It is even better if there is no need to install Debian, I have Beersmith already installed on that PC too. :D
 
Thank you very much for your answer.

Actually, I already have windows on my mini notebook, do you maybe have some step-by-step instructions how to install and setup software and scripts if windows OS is in question? It is even better if there is no need to install Debian, I have Beersmith already installed on that PC too. :D

Unfortunately, no. I "made it work" once and did not document it. A few things/links that may help:


That's probably roughly the order I'd try installing software if I were to try again. Keep in mind once you get Python installed, there are Python packages that need to be added. These are detailed in the "Manual Install" docs.

If I ever feel the need to do it again I'll try to document it.
 
Great!

I will give it a try, for sure, before I put together Arduino (I haven't ordered it yet, hehehe) and the rest of things together.
 
Great!

I will give it a try, for sure, before I put together Arduino (I haven't ordered it yet, hehehe) and the rest of things together.


You will need to have your notebook on all the time you are fermenting though to ensure that the beer can be logged and that the adjustments to temp can be made.

Whilst the arduino changes the temperature it is the computer that is working out how and when to make the adjustments.

This is why if your computer crashes or stop the arduino holds it at a steady temperature until it can get its next instructions.
 
Of course it'll be up all the time, no problem for that. I'll connect it to PS and disable screen saver. No problem for that, at all.

Well, I hope there will be no crashes. :D
 
I went ahead and did a Windows install yesterday. I got the website running and the script will start up but I did not have an Arduino handy to test with. The "Reprogram Controller" function does not work (yet) so I'm stuck there. I have a post on teh BrewPi community forum to see if folks there know why that might be happening. it's telling me:

brewpi says:
Error while programming: cannot move uploaded file

I've checked temp directory permissions and so on ... not sure where to go on this one.
 
Good evening! I am working on my RPi system and I can not seem to get temperature probes to install from the Device Configuration Screen. The probes are being recognized by the UNO and I have even put one of the probes in hot water to confirm it is working. I have scanned most of the posts and i am stuck.

My set up is: RPi 3 Model B; Installed Jessie via the NOOB system; done all the updates stated in the WIKI;

It took me a whole day to get the FW loaded into the Ardiuno but I got it!

Any help is much appreciated.

Screen Shot 2016-10-13 at 10.29.39 PM.jpg
 
Have you actually gone through the Device Configuration process and:

-assign the first probe to Device slot 0, Chamber 1, Beer 1, Beer Temp, then hit Apply.

-assign the second probe to Device slot 1, Chamber 1, Chamber Device, Chamber Temp, then hit Apply

- then refresh the Device List and see if they stuck?

There have been occasions where the serial eeprom on the Arduino had to be cleared. On the "legacy" BrewPi version (0.2.10?) Elco added a button under Maintenance Panel - Advanced Settings - Control Constants to do this...

Cheers!
 
I have tried on multiple times trying to assign the probes and refreshing to see if they stick... no go :(

any other ideas from the command prompt side? I did notice I am missing a board.txt file. I tried to update via SUDO apt-get install arduino-core but i am getting an error that the connection to the server is down.

Screen Shot 2016-10-13 at 11.09.42 PM.png
 
I got it to work!!!! I turned everything off and then tried to SUDO the Arduino Core and it updated. I went through the FW update on the webpage and then went to update the probes.

IT WORK!!!!! time for bed....
 
Hi guys,

For a while now I've been building up to using the Brewpi Controller for controlling a 3 zone fermentation chamber. 1 zone will be the coldest area for holding beer and ingredients like grain. Then 2 separate zones for fermentation.

A Raspberry Pi 3 is controlling 3 Arduino UNOs and the associated relays and DS18B20 temperature probes. I am not using a shield or an LCD display/rotary encoder. One of the relays is a 40 amp SSR. This is being used for the 5100BTU A/C unit that will keep the holding zone cold. The fermentation zones use ducted fans, controlled by the fermentation zone Arduinos, to control the temp there.

Over the past several months I've been building this out, one RPi 3 plus the 3 Arduinos. All connected via USB. It was working fine with 2 Arduinos (took me a while to get the other one) and when I added the third one this past week, I'm getting an error I cannot figure out. I've searched this forum and the Brewpi Community forums, and while this problem exists there and solutions have been noted, I haven't been able to resolve the problem with the given solutions.

RPi is running the latest version of Jessie, so the web server files are altered slightly from /var/www/... to /var/www/html/...

All Arduino's have 3 temp probes and either a 2 or 4 bank SainSmart relay board connected.

Since I am using 3 zones, I did the manual installation of the code. Here are the contents of the files:

/etc/udev/rules.d/99-arduino.rules
Code:
# Create SYMLINKS for Arduino's based on the USB hub port
# Brewpi1 is for fermentation chamber
# Brewpi2 is for conditioning(hold) chamber

SUBSYSTEM=="tty", KERNEL=="ttyACM0", KERNELS=="1-1.2", SYMLINK+="brewpi1"
SUBSYSTEM=="tty", KERNEL=="ttyACM1", KERNELS=="1-1.3", SYMLINK+="brewpi2"
SUBSYSTEM=="tty", KERNEL=="ttyACM2", KERNELS=="1-1.4", SYMLINK+="brewpi3"

Though I have 3 zones and 3 controllers, I have called the zone HOLD, FERM & FERM2
brewpi1=HOLD
brewpi2=FERM
brewpi3=FERM2

Here are the brewpi config files
HOLD:
Code:
# ======= settings above this line have been added automatically =======
# uncomment settings here, these override the settings in defaults.cfg

scriptPath = /home/brewpi/hold
wwwPath = /var/www/html/hold
port = /dev/brewpi1
altport = /dev/null
boardType = uno
beerName = HOLD
dataLogging = active

# startupDelay = 1.0
# debug = true


# On a standard pi installation, the defaults should work.
# If you are using a different linux flavor or Windows, you can set the tool locations here

# arduinoHome = c:/arduino-1.0.4/
# avrdudeHome = # 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

# on Windows, the scripts defaults to an Internet socket instead of a system socket.
# useInetSocket=true
# socketPort=6332
# socketHost=127.0.0.1

FERM:
Code:
scriptPath = /home/brewpi/ferm
wwwPath = /var/www/html/ferm
port = /dev/brewpi2
altport = /dev/null
boardType = uno

beerName = FERM
dataLogging = active

FERM2:
Code:
# ======= settings above this line have been added automatically =======
# uncomment settings here, these override the settings in defaults.cfg

scriptPath = /home/brewpi/ferm2
wwwPath = /var/www/html/ferm2
port = /dev/brewpi3
altport = /dev/null
boardType = uno
beerName = FERM2
dataLogging = active
# startupDelay = 1.0
# debug = true


# On a standard pi installation, the defaults should work.
# If you are using a different linux flavor or Windows, you can set the tool locations here

# arduinoHome = c:/arduino-1.0.4/
# avrdudeHome = # 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

# on Windows, the scripts defaults to an Internet socket instead of a system socket.
# useInetSocket=true
# socketPort=6332
# socketHost=127.0.0.1

Here are the /var/www/html/xxxx/config_user.php files:

HOLD
Code:
<?php
        // The default settings in config.php are overruled by the settings in config_user.php
        // To use custom settings, copy this file to config_user.php and make your changes in config_user.php
    // do not add a php closing tag, because newlines after closing tag might be included in the html

        // Do not include a trailing slash on the path
        $scriptPath = '/home/brewpi/hold';

FERM
Code:
<?php
$scriptPath = '/home/brewpi/ferm';

FERM2
Code:
<?php
        // The default settings in config.php are overruled by the settings in config_user.php
        // To use custom settings, copy this file to config_user.php and make your changes in config_user.php
    // do not add a php closing tag, because newlines after closing tag might be included in the html

        // Do not include a trailing slash on the path
        $scriptPath = '/home/brewpi/ferm2';

Here is the status of the brewpi.py --status command:
Code:
pi@PRM-brewpi:/home/brewpi/hold $ sudo python brewpi.py --status
[{'cfg': ConfigObj({'scriptPath': '/home/brewpi/ferm', 'wwwPath': '/var/www/html/ferm', 'port': '/dev/brewpi2', 'altport': '/dev/null', 'boardType': 'uno', 'beerName': 'FERM', 'interval': '120.0', 'dataLogging': 'active'}),
  'pid': 1613,
  'port': '/dev/brewpi2',
  'sock': {'sock': 0, 'host': 'localhost', 'type': 'f', 'port': None, 'file': '/home/brewpi/ferm/BEERSOCKET'}},
 {'cfg': ConfigObj({'scriptPath': '/home/brewpi/hold', 'wwwPath': '/var/www/html/hold', 'port': '/dev/brewpi1', 'altport': '/dev/null', 'boardType': 'uno', 'beerName': 'HOLD', 'interval': '120.0', 'dataLogging': 'active'}),
  'pid': 1617,
  'port': '/dev/brewpi1',
  'sock': {'sock': 0, 'host': 'localhost', 'type': 'f', 'port': None, 'file': '/home/brewpi/hold/BEERSOCKET'}},
 {'cfg': ConfigObj({'scriptPath': '/home/brewpi/ferm2', 'wwwPath': '/var/www/html/ferm2', 'port': '/dev/brewpi3', 'altport': '/dev/null', 'boardType': 'uno', 'beerName': 'FERM2', 'interval': '120.0', 'dataLogging': 'active'}),
  'pid': 1621,
  'port': '/dev/brewpi3',
  'sock': {'sock': 0, 'host': 'localhost', 'type': 'f', 'port': None, 'file': '/home/brewpi/ferm2/BEERSOCKET'}}]

And here is the output from the stderr.txt files for each zone controller (Shutdown then restarted the RPi):

HOLD:
Code:
Oct 15 2016 03:16:51 Opening serial port
Oct 15 2016 03:16:51 Notification: Script started for beer 'HOLD'
Oct 15 2016 03:17:01 Checking software version on controller...
Oct 15 2016 03:17:11 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.
Oct 15 2016 04:40:04 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 06:08:04 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 06:21:03 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 07:23:04 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 07:50:03 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 08:19:03 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 09:59:04 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 10:03:04 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit

FERM:
Code:
Oct 15 2016 03:09:04 Opening serial port
Oct 15 2016 03:09:04 Notification: Script started for beer 'FERM'
Oct 15 2016 03:09:14 Checking software version on controller...
Oct 15 2016 03:09:14 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port /dev/brewpi2

Oct 15 2016 03:15:48 Notification: Fridge temperature set to 67.8 degrees in web interface
Oct 15 2016 03:15:48 Controller debug message: INFO MESSAGE 12: Received new setting: mode = f
Oct 15 2016 03:15:48 Controller debug message: INFO MESSAGE 12: Received new setting: fridgeSet = 67.8
Oct 15 2016 04:15:04 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 04:18:04 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 05:16:04 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 06:14:04 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 07:26:03 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 07:39:04 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 09:54:04 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 10:14:56 Installed devices received: [{"a": "287C6A150600003F", "c": 1, "b": 0, "d": 0, "f": 6, "i": 0, "h": 2, "j": 0.0, "p": 18, "t": 1, "v": 67.549}, {"a": "28656615060000D3", "c": 1, "b": 0, "d": 0, "f": 5, "i": 1, "h": 2, "j": 0.0, "p": 18, "t": 1, "v": 67.549}, {"a": "28871215060000E6", "c": 1, "b": 1, "d": 0, "f": 9, "i": 2, "h": 2, "j": 0.0, "p": 18, "t": 1, "v": 67.549}, {"c": 1, "b": 0, "d": 0, "f": 3, "i": 3, "h": 1, "p": 5, "t": 3, "v": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 2, "i": 4, "h": 1, "p": 6, "t": 3, "v": 0, "x": 1}]
Oct 15 2016 10:14:56 Available devices received: [{"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 2, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 19, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 4, "t": 0, "x": 1}]
Oct 15 2016 10:58:03 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit

FERM2:
Code:
Oct 15 2016 03:00:05 Opening serial port
Oct 15 2016 03:00:05 Notification: Script started for beer 'FERM2'
Oct 15 2016 03:00:57 Checking software version on controller...
Oct 15 2016 03:00:57 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port /dev/brewpi3

Oct 15 2016 03:06:22 quit message received on socket. Stopping script.
Oct 15 2016 03:09:04 Opening serial port
Oct 15 2016 03:09:04 Notification: Script started for beer 'FERM2'
Oct 15 2016 03:09:14 Checking software version on controller...
Oct 15 2016 03:09:14 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port /dev/brewpi3

Oct 15 2016 03:15:14 Notification: Fridge temperature set to 66.5 degrees in web interface
Oct 15 2016 03:15:14 Controller debug message: INFO MESSAGE 12: Received new setting: mode = f
Oct 15 2016 03:15:14 Controller debug message: INFO MESSAGE 12: Received new setting: fridgeSet = 66.5
Oct 15 2016 04:01:03 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 05:09:04 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 05:46:04 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 07:16:03 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 08:15:04 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 09:41:03 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 09:50:04 Another instance of BrewPi is already running, which will conflict with this instance. This instance will exit
Oct 15 2016 10:15:14 Installed devices received: [{"a": "28443915060000A8", "c": 1, "b": 0, "d": 0, "f": 6, "i": 0, "h": 2, "j": 0.0, "p": 18, "t": 1, "v": 67.324}, {"a": "28915615060000F9", "c": 1, "b": 0, "d": 0, "f": 5, "i": 1, "h": 2, "j": 0.0, "p": 18, "t": 1, "v": 67.549}, {"a": "28571A150600001C", "c": 1, "b": 1, "d": 0, "f": 9, "i": 2, "h": 2, "j": 0.0, "p": 18, "t": 1, "v": 67.438}, {"c": 1, "b": 0, "d": 0, "f": 3, "i": 3, "h": 1, "p": 5, "t": 3, "v": 0, "x": 0}, {"c": 1, "b": 0, "d": 0, "f": 2, "i": 4, "h": 1, "p": 6, "t": 3, "v": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 4, "i": 7, "h": 1, "p": 2, "t": 3, "v": 0, "x": 0}]
Oct 15 2016 10:15:14 Available devices received: [{"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 19, "t": 0, "x": 1}, {"c": 1, "b": 0, "d": 0, "f": 0, "i": -1, "h": 1, "p": 4, "t": 0, "x": 1}]

It appears to me that only the FERM and FERM2 controllers are working and configurable. I cannot seem to program the HOLD controller.

Here is the output from the updater.py --ask command:
Code:
i@PRM-brewpi:/home/brewpi/brewpi-tools $ sudo python updater.py --ask

Using interactive (advanced) update with user input


######################################################
####                                              ####
####        Welcome to the BrewPi Updater!        ####
####                                              ####
######################################################

Checking whether the update script is up to date
/home/brewpi/brewpi-tools is up-to-date.



*** Updating BrewPi script repository ***
The path '/home/brewpi' does not seem to be a valid git repository
What path did you install the BrewPi python scripts to?/home/brewpi/hold

Stopping running instances of BrewPi
Quit message sent to BrewPi instance with pid 1613!
Quit message sent to BrewPi instance with pid 1617!
Quit message sent to BrewPi instance with pid 1621!
You are on branch legacy

Available branches on the remote 'origin' for /home/brewpi/hold:
[0] beta
[1] develop
[2] feature/ejsloggingdate
[3] legacy
[4] legacy_dev
[5] master
[6] Skip updating this repository
Enter the number of the branch you wish to update [legacy]:3
The latest commit in /home/brewpi/hold is 8b782f0fd5a1d58cfb4f6f08d37ef8f8ef51f28e on Wed, 27 Apr 2016 13:25:47
The latest commit on origin/legacy     is 8b782f0fd5a1d58cfb4f6f08d37ef8f8ef51f28e on Wed, 27 Apr 2016 13:25:47
Your local version of /home/brewpi/hold is up to date!


*** Updating BrewPi web interface repository ***
The path '/var/www' does not seem to be a valid git repository
What path did you install the BrewPi web interface scripts to? /var/www/html/hold
You are on branch legacy

Available branches on the remote 'origin' for /var/www/html/hold:
[0] beta
[1] develop
[2] feature/chart-export
[3] feature/notifications
[4] legacy
[5] master
[6] Skip updating this repository
Enter the number of the branch you wish to update [legacy]:4
The latest commit in /var/www/html/hold is 398f1b50c71904f69e836b26299dd178d9d4515a on Mon, 11 Jan 2016 07:16:11
The latest commit on origin/legacy      is 398f1b50c71904f69e836b26299dd178d9d4515a on Mon, 11 Jan 2016 07:16:11
Your local version of /var/www/html/hold is up to date!

No changes were made, skipping runAfterUpdate.sh.
If you encounter problems, you can start it manually with:
sudo /home/brewpi/hold/utils/runAfterUpdate.sh

The update script can automatically check your controller firmware version and program it with the latest release on GitHub, would you like to do this now? [Y/n]:Y
 Stopping any running instances of BrewPi to check/update controller...
[Errno 111] Connection refused
Could not connect to socket of BrewPi process, maybe it just started and is not listening yet.
Could not send quit message to BrewPi instance with pid 24155!
Killing it instead!
SIGKILL sent to BrewPi instance with pid 24155!

Checking current firmware version...
 Oct 15 2016 11:05:04   Opening serial port
 Unable to receive version from controller.
Is your controller unresponsive and do you wish to try restoring your firmware? [y/N]:
y
Warning: detected multiple compatible serial ports, using the first.
 Will try to restore the firmware on your Arduino Uno
 Assuming a Rev C shield. If this is not the case, please program your Arduino manually

Checking GitHub for available release...

Available releases:

[0] 0.2.10
[1] 0.2.9
[2] 0.2.8
[3] Cancel firmware update
Enter the number [0-3] of the version you want to program [default = 0 (0.2.10)]: 0
 Downloading firmware...
downloading https://github.com/BrewPi/firmware/releases/download/0.2.10/brewpi-arduino-uno-revC-0_2_10.hex
 Latest firmware downloaded to:
/home/brewpi/hold/utils/downloads/0.2.10/brewpi-arduino-uno-revC-0_2_10.hex

Updating firmware...

 ****    Arduino Program script started    ****
 Settings will not be restored
 Devices will not be restored
 Oct 15 2016 11:05:35   Opening serial port
 Loading programming settings from board.txt
 Checking hex file size with avr-size...
 Program size: 26896 bytes out of max 32256
Warning: detected multiple compatible serial ports, using the first.
 Programming Arduino with avrdude: /usr/share/arduino/hardware/tools/avrdude -F  -e  -p atmega328p -c arduino -b 115200 -P /dev/ttyACM2 -U flash:w:"brewpi-arduino-uno-revC-0_2_10.hex" -C /usr/share/arduino/hardware/tools/avrdude.conf
 Result of invoking avrdude:

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: erasing chip
avrdude: reading input file "brewpi-arduino-uno-revC-0_2_10.hex"
avrdude: input file brewpi-arduino-uno-revC-0_2_10.hex auto detected as Intel Hex
avrdude: writing flash (26896 bytes):

Writing | ################################################## | 100% 5.19s

avrdude: 26896 bytes of flash written
avrdude: verifying flash memory against brewpi-arduino-uno-revC-0_2_10.hex:
avrdude: load data flash data from input file brewpi-arduino-uno-revC-0_2_10.hex:
avrdude: input file brewpi-arduino-uno-revC-0_2_10.hex auto detected as Intel Hex
avrdude: input file brewpi-arduino-uno-revC-0_2_10.hex contains 26896 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 3.77s

avrdude: verifying ...
avrdude: 26896 bytes of flash verified

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done.  Thank you.


 Avrdude done, programming succesful!
 Giving the Arduino a few seconds to power up...
 Back up in 5...
 Back up in 4...
 Back up in 3...
 Back up in 2...
 Back up in 1...
 Back up in 0...
 Waiting for device to reset.
 Oct 15 2016 11:06:14   Opening serial port
 Waiting for device to reset.
 Oct 15 2016 11:06:25   Opening serial port
 Warning: Cannot receive version number from controller. Your controller is either not programmed yet or running a very old version of BrewPi. It will be reset to defaults.
 Resetting EEPROM to default settings
 Warning: Cannot receive version number from controller after programming.
Something must have gone wrong. Restoring settings/devices settings failed.

BrewPi script will restart automatically.
Firmware update done


*** Done updating BrewPi! ***

And finally, the cron jobs:

HOLD:
Code:
pi@PRM-brewpi:/etc/cron.d $ cat brewpi_hold
PYTHON=/usr/bin/python
SCRIPTPATH=/home/brewpi/hold

* * * * * 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 &

FERM:
Code:
pi@PRM-brewpi:/etc/cron.d $ cat brewpi_ferm
PYTHON=/usr/bin/python
SCRIPTPATH=/home/brewpi/ferm

* * * * * 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 &

FERM2:
Code:
pi@PRM-brewpi:/etc/cron.d $ cat brewpi_ferm2
PYTHON=/usr/bin/python
SCRIPTPATH=/home/brewpi/ferm2
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 &

I do have one other cron job that runs the wifi checker job, but I don't think it's running because the /home/brewpi folder only has subfolders in it.
Code:
pi@PRM-brewpi:/etc/cron.d $ cat brewpi
stderrpath="/home/brewpi/logs/stderr.txt"
stdoutpath="/home/brewpi/logs/stdout.txt"
scriptpath="/home/brewpi"
entries="brewpi wifichecker"
# 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 &
# entry:wifichecker
*/10 * * * * root sudo -u brewpi touch $stdoutpath $stderrpath; $scriptpath/utils/wifiChecker.sh 1>>$stdoutpath 2>>$stderrpath &


UPDATE:
I connected the offending Arduino to my PC and loaded the BLINK program to it. Board LED on pin 13 is blinking as it should.

Connected the board back to the Pi and ran updater.py --ask.
Different output this time.
Code:
pi@PRM-brewpi:/home/brewpi/brewpi-tools $ sudo python updater.py --ask

Using interactive (advanced) update with user input


######################################################
####                                              ####
####        Welcome to the BrewPi Updater!        ####
####                                              ####
######################################################

Checking whether the update script is up to date
/home/brewpi/brewpi-tools is up-to-date.



*** Updating BrewPi script repository ***
The path '/home/brewpi' does not seem to be a valid git repository
What path did you install the BrewPi python scripts to?/home/brewpi/hold

Stopping running instances of BrewPi
Quit message sent to BrewPi instance with pid 8421!
Quit message sent to BrewPi instance with pid 8428!
Quit message sent to BrewPi instance with pid 8464!
You are on branch legacy

Available branches on the remote 'origin' for /home/brewpi/hold:
[0] beta
[1] develop
[2] feature/ejsloggingdate
[3] legacy
[4] legacy_dev
[5] master
[6] Skip updating this repository
Enter the number of the branch you wish to update [legacy]:3
The latest commit in /home/brewpi/hold is 8b782f0fd5a1d58cfb4f6f08d37ef8f8ef51f28e on Wed, 27 Apr 2016 13:25:47
The latest commit on origin/legacy     is 8b782f0fd5a1d58cfb4f6f08d37ef8f8ef51f28e on Wed, 27 Apr 2016 13:25:47
Your local version of /home/brewpi/hold is up to date!


*** Updating BrewPi web interface repository ***
The path '/var/www' does not seem to be a valid git repository
What path did you install the BrewPi web interface scripts to? /var/www/html/hold
You are on branch legacy

Available branches on the remote 'origin' for /var/www/html/hold:
[0] beta
[1] develop
[2] feature/chart-export
[3] feature/notifications
[4] legacy
[5] master
[6] Skip updating this repository
Enter the number of the branch you wish to update [legacy]:4
The latest commit in /var/www/html/hold is 398f1b50c71904f69e836b26299dd178d9d4515a on Mon, 11 Jan 2016 07:16:11
The latest commit on origin/legacy      is 398f1b50c71904f69e836b26299dd178d9d4515a on Mon, 11 Jan 2016 07:16:11
Your local version of /var/www/html/hold is up to date!

No changes were made, skipping runAfterUpdate.sh.
If you encounter problems, you can start it manually with:
sudo /home/brewpi/hold/utils/runAfterUpdate.sh

The update script can automatically check your controller firmware version and program it with the latest release on GitHub, would you like to do this now? [Y/n]:Y
 Stopping any running instances of BrewPi to check/update controller...
Quit message sent to BrewPi instance with pid 8601!
[Errno 111] Connection refused
Could not connect to socket of BrewPi process, maybe it just started and is not listening yet.
Could not send quit message to BrewPi instance with pid 8603!
Killing it instead!
SIGKILL sent to BrewPi instance with pid 8603!
Quit message sent to BrewPi instance with pid 8606!

Checking current firmware version...
 Oct 15 2016 17:07:17   Opening serial port
 Unable to receive version from controller.
Is your controller unresponsive and do you wish to try restoring your firmware? [y/N]:
y
Warning: detected multiple compatible serial ports, using the first.
 Will try to restore the firmware on your Arduino Uno
 Assuming a Rev C shield. If this is not the case, please program your Arduino manually

Checking GitHub for available release...

Available releases:

[0] 0.2.10
[1] 0.2.9
[2] 0.2.8
[3] Cancel firmware update
Enter the number [0-3] of the version you want to program [default = 0 (0.2.10)]: 0
 Downloading firmware...
downloading https://github.com/BrewPi/firmware/releases/download/0.2.10/brewpi-arduino-uno-revC-0_2_10.hex
 Latest firmware downloaded to:
/home/brewpi/hold/utils/downloads/0.2.10/brewpi-arduino-uno-revC-0_2_10.hex

Updating firmware...

 ****    Arduino Program script started    ****
 Settings will not be restored
 Devices will not be restored
 Oct 15 2016 17:07:49   Opening serial port
 Loading programming settings from board.txt
 Checking hex file size with avr-size...
 Program size: 26896 bytes out of max 32256
Warning: detected multiple compatible serial ports, using the first.
 Programming Arduino with avrdude: /usr/share/arduino/hardware/tools/avrdude -F  -e  -p atmega328p -c arduino -b 115200 -P /dev/ttyACM0 -U flash:w:"brewpi-arduino-uno-revC-0_2_10.hex" -C /usr/share/arduino/hardware/tools/avrdude.conf
 Result of invoking avrdude:
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xbf
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xd9
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x47
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x1e
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x0a
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xb6
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x92
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xd9
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xcd
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xb3

avrdude done.  Thank you.


 There was an error while programming.
BrewPi script will restart automatically.
Firmware update done


*** Done updating BrewPi! ***

Additional research on this error...


What am I missing?

Thanks in advance for all of your help! This forum and great and the brewpi project is awesome!

Paul
 
SOOOOO, after all of the above and this one Arduino would not accept a program from the Pi, I

1. Shutdown the Pi
2. Unplugged the 2 other Arduinos leaving the problem Arduino and the USB WIFI dongle
3. Ran the updater.py program

which successfully loaded the program!!

I shutdown the Pi again, reconnected the two working Arduino's and now everything is working.

I have no idea why this would not work. Accept that maybe the device went from ttyACM2 to ttyACM0 when it was alone connected. When I reconnected the other 2 Arduino's I'm assuming it went back to ttyACM2 since all of the Brewpi web interface programming is working as it should.

I have no other explanation.

Thanks,
Paul
 
@stlbeer,

I would highly recommend that you set up the SYMLINK's by serial number rather than by kernel, as suggested by @day_trippr in This Post This way it doesn't matter which USB port you use, the Arduinos are always assigned to the same chamber.
 
SOOOOO, after all of the above and this one Arduino would not accept a program from the Pi, I

1. Shutdown the Pi
2. Unplugged the 2 other Arduinos leaving the problem Arduino and the USB WIFI dongle
3. Ran the updater.py program

which successfully loaded the program!!

I shutdown the Pi again, reconnected the two working Arduino's and now everything is working.

I have no idea why this would not work. Accept that maybe the device went from ttyACM2 to ttyACM0 when it was alone connected. When I reconnected the other 2 Arduino's I'm assuming it went back to ttyACM2 since all of the Brewpi web interface programming is working as it should.

I have no other explanation.

Thanks,
Paul


The problem you are having is boiled down to the high powered pi3 trying to power 3 arduinos at once. you need to get a powered USB hub. and definitely use the serial number approach by using symlinks as addressed earlier
 
The problem you are having is boiled down to the high powered pi3 trying to power 3 arduinos at once. you need to get a powered USB hub. and definitely use the serial number approach by using symlinks as addressed earlier

If that is the case it is not necessary to get a powered USB hub. Just replace the Pi PSU with a higher-current PSU.
 
fwiw, the RPi3B has a 2.5A PTC at the power input, so that's going to limit how much current one can draw "through" the board from the 5V rail...

Cheers!
 
But an Arduino uses very little power, so it's probably not that anyway.
 
Thanks for the feedback guys. Somehow I missed the SYMLINK assignments by serial number post. I like that much better than using the KERNALs. I am using a 2.5A/5v power supply, but have been considering using something larger in amperage as well as powering the Arduinos separately.
 
I thought I would share this here, since there's a good number of newer Raspbian users.

Apparently there's a new desktop interface called "Pixel" released with the latest Jessie, dated 2016-09-23. There is a bug between this and xrdp which a lot of us use to connect to our Raspberry Pi's desktop with Microsoft Terminal Server Client (mstsc). It will connect to the familiar X window and hang displaying something like this:

Code:
connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to sesman
login successful for display 10
started connecting
connecting to 127.0.0.1 5910
error - problem connecting

If you press "ok" it will present you with a credentials prompt and if you re-enter credentials it will give the same error.

To fix this, do the following:

Code:
sudo apt-get --purge remove xrdp
sudo apt-get --purge realvnc-vnc-server

sudo apt-get install tightvncserver tightvnc-java
sudo apt-get install xrdp

sudo reboot
 
But an Arduino uses very little power, so it's probably not that anyway.


Hmm so I guess back when we all addressed this issue and found the pi to be lacking in power to handle 3-4 arduinos at once and found the powered USB hub to be a great solution and it all eventually led to bringing the bt option into play for multiple chambers isn't enough for me to be confident enough to not even finish reading the guys post to reply "get a powered hub" can just be shot down with "I guess the pi is powerful enough because the arduino doesn't use that much power" argument. seems legit….
 
Hmm so I guess back when we all addressed this issue and found the pi to be lacking in power to handle 3-4 arduinos at once and found the powered USB hub to be a great solution and it all eventually led to bringing the bt option into play for multiple chambers isn't enough for me to be confident enough to not even finish reading the guys post to reply "get a powered hub" can just be shot down with "I guess the pi is powerful enough because the arduino doesn't use that much power" argument. seems legit….

Indeed. That's how progress is made.

It depends what Pi you were talking about. Early Pi's had a very restrictive Polyfuse that would prevent even moderate current from being drawn, so a powered hub had to be used. Pi 3 has a much less restrictive fuse, so any current that it is not using for itself can be used by devices powered from the 5V pin or the USB 5V rail.

It also depends on what PSU is being used. A lot of them are rubbish and won't deliver their rated current. If it's a cell-phone charger then it might deliver the current for a while, but they are intended to be used for a few hours, not continuously, so they fail eventually.

So, if you have a Pi 3 and a capable 2.5A PSU then you should have about an amp to spare to power USB devices. Probably more. An Arduino uses about 50 - 150mA, so four of those will add up to 200 - 600mA, depending on the model, but well within the extra margin.

YMMV, but it's worth discussing why these workarounds (e.g. powered hubs) were suggested in the past, and whether they are still relevant.

Pi power consumption here:
https://www.element14.com/community...rrent-consumption-power-and-temperature-tests

Arduino consumption here:
https://tlextrait.svbtle.com/arduino-power-consumption-compared
 
That's assuming that your pi isn't dumping power into the built in wifi and BT. and also the new cpu consumes much more power than before, hence the necessity for 2.5a or better power supplies. Considering you can't reliably run a pi3 on anything less than 2.5amp that would immediately throw up a flag for power consumption issues once you max out the USB ports. just because the data sheet says you're good doesn't mean that everyone is using genuine Italian arduinos and proper psu's. fwiw back in the pi b+ days I even had issues programming more than 2 arduinos even if they were independently powered. powered USB hub solved that issue too. the older pis could even be powered from the hub itself over the USB connection, I don't know if that's still true with the new pi3s
 
That's assuming that your pi isn't dumping power into the built in wifi and BT. and also the new cpu consumes much more power than before, hence the necessity for 2.5a or better power supplies. Considering you can't reliably run a pi3 on anything less than 2.5amp that would immediately throw up a flag for power consumption issues once you max out the USB ports. just because the data sheet says you're good doesn't mean that everyone is using genuine Italian arduinos and proper psu's. fwiw back in the pi b+ days I even had issues programming more than 2 arduinos even if they were independently powered. powered USB hub solved that issue too. the older pis could even be powered from the hub itself over the USB connection, I don't know if that's still true with the new pi3s

Here's a measurement with wifi and bt on:
https://m.youtube.com/watch?v=E9pZkS7mnq8

It's just under an amp.
 
Hey guys, I noticed something interesting the other day. I had turned my BrewPi controlled chambers to "OFF" for the day, leaving the system on to monitor the temps, so I could move it around and work on the outside of it. When I went to turn back on to "Fridge Constant" I noticed the room temp graph had considerable LESS noise in the temps.



Notice at about 15:00-15:30 the noise in the room temp settled down considerably. The only thing I did was turn the controller to "OFF" so it would monitor the temps.

What could be causing this noise and how might I be able to get rid of it? I don't think it causes any problems though.

Thanks,
Paul
 
My personal bet would be that there's more filtering going on when you see less noise .... but I can't say for sure. It's interesting.
 
Display the fridge temp. I expect the ripple in the fridge temp is just showing up in the room temp probe. How isolated is the room from the fridge? If the room temp is measured near the outside of the fridge, then the external heating from running the condenser will modulate the room temp.
 
Display the fridge temp. I expect the ripple in the fridge temp is just showing up in the room temp probe. How isolated is the room from the fridge? If the room temp is measured near the outside of the fridge, then the external heating from running the condenser will modulate the room temp.


I thought the same thing, but if you look at the annotations, you'll see the only thing that came on was the heater, not the cooler (which is a 5100BTU room a/c).

I turned the system back on and you can see the erratic recording of the room temps. Chamber temps don't reflect this. The room temp probe is simply in the air and the other probes are in 5 gallons of water for this test.

View attachment ImageUploadedByHome Brew1477264336.580676.jpg
 
This is from only 1 chamber of a 3 chamber system. The coldest air is in chamber 1 and it is pulled via induction fans to the fermentation chambers as needed. This coldest chamber has the a/c in it and while the a/c has been running, it was not running for the period of this anomaly. It IS interesting to note that the same anomaly occurred in the holding chamber temp logger at very nearly the same time, but not at exactly the same time.

I'm going to go back and review some previous tests, but the only thing that changed recently was that I installed 2 BrewPi shields (from Cadibrewer, day_trippr & BigDaddyAle design) along with LCD's and rotary encoders. I also installed a powered USB hub.
 
I was gonna say, these are digital probes on a digital platform.
A shield isn't going to cause these behavioral issues.
My uninformed SWAG is BrewPi is reading probes too quickly to allow full conversion...

Cheers!
 
I have an interesting problem that I was hoping someone would have some insight on. When I experience a power outage, or reboot my Pi, it reverts to a beer I was fermenting in March, both the graph and the temp profile. I have 2 totally independent chambers and this is only happening on one of them.

Tonight I *thought* I reloaded everything from scratch. I downloaded the latest Raspian load, Jessie, and reimaged my SD card. As part of the process, I loaded the latest Arduino load as well, I think it was 0.2.10, and chose not to save or restore any settings.

I completed everything and and loaded the webpage and all of my old profiles and Previous Beers are still there! How is that? And worse yet, I rebooted my Pi and it reverted to the same brew from March! :confused:

Has anyone experienced anything similar? Or can someone explain how it still has all my data on previous brews? I'm at a loss...
 
lol

Ok, I'll offer this: if referring to http://docs.brewpi.com/advanced-setups/multiple-arduinos-single-rpi.html, there's a better mechanism to exploit than using kernel ids.

That is, use the Arduino serial numbers instead, which has the major advantage that the symlink value never, ever changes, no matter how many/how few Arduinos are connected.

It's pretty much the same procedure to find the serial number for each Arduino, then you edit the same arduino.rules file, but the key parameter is different.

eg:

Code:
$ udevadm info -a -n /dev/ttyACM0 | less > info.log

$ sudo nano info.log
.
.
.
	KERNEL=="ttyACM0"
	ATTRS{manufacturer}=="Arduino (www.arduino.cc)"
	ATTRS{serial}=="9543231383735150F0D1"
.
.
.

Record the serial number, then repeat for each Arduino.

Then, create the rules file:

Code:
$ sudo nano /etc/udev/rules.d/99-arduino.rules

SUBSYSTEM=="tty", KERNEL=="ttyACM*" , ATTRS{serial}=="9543231383735150F0D1", SYMLINK+="brewpi1", GROUP="brewpi"
SUBSYSTEM=="tty", KERNEL=="ttyACM*" , ATTRS{serial}=="9425672387582557E2F0", SYMLINK+="brewpi2", GROUP="brewpi"

Cheers!
 
Tonight I *thought* I reloaded everything from scratch. I downloaded the latest Raspian load, Jessie, and reimaged my SD card. As part of the process, I loaded the latest Arduino load as well, I think it was 0.2.10, and chose not to save or restore any settings.

I completed everything and and loaded the webpage and all of my old profiles and Previous Beers are still there! How is that? And worse yet, I rebooted my Pi and it reverted to the same brew from March! :confused:

Has anyone experienced anything similar? Or can someone explain how it still has all my data on previous brews? I'm at a loss...
The simplest answer is that you did not start from scratch. Without knowing how you did it, then trying to reproduce it (not really interested in trying) you did not clear the data in \home\brewpi\data or \home\brewpi\settings

I can't say why it reverts to a given profile. I know that the Pi is responsible for the profile so maybe the Pi remembers that it is using a profile but not which one? And it picks the first one in the list? Is that a possibility?
 
The simplest answer is that you did not start from scratch. Without knowing how you did it, then trying to reproduce it (not really interested in trying) you did not clear the data in \home\brewpi\data or \home\brewpi\settings

I can't say why it reverts to a given profile. I know that the Pi is responsible for the profile so maybe the Pi remembers that it is using a profile but not which one? And it picks the first one in the list? Is that a possibility?

I think I've realized the error of my ways in the reload, I'll try it again tonight. The profile reverting back after a reboot is a very strange thing though. I tried editing xstartup to allow for copying and pasting into tightvnc and that file wouldn't save through a reboot either. It's like my Pi can't write RAM to disk. I'll report back after I *really* reload
 
I think I've realized the error of my ways in the reload, I'll try it again tonight. The profile reverting back after a reboot is a very strange thing though. I tried editing xstartup to allow for copying and pasting into tightvnc and that file wouldn't save through a reboot either. It's like my Pi can't write RAM to disk. I'll report back after I *really* reload


Hope u have a backup of your sd card. sounds like the power failure borked your card.
 
Status
Not open for further replies.

Latest posts

Back
Top