StrangeBrew Elsinore - Raspberry Pi based brewery controller

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.
And the update a lot of people have been waiting for: http://imgur.com/a/jEIbc

I overhauled the Web UI to use Bootstrap, this is much easier to use and a nicer layout now, so please play around! I've tested it as much as I can today (I'm not brewing again till next weekend) and it's stable on my phone and desktop.

My next update is to auto generate the DTC files for pinouts since when the RPi updates to Linux 3.8 or above it'll need to have these too. I'll be studying hard soon.

I hope I haven't missed a file upload or addition. I'm 99% certain I tested with with a forced git pull, but we'll see!
 
The new interface looks good. Just ordered my spa panel today should be in next week then I can start building the beast.

The temperature sensors i have are these ones from adafruit
http://www.adafruit.com/products/642

Is this the same sensor everyone else is using? If so where and how are you mounting them?
 
I'm using that sensor, but I have some which are threaded and I have them screwed into welded fittings on the kettle/MLT. I can't find the links anymore, but they used to be on ebay for $14 or so.
 
Doug,

Are you running angstrom on the BBB or ubuntu or some other flavor of linux? I finally received enough hardware to start getting a few things setup and was getting some input/output errors when trying to write the device tree overlay to /lib/firmware (I'm running angstrom)
 
Sorry, I've spent the last week trying desperately not to allow my lungs out through my mouth. I've spent the day working on a new GPIO library (jGPIO) which'll create the DTO for the GPIOs that are requested, this should be a one time hit when performing setup (I also want to add a test during setup so people can verify the GPIOs work).

I'm running on Ubuntu, angstrom gave me huge headaches trying to setup the wifi. Not sure what IO errors you'll get writing the DTO to /lib/firmware. Do you have any context?
 
Ahh, that sucks. My kids just went back to school and now the whole house is getting sick. Hopefully you're feeling better....


I got past the problem. Not sure what it was, almost as if my main drive got unmounted (not sure how that can happen). I couldn't even write to my home directory. Reset everything and it's fine now. If you're running ubuntu, that gives me hope as I'm much more comfortable with that. I'll probably just switch over to that.
 
Ubuntu is much nicer for me, auto USB WiFi was the main reason I moved over. I also think I have a handle on the GPIO DTO autogeneration, but it looks like pins are reused so you don't really get access to all the pins. I'm trying to work out what is usable at the moment.
 
I updated my pull request with a new testing simulator that is command line based and able to change the directory to which it reads and writes from (/mock by default instead of /sys).
 
I updated my pull request with a new testing simulator that is command line based and able to change the directory to which it reads and writes from (/mock by default instead of /sys).

Yup, adding GPIO stuff to jGPIO before accepting it.
 
Ugh, I ended up working this weekend and I haven't gotten around to finishing jGPIO, sorry!
 
Finally having a chance to try and install this but I'm a Debian, Ubuntu, Linux noob. I can usually get stuff to work but it takes me a long time, thus my question.
Is there a noobie version of how to install this? I downloaded the zip from github but it was empty then I used this command
Code:
curl -L -o master.zip http://github.com/DougEdey/SB_Elsinore_Server/zipball/master/
and was able to extract the files.
Now I think I need to extract Elsinore.jar but the jar command was not found. What Version of OpenJDK do I need?

Are there any other dependencies that I need to install?
Once that is extracted, do you just open the launchElsinore file?

I'll get this one of these days...
 
So I haven't made a newbie version of the startup, because this isn't what I'd call stable (mainly because of the RPi, I've had no issues on the Beaglebone).

I also like to see how many people using it. :)

The easiest startup is:

Code:
sudo apt-get install git java
git clone https://github.com/DougEdey/SB_Elsinore_Server.git
cd SB_Elsinore_Server
java -jar Elsinore.jar

I'm unsure on the apt-get install command for java (it's in the RPi repositories, but not the Beaglebone ones).

the first run will walk you through the setup (the Readme should help).

But this isn't a foolproof system, I've tried to make it so, but until sometime next week when I do a new brewday, it won't be dead easy.

The next set of updates are fairly important, adding in times and alerts. At the moment, this is a multiple PID system.
 
Sorry for the delays, some real life got in the way. I'll be pushing updates this week, but I'll be pushing to a new branch, since the changes I've made will be untested on Raspberry Pi, if someone is willing to test on the Pi, I'd like to know of any issues ASAP since I've rewritten the GPIO code.

The changes are in place to support DTO for Linux Kernel 3.8, but I will need to add more data when that comes out for RPi.
 
No problem testing... As soon as the new SSR comes in ill be trying out my first brew all electric. Now i am going to have to get a new SD card if there is a problem on brew day :).

What problem are you having getting things setup on the RPi? I can help you out.
 
I don't have an RPi anymore :) I found them to be too unstable so I moved to a beaglebone (which forced my hand on the new GPIO libraries)
 
Cank here are rough install instruction for the RPi from a fresh Raspbian Wheezy install. You could probably get away without doing the first 2 steps as the latest Raspbian is from September. Let me know if I can help you out with installation.

Code:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git
sudo apt-get install openjdk-7-jdk
git clone https://github.com/DougEdey/SB_Elsinore_Server.git ~/BrewServer
cd ~/BrewServer
**** Create reibrew.cfg    see sample below ***
sudo java -jar Elsinore.jar

#Sample rpibrew.cfg
[general]
scale = F

[kettle]
duty_cycle = 100.0
cycle_time = 2.0
set_point = 175.0
proportional = 30.0
integral = 0.0
derivative = 0.0
aram = 4.0
probe = 28-000004472313
gpio = 11
 
running:

Code:
sudo java -jar Elsinore.jar

Without a rpibrew.cfg file will walk you through setup and show you your temperature probes so you can set it up without manually editing files. Except for moving the rpibrew.cfg.new to rpibrew.cfg.

When you update the set point, cycle time, duty cycle, proportional, integral, and derivative values in the user interface (any of them) it'll save the settings to the config file.
 
Got the new SSR in today after a trip to the US to pick it up and a big honkin heatsink. Have been doing some play testing. Cannot seem to get the latest build working get java errors on load... So i have been playing with the older build. I overshoot target temp by about 5 degrees C.

console log of new build
Code:
Oct 12, 2013 2:29:49 AM com.sb.elsinore.LaunchControl main
INFO: Running Brewery Controller.
Oct 12, 2013 2:29:49 AM com.sb.elsinore.LaunchControl parseDevice
INFO: Parsing : kettle
Oct 12, 2013 2:29:49 AM com.sb.elsinore.Temp <init>
INFO: /sys/bus/w1/devices/28-000004472313/w1_slave
Oct 12, 2013 2:29:49 AM com.sb.elsinore.LaunchControl parseDevice
INFO: Adding kettle GPIO is (GPIO14)
Oct 12, 2013 2:29:49 AM com.sb.elsinore.LaunchControl parseDevice
INFO: Adding PID with GPIO: GPIO14
Oct 12, 2013 2:29:49 AM com.sb.elsinore.PID <init>
INFO: Matches: 3
Oct 12, 2013 2:29:49 AM com.sb.elsinore.PID <init>
INFO: Matched GPIO pinout for Beagleboard: GPIO14. OS: null
Oct 12, 2013 2:29:49 AM com.sb.elsinore.Temp <init>
INFO: /sys/class/thermal/thermal_zone0/temp
Oct 12, 2013 2:29:49 AM com.sb.elsinore.PID run
INFO: Running kettle PID.
Oct 12, 2013 2:29:49 AM com.sb.elsinore.LaunchControl readConfig
INFO: Adding system
Exception in thread "Thread-5" Oct 12, 2013 2:29:49 AM com.sb.elsinore.OutputControl setDuty
INFO: IN: 0.0 OUT: 0.0
java.lang.NoClassDefFoundError: framboos/GpioPin
	at com.sb.elsinore.OutputControl.run(OutputControl.java:36)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: framboos.GpioPin
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	... 2 more
Oct 12, 2013 2:29:49 AM com.sb.elsinore.BrewServer <init>
INFO: System property: null
Oct 12, 2013 2:29:49 AM com.sb.elsinore.BrewServer <init>
INFO: System property: null
Oct 12, 2013 2:29:49 AM com.sb.elsinore.PID run
INFO: off: kettle status: -0.7111111111111111 duty cycle: 0.0
Oct 12, 2013 2:29:49 AM com.sb.elsinore.PID run
INFO: off: kettle status: -0.7111111111111111 duty cycle: 0.0
Server started, Hit Enter to stop.
 
That may have been me not pushing the updated build, but updating everything else, pull the latest version, it should be fixed.

As for the 5 degree difference, you'll need to tune your setup, it's not too difficult to do
 
Just pulled the latest version of the the latest release. Still getting a java error after building a new rpibrew.cfg file.

As well figured out the temp problem. Its a problem with the way the sensor is mounted. I have the adafruit sensor mounted in a thermo well. So by the time the sensor sees correct temp its over shot. So I have to either order a bare sensor or come up with another mounting method. I may be able to overcome this in the PID parameters but I am having a hard time tuning. Is there a procedure you would reccomend?



Code:
pi@raspberrypi ~/Brew2 $ sudo java -jar Elsinore.jar 
Oct 12, 2013 8:47:43 PM com.sb.elsinore.LaunchControl main
INFO: Running Brewery Controller.
Oct 12, 2013 8:47:44 PM com.sb.elsinore.LaunchControl parseDevice
INFO: Parsing : kettle
Oct 12, 2013 8:47:44 PM com.sb.elsinore.Temp <init>
INFO: /sys/bus/w1/devices/28-000004472313/w1_slave
Oct 12, 2013 8:47:44 PM com.sb.elsinore.LaunchControl parseDevice
INFO: Adding kettle GPIO is (GPIO11)
Oct 12, 2013 8:47:44 PM com.sb.elsinore.LaunchControl parseDevice
INFO: Adding PID with GPIO: GPIO11
Oct 12, 2013 8:47:44 PM com.sb.elsinore.PID <init>
INFO: Matches: 3
Oct 12, 2013 8:47:44 PM com.sb.elsinore.PID <init>
INFO: Matched GPIO pinout for Beagleboard: GPIO11. OS: null
Oct 12, 2013 8:47:44 PM com.sb.elsinore.Temp <init>
INFO: /sys/class/thermal/thermal_zone0/temp
Oct 12, 2013 8:47:44 PM com.sb.elsinore.PID run
INFO: Running kettle PID.
Oct 12, 2013 8:47:44 PM com.sb.elsinore.LaunchControl readConfig
INFO: Adding system
Oct 12, 2013 8:47:44 PM com.sb.elsinore.OutputControl setDuty
INFO: IN: 0.0 OUT: 0.0
Oct 12, 2013 8:47:44 PM com.sb.elsinore.BrewServer <init>
INFO: System property: null
Oct 12, 2013 8:47:44 PM com.sb.elsinore.BrewServer <init>
INFO: System property: null
Oct 12, 2013 8:47:44 PM com.sb.elsinore.PID run
INFO: off: kettle status: 0.0 duty cycle: 0.0
Oct 12, 2013 8:47:44 PM com.sb.elsinore.PID run
INFO: off: kettle status: 0.0 duty cycle: 0.0
Exception in thread "Thread-5" java.lang.NullPointerException
	at jGPIO.DTO.findDetails(DTO.java:203)
	at jGPIO.GPIO.getPinNumber(GPIO.java:120)
	at com.sb.elsinore.OutputControl.run(OutputControl.java:38)
	at java.lang.Thread.run(Thread.java:722)
Server started, Hit Enter to stop.


Server stopped.

Waiting for input...
>quit
Quitting
pi@raspberrypi ~/Brew2 $
 
My system is large, so I only need to set P (when I get a bigger element it'll need better tuning). http://www.expertune.com/tutor.aspx is a good example that I studied.

But P = time in seconds for the system to rise by 1 degree (F or C, I think the UI only shows F, but I've not tested C, I made have a bug here thinking out it).

I removes any overshoot, which is probably what you need to tune.

D removes oscillation (in theory)


I've fixed the missing null check that you found, I had code to support it in elsinore, but jGPIO wasn't passing a null back when no definitions were found. As I said, I hadn't tested on RPi. :)
 
Loads more fixes delivered today, it's working on my Beaglebone and should be fine for you guys on your RaspberryPis now :)
 
Looks good. No more Java errors. Was going to brew on the Holiday yesterday but was overloaded on turkey and pumpkin.

Going to try for this weekend.
 
Thanks for confirming :) I used it yesterday to make Ginger Beer. Smells awesome
 
OK. I'm a dumb A** I can't get this going. Doug if you want me to start a new thread let me know.

Fresh install of NOOBS_v1_3.zip and Rasbian Wheezy.
This had git and Java pre-installed so all I had to do was:
Code:
git clone https://github.com/DougEdey/SB_Elsinore_Server.git ~/BrewServer

cd ~/BrewServer

This went fine but when I ran this:
Code:
sudo java -jar Elsinore.jar
I get:
Code:
Oct 18, 2013 10:02:09 PM com.sb.elsinore.LaunceControl main
INFO: Running Brewery Controller.
Config file doesn't exist
Exception in thread "main" java.NullPointerException
   at com.sb.elsinore.LaunceControl.createConfig(LaunchControl.java:495)
   at com.sb.elsinore.LaunceControl.readConfig(LaunchControl.java:249)
   at com.sb.elsinore.LaunceControl.<init>(LaunchControl.java:63)
   at com.sb.elsinore.LaunceControl.main(LaunchControl.java:44)
If I create the config file, do I put it in the main directory folder /BrewServer?
I have a sensor hooked up to pin 4.
What other things do I need to set up?
 
That part of the code is looking for your one wire devices in /sys/bus/w1/devices/

I had the size check on the wrong side of the file iteration. So you need to check your w1 setup is correct, for modules and so on.

I've updated to give a proper error message now.
 
Got that fixed.:rockin: What is it asking for when it says:
Code:
Matched GPIO pinout for Beagleboard: . OS: Linux

On the previous step I entered GPIO1/3 to make it a PID
 
From my experience with the config wizard you do the following

pick sensor number
give it a name
then gpio number i.e GPIO11
if you only have the one sensor setup just type quit
then it creates the new file rpibrew.cfg.new config file for you
then you can do a "cat rpibrew.cfg.new > rpibrew.cfg"
 
Did you enter "GPIO1/3"? or do you mean GPIO1 and then GPIO3 for different inputs?

Edit: I've updated it to make it clearer that you need to copy rpibrew.cfg.new to rpibrew.cfg

The reason I did it this was is so you can backup changes if you move probes around or use different PID Values
 
Success! At least for now. ;-) Thanks Doug and ih8lag.

Have web access and I can see temp and change settings.

A couple questions:
When setting the GPIO is that for the output to a SSR?
Yeah, I did put GPIO1/3 and lots of other things but it made no difference (probably because I don't have it hooked up to a SSR).

It says it's missing definition file and assumes direct mapping. Is this something I should configure?

On the iPhone web interface the system header is overlapping the "Send Command" button from the control. Also, not to be nit-picky but that button is hard to for me to see. :drunk:

This is awesome!! :ban: Thanks for putting so much work into this. Once I get things running for my brewery, I'll write up a noob's guide for the raspberry pi.
 
First batch all electrinc in progress a nice light canadian cream ale... Boil will be done right before Walking Dead time... No complaints at all this is actually saving me about 1-2 hours on my typical brew day :)

I just need to engineer a better exhaust system and add a few pumps to eliminate the heavy lifting of 7 gallons of hot wort from floor to top of the dryer :)

Off to have a glass of Pumpkin Spice Ale.
 
When setting the GPIO is that for the output to a SSR?
Yes.

It says it's missing definition file and assumes direct mapping. Is this something I should configure?
Not on the raspberry pi, the change is there for when the raspberry pi upgrades to Linux Kernel 3.8 and you need to use Device Tree Overlays (see the readme for more details). These are being integrated at the moment since they're needed for the beaglebone

On the iPhone web interface the system header is overlapping the "Send Command" button from the control. Also, not to be nit-picky but that button is hard to for me to see. :drunk:

Hm, could you take a screenshot? I don't have an iPhone but I thought that bootstrap would've prevented it.
 
brewer44 said:
Thanks Doug, I finally got it going with the correct PID settings in Auto.

Brewer44

Just curious, what settings did you use?

Doug,
Here is a screenshot:


image-1358043945.jpg
 
Unfortunately the iPhone issue is a result of the iPhone browser not playing nice with bootstrap, can you use another browser on the phone?

Try getting the newest updates and see if it helps any
 
Back
Top