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 downloaded the latest NOOBS file which installs Raspbian Jessie. I almost got it to work but it won't give me an IP address at the end.
[...]

New installations of the Apache2 web server cause in-bound web requests to default to /var/www/html - where older versions try to resolve them to /var/www.
If you installed BrewPi rooted at /var/www as was the standard model, Apache2 isn't going to try to use it (for lack of better phraseology).

So you either need to install BrewPi so it is rooted at /var/www/html, or change the Apache2 DocumentRoot setting back to /var/www...

Cheers!
 
Ok, if you can see both Chamber and Beer temperatures in the gui, this indicates pretty near everything is working.

Yes, there's a reset button in the corner of the Uno near the USB receptacle.
You can push that any time.

I would go into the gui and verify that you (still) have actuators set up for cooling (and heating if you use that). If BrewPi doesn't have any actuators set up I believe it will behave exactly as you're seeing.

Then, set up a simple Beer Constant mode with the temperature goal set above or below the current Beer sensor temperature and see what happens.

You might also check the log file via the gui and see if there are any messages of interest therein...

Cheers!


So I reset the uno but while looking through the logs I realized I had it set higher than the max allowed temp. This is why it was not working. I adjusted the max and min. and tested. Seems to be working. Thanks!

Second question. When viewing in a browser, "Script not running" will appear then it will go back to displaying info and "script running". It will continue swapping back and forth. What can I do to fix this?
 
Ok, if you can see both Chamber and Beer temperatures in the gui, this indicates pretty near everything is working.

Yes, there's a reset button in the corner of the Uno near the USB receptacle.
You can push that any time.

I would go into the gui and verify that you (still) have actuators set up for cooling (and heating if you use that). If BrewPi doesn't have any actuators set up I believe it will behave exactly as you're seeing.

Then, set up a simple Beer Constant mode with the temperature goal set above or below the current Beer sensor temperature and see what happens.

You might also check the log file via the gui and see if there are any messages of interest therein...

Cheers!


So I reset the uno but while looking through the logs I realized I had the temp set higher than the max allowed temp. This is why it was not working. I adjusted the max and min. and tested. Seems to be working. Thanks!

Second question. When viewing in a browser, "Script not running" will appear then it will go back to displaying info and "script running". It will continue swapping back and forth. What can I do to fix this?
 
Happy it was a simple "IO error" ;)

Is your Uno connected via USB or something else?
I have a bunch of BrewPi configurations that use remoted Unos connected via Bluetooth or WiFi instead of USB.
Occasionally I'll catch one of their web pages showing "script not running" but it quickly goes back to the normal display.

I don't worry about it...

Cheers!
 
So I reset the uno but while looking through the logs I realized I had the temp set higher than the max allowed temp. This is why it was not working. I adjusted the max and min. and tested. Seems to be working. Thanks!



Second question. When viewing in a browser, "Script not running" will appear then it will go back to displaying info and "script running". It will continue swapping back and forth. What can I do to fix this?


The script not running on and off problem is usually a result of using safari
 
Good memory, I totally forgot about that syndrome :)

Cheers!

[edit] And I forgot I had recorded the fix:

Edit this apache2 configuration file:
sudo nano /etc/apache2/apache2.conf

Change "KeepAliveTimeout 5" to "KeepAliveTimeout 99" to deal with LCD text refresh bug.
Save the file then restart Apache2:

sudo /etc/init.d/apache2 restart
 
New installations of the Apache2 web server cause in-bound web requests to default to /var/www/html - where older versions try to resolve them to /var/www.
If you installed BrewPi rooted at /var/www as was the standard model, Apache2 isn't going to try to use it (for lack of better phraseology).

So you either need to install BrewPi so it is rooted at /var/www/html, or change the Apache2 DocumentRoot setting back to /var/www...

Cheers!

Ok thanks for the help. I thought BrewPi was already rooted to /var/www/html because it asked me if that's where I want to install it. But I'm sure I'm missing something.

How exactly do I go about setting the Apache2 DocumentRoot back to /var/www?

Do I just go into the document and edit the "/var/www/html" to "/var/www"?

And how can I verify that my installation is actually rooted in /var/www rather than /var/www/html?
 
Ok thanks for the help. I thought BrewPi was already rooted to /var/www/html because it asked me if that's where I want to install it. But I'm sure I'm missing something.

Well, not necessarily.

And how can I verify that my installation is actually rooted in /var/www rather than /var/www/html?

If you go into /var/www/html and find a bunch of files that look like they belong to BrewPi (it will be obvious) then you did root the installation there and we're looking at a different problem. Otoh if you don't find BrewPi files there, look in /var/www.

How exactly do I go about setting the Apache2 DocumentRoot back to /var/www?
Do I just go into the document and edit the "/var/www/html" to "/var/www"?

Edit /etc/apache2/sites-available

Find the DocumentRoot setting and change it from /var/www/html to /var/www.
Save the file then restart Apache2:
sudo /etc/init.d/apache2 restart

Cheers!
 
Well, not necessarily.



If you go into /var/www/html and find a bunch of files that look like they belong to BrewPi (it will be obvious) then you did root the installation there and we're looking at a different problem. Otoh if you don't find BrewPi files there, look in /var/www.



Edit /etc/apache2/sites-available

Find the DocumentRoot setting and change it from /var/www/html to /var/www.
Save the file then restart Apache2:
sudo /etc/init.d/apache2 restart

Cheers!

Thanks! Unfortunately, we're looking at a different problem. There's a bunch of files in the /var/www/html forlder. And the DocumentRoot file shows /var/www/html there too.

Not sure what the issue is. I could always just format the sd card and install Wheezy. I was just hoping to have it work on Jessie. I think the OS I used a couple months ago was Jessie, although the one I'm using now is the latest NOOBS file for Jessie.
 
I have everything I've run on Wheezy running on Jessie, so no need to regress.
We just need to figure out what's not working.

btw, the "latest Noobs" is actually Stretch. You have to dig into the archives to pull a Jessie release out...

Cheers!
 
I have everything I've run on Wheezy running on Jessie, so no need to regress.
We just need to figure out what's not working.

btw, the "latest Noobs" is actually Stretch. You have to dig into the archives to pull a Jessie release out...

Cheers!

Whoa well that might do it. I can't keep up with these things!

Ok that could explain why I was able to run on Jessie before and now I can't. It's not Jessie anymore!

I'll try to find a Jessie release and install that. Should be as straightforward as last time.
 
What are the gotchas? We should list them .the ones that got me
UNO chip sets, ch340g
DS18B20 temp. sensors parasite power
Headless wifi start up on Jessie

I wish I had the ability to update the wikia. seems like there are a lot of gotchas from the original install. this format doesn't help.http://diybrewpi.wikia.com/wiki/DIYBrewPi_Wikia
missing out on the new nano 2.01 shield by Cadibrewer/day_trippr.
 
And I forgot I had recorded the fix:

Edit this apache2 configuration file:
sudo nano /etc/apache2/apache2.conf

Change "KeepAliveTimeout 5" to "KeepAliveTimeout 99" to deal with LCD text refresh bug.
Save the file then restart Apache2:

sudo /etc/init.d/apache2 restart
And the easy command based fix is:
Code:
sudo sed -i -e 's/KeepAliveTimeout 5/KeepAliveTimeout 99/g' /etc/apache2/apache2.conf

sudo service apache2 restart
 
I wish I had the ability to update the wikia. seems like there are a lot of gotchas from the original install. this format doesn't help.http://diybrewpi.wikia.com/wiki/DIYBrewPi_Wikia
missing out on the new nano 2.01 shield by Cadibrewer/day_trippr.

I think anyone can edit the wiki.

I haven't added the shield version 2.01 for the Nano because I haven't had a chance to order the latest version and solder it up to field test it. You've given me the motivation to do it and to update the soldering instructions to differentiate between the original 1.01 and 1.2 without the p-fet.
 
What are the gotchas? We should list them .the ones that got me
UNO chip sets, ch340g
DS18B20 temp. sensors parasite power
Headless wifi start up on Jessie

Check out day_trippr's roll up on the Raspberry Pints thread. He has all of the gotchas there including the new Apache locations. We should include a note on Safari for posterity's sake.
 
I have everything I've run on Wheezy running on Jessie, so no need to regress.
We just need to figure out what's not working.

btw, the "latest Noobs" is actually Stretch. You have to dig into the archives to pull a Jessie release out...

Cheers!

I downloaded NOOBS for Jessie and it worked perfectly. Thank you for all your help. I'm back up and running.

Any way to make a backup of the SD card so that I can just restore it quickly if this ever happens again?
 
@day_trippr has an excellent method of handling incremental backups of all of his devices. He has outlined his method somewhere in this mammoth thread (or perhaps it's in one of the other threads he is so helpful on), so a search is in order for that one.

I just use Win32DiskImager to create a full size backup on my hard drive whenever I make any risky changes.
 
Honestly, the easiest and most assured to work when you need it method is to live clone the running SD card.
How you do that depends on the OS version.

If you installed Jessie with the LXDE desktop there is a built in SD Card Copier utility accessible through the gui. I don't know about other Jessie desktops but I'd be surprised if they all didn't acquire that tool.

All you need is a second SD card and a cheap USB card reader, run the Copier utility, pick the source and go. When complete, shut down the RPi, remove the old SD card and stick in the new one, power up and go. Now you have a known-good backup.

For Wheezy I used to go through the cloning process manually but eventually found a good/easy to use cloning utility on Github at https://github.com/billw2/rpi-clone
After installing the package, stick an SD card in your reader, plug it into the RPi, then launch rpi-clone:

$ sudo rpi-clone sdc -f -v

The -v verbose switch will give you something to watch while the cloning process is running. Leave out the -v switch and the console will just sit there while the process is churning away, providing you with no clue as to progress until it's done.

Anyway, that's about it. I use both of these between my Jessie and Wheezy systems and they just plain work.

The one other thing I do is to have my "production" systems automatically push copies of any databases or important log files up to a NAS drive each evening at midnite.
For the most part those are the only important files that change with any real frequency, so if a system craps out tomorrow and I stick its backup card in, I can easily bring that system back to the last checkpoint.

Of course if I do a significant update to a system, once it has run long enough to prove it's still stable I'll do the clone thing again.

The amount of time a solid backup can save is staggering when you think about it...

Cheers!
 
The amount of time a solid backup can save is staggering when you think about it...

Cheers!

You got that right, brother. I run the rpi-clone command from a scheduler once a week and before doing any critical work such as upgrades and updates. Once you have it the way you want it, protect your work. It's too easy to forget what you've done.
 
The one other thing I do is to have my "production" systems automatically push copies of any databases or important log files up to a NAS drive each evening at midnite.
For the most part those are the only important files that change with any real frequency, so if a system craps out tomorrow and I stick its backup card in, I can easily bring that system back to the last checkpoint.

How do you accomplish this part?
 
It's a bit of a process to get set up.
Basically I have a USB attached drive behind my router which serves as a NAS node.
The network path to the root of the NAS drive is shown as //192.168.1.251/USB_Storage/
I refer to it as "ReadyShare" which you'll see in the setup.

Each RPi will have a folder (eg: system RPINTS will use //192.168.1.251/USB_Storage/rpints) so systems don't step on each other.
Obviously a different path will require appropriate modifications through the instructions.

==============================================

To access an SMB network share will require cifs-utils package to be installed on Raspbian.
I don't know if it is installed as part of the base OS release or not - I suspect it is as I can't find any mention of installing it separately in any of my system logs - so check first:

dpkg -s cifs-utils

if this shows:

Package: cifs-utils
Status: install ok installed


you're good to continue.
If it isn't installed, do:

sudo apt-get update
sudo apt-get install -y cifs-utils



Next, create a local folder on the Pi where we want to mount the remote network folder.
You will need a separate local folder for each network folder that you want to mount.
We will create the local folder under the /media folder; each system will have its own target folder on the NAS drive.

On system RPINTS:
sudo mkdir -p /media/readyshare/rpints

Then edit /etc/fstab file (with root privileges) and add this line:

//192.168.1.251/USB_Storage/rpints /media/readyshare/rpints cifs user=guest,domain=CORP,password=,sec=ntlm

This should map the ReadyShare NAS folder for system RPINTS and user pi as a guest requiring no password.

Now that we have added this to our /etc/fstab, we need to (re)mount all entries listed in /etc/fstab:

sudo mount -a

Or, individual mount commands can be issued:

sudo mount -vt cifs //192.168.1.251/USB_Storage/rpints /media/readyshare/rpints -o user=guest,domain=CORP,password=,sec=ntlm


Either works. Able to copy rpints database (ibdata1) to the ReadyShare NAS folder as ROOT:

root@rpints:/var/lib/mysql# cp ibdata1 /media/readyshare/rpints/


fyi, to Unmount the NAS folder:
sudo umount /media/readyshare/rpints


Next, set up a cron task to stop MYSQL, copy key files to the NAS share, then restart MYSQL:
Create backup bash script backup.sh using your favorite editor.
In this example I'm copying a pair of RaspberryPints database files to the NAS folder for system RPINTS.
You can put in as many file copy commands as you like.

sudo service mysql stop
cp /var/lib/mysql/ibdata1 /media/readyshare/rpints
cp /var/www/tempdata.db /media/readyshare/rpints
sudo service mysql start



Save and exit, then go into the crontab for user root:

sudo crontab -e -u root

and add the command to execute backup.sh at 12:05AM every night:

5 0 * * * /home/pi/backup.sh > /dev/null 2>&1

Save and exit.

Done!

Repeat the setup for each RPi system (BPINTS, CPINTS, RASPI1,RASPI2,RASPICAM) pointing to their invidual NAS folders.

==============================================

Hopefully that's clear, but feel free to ask questions...

Cheers!
 
Thanks for the detailed instructions and for taking the time to write this up. There are a few skills here that I haven't used before, so this is extremely helpful.
 
fwiw, I've edited that post about 10 times now so make sure you grab a fresh copy.

Most of the procedural stuff I post is pulled out of system logs (with a bakers dozen of machines big, small and medium here, I'm quite OC about system logs).
That said, I write totally "stream of consciousness" style in logs, so I do have to add contextual comments so actual humans can follow along.
Only once though - then I copy the commented version back to the appropriate log file :)

Cheers!
 
I am having a problem with my BrewPi, it will not save the settings when I restart. I am not using a Pi but instead I have it installed on my home server running Ubuntu 16.04. After researching this it seems I need to reset the data in EEPROM. Problem is when I run that I get permission denied, even running it as sudo.

Code:
$ dmesg | grep tty
[    3.741853] cdc_acm 5-2:1.0: ttyACM0: USB ACM device

Code:
$ sudo echo -ne 'E\n' > /dev/ttyACM0
-bash: /dev/ttyACM0: Permission denied
 
Not sure what the difference is between running that as sudo vs su, but the permission denied error is gone, but my devices and settings still don't save on restart.

In this case, it's actually an order of operations thing. The command you had was:

Code:
sudo echo -ne 'E\n' > /dev/ttyACM0

If you break this apart, you're doing two things --
First, you're executing sudo echo -ne 'E\n'
Once that returns, you're then piping it to /dev/ttyACM0

The problem is that while the 'echo' command is sudo'ed, the act of piping it isn't -- and it's the act of piping it that is what you need sudo'ed.

By doing sudo su, you change your user to root which then means that every part of the command - including the piping - is elevated.
 
In this case, it's actually an order of operations thing. The command you had was:

Code:
sudo echo -ne 'E\n' > /dev/ttyACM0

If you break this apart, you're doing two things --
First, you're executing sudo echo -ne 'E\n'
Once that returns, you're then piping it to /dev/ttyACM0

The problem is that while the 'echo' command is sudo'ed, the act of piping it isn't -- and it's the act of piping it that is what you need sudo'ed.

By doing sudo su, you change your user to root which then means that every part of the command - including the piping - is elevated.

Not sure why it didn't occur to me that the sudo didn't get passed through the pipe, nice explanation, learn something new everyday.

Settings still don't save, any other ideas?
 
Not sure why it didn't occur to me that the sudo didn't get passed through the pipe, nice explanation, learn something new everyday.

Settings still don't save, any other ideas?

Well normally in this situation I would recommend you reset the EEPROM... :(

The only suggestion I have would be to try another Uno.
 
Hello all,

I've been trying to setup my RaspBi 3, Ardunio Uno, BrewPi and Tilt on my workbench for a little bit now and can't seem to get them all to work together.


I can follow the http://diybrewpi.wikia.com for either one or multiple chambers/arduinos and get it working fine.

But when I load/copy in the https://github.com/sibowler/brewpi-brewometer scripts/etc to get it to work with my Tilt...everything seems to break.

I can get the the TiltHydrometerTest.py to show the data from my Tilt, but the scripts don't seem to run once I copy them over the original BrewPi scripts.

I'm at a loss here.

Any ideas?
 
Hello all,

I've been trying to setup my RaspBi 3, Ardunio Uno, BrewPi and Tilt on my workbench for a little bit now and can't seem to get them all to work together.


I can follow the http://diybrewpi.wikia.com for either one or multiple chambers/arduinos and get it working fine.

But when I load/copy in the https://github.com/sibowler/brewpi-brewometer scripts/etc to get it to work with my Tilt...everything seems to break.

I can get the the TiltHydrometerTest.py to show the data from my Tilt, but the scripts don't seem to run once I copy them over the original BrewPi scripts.

I'm at a loss here.

Any ideas?

Damn! Now I want one of these thingies and I haven't even finished building my BrewPi boxes, keen to see you solve this one, maybe I'll have to join the struggle...
 
Hello all,

I've been trying to setup my RaspBi 3, Ardunio Uno, BrewPi and Tilt on my workbench for a little bit now and can't seem to get them all to work together.


I can follow the http://diybrewpi.wikia.com for either one or multiple chambers/arduinos and get it working fine.

But when I load/copy in the https://github.com/sibowler/brewpi-brewometer scripts/etc to get it to work with my Tilt...everything seems to break.

I can get the the TiltHydrometerTest.py to show the data from my Tilt, but the scripts don't seem to run once I copy them over the original BrewPi scripts.

I'm at a loss here.

Any ideas?

The person responsible for that GitHub page is pretty active over on the BrewPi forums, perhaps he can help if the answer is not already in the massive Brewometer Integration thread over there...
 
Thanks. I put my issues into that thread as well...though it looks like they are more BrewPi Spark as opposed t BrewPi Adruino.

I'm mostly good...just can't figure out how to get my Tilt to send data as Fahrenheit as opposed to Celsius.

With it all sitting on my bench, having 2 probes say the temp is 75*F and one saying 26*F makes my chart look wonky.
 
Thanks. I put my issues into that thread as well...though it looks like they are more BrewPi Spark as opposed t BrewPi Adruino.

I'm mostly good...just can't figure out how to get my Tilt to send data as Fahrenheit as opposed to Celsius.

With it all sitting on my bench, having 2 probes say the temp is 75*F and one saying 26*F makes my chart look wonky.

Are you able to simply disable the temp sensor on the tilt? As it seems to offer little value to the BrewPi, or am I missing something?
 
Status
Not open for further replies.
Back
Top