• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

HOWTO - Make a BrewPi Fermentation Controller For Cheap

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Status
Not open for further replies.
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?
 
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?


I can, but it keeps the graph in Centigrade so the line shows at 70* C instead of 70* F.

And apparently a change between 70-73* C and 70-73* F are vastly different :)
 
I can, but it keeps the graph in Centigrade so the line shows at 70* C instead of 70* F.

And apparently a change between 70-73* C and 70-73* F are vastly different :)

Apparently it's as simple as changing the following line in your /tiltHydrometer/settings.ini file:
Code:
;True if want temperatures recorded in Fahrenheit. False if in Celsius

FahrenheitTemperatures: False
Hope this helps?

Cheers,

Kal
 
Apparently it's as simple as changing the following line in your /tiltHydrometer/settings.ini file:
Code:
;True if want temperatures recorded in Fahrenheit. False if in Celsius

FahrenheitTemperatures: False
Hope this helps?

Cheers,

Kal

Failing that you could edit your TiltHydrometer.py file, line 338:
Change:
Code:
return (temperatureF - 32) * 5.0 / 9
To:
Code:
return (temperatureF)
But that's more of a dirty hack than a config change.

Let me know how you go, as I'm keen to see how this turns out. Looks like a great piece of brewtech!

Cheers,

Kal
 
Ok so i though I had it fixed. I went to crash a beer last night and nothing. I can not log on remote from terminal or from browser. What are my first steps in remedying this?
 
Ok so i though I had it fixed. I went to crash a beer last night and nothing. I can not log on remote from terminal or from browser. What are my first steps in remedying this?

I had this problem a lot until I bought a quality micro-SD card, like Sandisk.

So check your SD card and make sure there's no corrupted blocks.
 
Status
Not open for further replies.

Latest posts

Back
Top