HOWTO - Make a BrewPi Fermentation Controller For Cheap | Page 128 | HomeBrewTalk.com - Beer, Wine, Mead, & Cider Brewing Discussion Community.

Homebrew Talk

Help Support Homebrew Talk by donating:

  1. Dismiss Notice
  2. We have a new forum and it needs your help! Homebrewing Deals is a forum to post whatever deals and specials you find that other homebrewers might value! Includes coupon layering, Craigslist finds, eBay finds, Amazon specials, etc.
    Dismiss Notice

HOWTO - Make a BrewPi Fermentation Controller For Cheap

Discussion in 'Fermenters' started by FuzzeWuzze, Mar 19, 2014.

 

  1. Dgratiot

    Active Member

    Posted Apr 4, 2016
    Hey guys! So i got brewpi up and running, reading temps, and controlling its first fermentation right now! So excited! Only issue i am running into is that i cant access the web interface via the IP address unless im connected to the same wifi as my rpi is running on. Anyone have any advice?
     
  2. wbarber69

    Well-Known Member

    Posted Apr 4, 2016
    ………Do you think you should be able to access an IP address that isn't on the same network as you? I think what you're asking is, how do I forward the web port of the rpi to the IP address of my router so I can see it from outside my home network? That depends on your router, and whether or not your isp is blocking web ports.
     
  3. redman67

    Well-Known Member

    Posted Apr 4, 2016
    With the weather hopefully starting to turn I'm starting to think of smoking

    Has anyone tried and succeeded in making mods to any of this to run an electric smoker?
    Specifically is there a way to get the program to read T.C. Sensors, as I think that is the major roadblock to making smoker control possible.

    Any insight would be appreciated
     
  4. Dgratiot

    Active Member

    Posted Apr 4, 2016
    I suppose i just assumed i could type in the http:// address that brewpi spit out in any browser that had an internet connection and it would work! So what should i look at to be able to view the web interface from other devices that arent connect to my home wifi?
     
  5. GrogNerd

    mean old man

    Posted Apr 4, 2016
    you have your LAN address, Local Area Network (192.168.1.xxx or 127.0.0.1 or 10.10.10.1) that's your wifi network IP addresses. each device (PC, phone, tablet, router) has its own address to identify it on your network

    then you have your WAN address, Wide Area Network address. that's what the outside world sees ALL your devices on. it's one address for your internet connection.

    you need to setup your WAN address to forward a port to the specific LAN address: port your BPi is on
     
  6. day_trippr

    We live in interesting times...

    Posted Apr 4, 2016
    To my knowledge, this has not been done. Probably because it would require a huge set of changes to the Arduino code as well as the host application. Besides, I'd think a PID would be overkill for a smoker when a simple thermostat would do the job.

    Don't see it happening...

    Cheers!
     
  7. thekraken

    Well-Known Member

    Posted Apr 4, 2016
    Check out the HeaterMeter project: https://github.com/CapnBry/HeaterMeter

    I think some people use it with a relay on electric smokers.

    Like day_tripper said it may be overkill for an electric smoker, a simple hysteresis control would probably do the job and be super simple to program: https://en.wikipedia.org/wiki/Bang–bang_control
     
    Bigdaddyale likes this.
  8. FuzzeWuzze

    I Love DIY

    Posted Apr 4, 2016
    Why would TC sensors be needed for a smoker anyways?

    With a quality cable you can run up to 250F or so with a DS18B20, well above what i'd think you would smoke meats at.

    https://www.adafruit.com/products/642
     
  9. thekraken

    Well-Known Member

    Posted Apr 5, 2016
    I smoke anywhere from 215 to 300, depending. A ds18b20 would be limiting. Every time you accidentally overshoot your temperature your cables would be fried. Also, they'd be hard to shove inside a brisket.
     
  10. ame

    Well-Known Member

    Posted Apr 5, 2016
    Well, on the hardware side, a MAX31850 would measure the thermocouple and give you a simple one-wire interface. You could hang it off the same bus as the DS18B20. On the software side, you'd need to make sure you had a MAX31850 driver, but it would just return a number representing the temperature which downstream code could use.

    Here's a little more info:
    https://learn.adafruit.com/adafruit-1-wire-thermocouple-amplifier-max31850k/overview

    Undoubtedly there are a few details to be addressed...
     
  11. VictorBrew

    Active Member

    Posted Apr 5, 2016
    As others have mentioned you need to setup 'port forwarding' on your home router in order to access your pi from 'outside' your LAN. It sounds like a fancy word, but it is pretty simple. Basically, you only get a single IP address from your internet service provider (ISP), call it your WAN IP address. You can tell your router that any request coming into to your WAN IP address on port 80, you want your router to 'forward' that request to the local IP address of your pi (likely 192.168.x.x or however you setup you LAN). Port 80 is not required, but it is the default for http (web) traffic. Look for a port forwarding admin page on your router to set this up. If you need to now what your WAN IP address is go to google (while on your home network) and type in 'What is my IP address'.

    Once you get that working there is one more thing you need to consider. That single WAN IP address you are given by your ISP ... it changes. It might not change that often, but it will change. So you need a method to always know what your WAN IP address is. For that you need to use something called Dynamic DNS. Setting that up is not hard, but that's for another thread once you get the above working.
     
    bradleyhunt likes this.
  12. ss4ivan

    Well-Known Member  

    Posted Apr 6, 2016
    I was hoping someone could help me out. Ive been running brewpi on my chamber for about a year and a half with no issues. After my last brew I stopped my script and temperature control. Its been about 5 weeks since. I brewed last weekend and went to open a new script and temperature profile and found that it would not open a new script. My temperature profile for my last brew still shows below the graph. In the top left it says cannot get text from python script. Since then, I have updated the brewpi software and arduino from the rpi terminal but still nothing. when I reboot the Rpi I get this error that pops up:
    GDBus. Error:eek:rg.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject.

    I click ok and everything seems to work.
    I manually started the brewpi script from the LXTerminal and got this:
    [email protected] ~ $ sudo -u brewpi python /home/brewpi/brewpi.py
    Apr 05 2016 21:28:00 Opening serial port
    Apr 05 2016 21:28:00 Notification: Script started for beer 'Citra ipa/PA'
    Apr 05 2016 21:28:10 Checking software version on controller...
    Apr 05 2016 21:28:11 Found BrewPi v0.2.10 build unknown, running on an Arduino Uno with a revC shield on port /dev/ttyACM0

    Traceback (most recent call last):
    File "/home/brewpi/brewpi.py", line 415, in <module>
    startBeer(config['beerName'])
    File "/home/brewpi/brewpi.py", line 287, in startBeer
    setFiles()
    File "/home/brewpi/brewpi.py", line 273, in setFiles
    brewpiJson.newEmptyFile(localJsonFileName)
    File "/home/brewpi/brewpiJson.py", line 109, in newEmptyFile
    jsonFile = open(jsonFileName, "w")
    IOError: [Errno 2] No such file or directory: '/home/brewpi/data/Citra ipa/PA/Citra ipa/PA-2016-04-05.json'
    Exception in thread Thread-1 (most likely raised during interpreter shutdown):
    Traceback (most recent call last):
    File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    File "/usr/lib/python2.7/threading.py", line 505, in run
    File "/home/brewpi/backgroundserial.py", line 72, in __listenThread
    File "/usr/local/lib/python2.7/dist-packages/serial/serialutil.py", line 538, in inWaiting
    File "/usr/local/lib/python2.7/dist-packages/serial/serialposix.py", line 464, in in_waiting
    <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'ioctl'
    [email protected] ~ $

    Any sugguestions?
     
  13. day_trippr

    We live in interesting times...

    Posted Apr 6, 2016
    Update pyserial 2.7 maybe?

    Cheers!
     
  14. cegan09

    Supporting Member  

    Posted Apr 6, 2016
    As someone who has taught themselves all of this I'll try to explain simply.

    Your home network is it's own thing. Every device has an IP that only works inside that network. Your router takes requests from each device and sends it out to the larger outside network, then receives the responses and sends them to the correct device.

    If you want to see the website from outside your home network you need a way to call up your home router, and request information from the Pi inside it's network. This is possible.

    First step, you need to setup Port Forwarding. Think of ports as just numbers that correspond to different functions. For now lets say your Pi is on IP 192.168.1.10 and you are going to use a port number of 4832. Log into your home router and look for a port forwarding tab. Then setup a rule to always forward 4832 to your Pi on 192.168.1.10. If you really don't know how to do this google "port forwarding on <insert your model of router here>".

    Now, how to find your router from the larger internet. You can do this statically, or dynamically. First way (static), from your home wifi, go to https://www.whatismyip.com/ and record the IP address it gives you. This is going to look nothing like the IP that your Pi gives you, because it is your home network's address on the larger overall internet. Lets just pretend it gives you 150.24.178.12. To access your page from outside the network you would enter 150.24.178.12:4832 into your url bar. Theoretically this will direct you to your home network, and pass you to your Pi via that port number.

    Now, as mentioned, that router IP changes. So what you can do is register a domain name and have it always linking to your home network. This is not free. You go to a company like Dyn and setup Dynamic DNS http://dyn.com/remote-access/. Basically you register a domain name with them, then setup your router to work with your dyn.com account and it make sure that domain name always points to your home network. So lets pretend you pick a domain name of MyAwesomeBrewPi.com, any time you went to that url it would find your home router, and get passed on to your Pi.


    Now, the disclaimers.
    First, you may have to open up some security on your router that allows incoming connections. This leads to the second warning.

    Second, doing this opens you up to more security risk. It's not likely that someone will want to get into your network, but by having a way in like this does induce some risk. Weight it against what you're comfortable with. Make sure your computers that normally access personal information websites have good virus software.
     
  15. indianajns

    Well-Known Member

    Posted Apr 6, 2016
    Building my 2nd brewpi for a buddy. The first one I had no problems and built it with a RasPi. This time I'm using an old laptop with WHeezy. Everything seems to go smoothly until the point where it usually asks to update chron job. It does not ask and throws the following:

    ***** Running updateCron.sh from the script repo. *****

    ***** Updating cron for the brewpi user... *****

    no crontab for brewpi
    Checking entry for brewpi ...
    Done checking entry brewpi ...
    Checking entry for wifichecker ...
    Done checking entry wifichecker ...
    Restarting cron
    Restarting periodic command scheduler: cronStopping periodic command scheduler: cron.
    Starting periodic command scheduler: cron.
    grep: /etc/ssh/ssh_host_rsa_key.pub: No such file or directory
    Done installing BrewPi!

    The two lines that stand out at me are, "no crontab for brewpi" and "grep: /etc/ssh/ssh_host_rsa_key.pub: No such file or directory"

    Any thoughts?

    THANK YOU!
     
  16. FuzzeWuzze

    I Love DIY

    Posted Apr 6, 2016
    Did you update to the latest BrewPi, or did you update to the Legacy branch?

    Run the updater.py file in the BrewPi-Utils folder and when it asks what branch make sure you select Legacy for both the /home/BrewPi code and /var/www website code.
     
  17. FuzzeWuzze

    I Love DIY

    Posted Apr 6, 2016
    Have you looked if theres a ssh_host_rs_key.pub file in /etc/ssh? Was this a default Wheezy installation or did they do a custom install and not install all the default packages?

    Ive installed it on Wheezy and Jessie using the instructions from the Wiki and it works every time.
     
  18. indianajns

    Well-Known Member

    Posted Apr 6, 2016
    Thanks for the uber fast response as alwas. The file is not in that directory. I've tried installing step by step from the wicki multiple times. Each time it throws the error about the chron and the missing ssh file. Banging my head against the workbench at this one.

    EDIT: Looks like there is something wrong with the pi user. I'm going to check out that rabbit hole now. Thanks!!
     
  19. wbarber69

    Well-Known Member

    Posted Apr 6, 2016

    The problem is that your default user is not pi. you need to reinstall wheezy and set it up the use pi from the beginning or create a new super user pi and blowout the brewpi install and start over.
     
  20. indianajns

    Well-Known Member

    Posted Apr 7, 2016
    This is what I thought as well. Just reinstalled wheezy, set up user pi with pword raspberry as the only user. Logged into terminal as root followed the wiki to the letter and still saying that the ssh file is not found. So odd because im not finding any other folks that seem to have this problem when searching the interwebs.
     
  21. wbarber69

    Well-Known Member

    Posted Apr 7, 2016
    Maybe you got a bad img file for wheezy
     
  22. indianajns

    Well-Known Member

    Posted Apr 7, 2016
    I think you are correct. Went ahead and installed Jessie.

    This time no apparent errors during entire process. Load up the brewpi on the webpage and where it usually displays current temp, etc. it now says, Could not receive version from controller please (re)program. Downloaded the hex file, selected Uno and No, No and hit program. Messages receiving: Warning cannot receive version number from controller. Your controller.... etcThoughts on where to go next? Thanks!
     
  23. day_trippr

    We live in interesting times...

    Posted Apr 7, 2016
    Didn't I recently read here that following the wiki has resulted in consistent success with either Wheezy or Jessie?

    Cheers!
     
  24. wbarber69

    Well-Known Member

    Posted Apr 7, 2016
    We'll find out soon enough… when my new pi3 comes in.
     
  25. day_trippr

    We live in interesting times...

    Posted Apr 7, 2016
    You may need to load the hex file by connecting the Uno to a PC and using a hexloader...

    Cheers!
     
  26. indianajns

    Well-Known Member

    Posted Apr 8, 2016
    Thank you. I will download a hexfile and give it a try.
     
  27. FuzzeWuzze

    I Love DIY

    Posted Apr 8, 2016
    Just want to make sure that you are running the Legacy versions of the code as described in the Wiki install setup?
     
  28. indianajns

    Well-Known Member

    Posted Apr 8, 2016
    Yes, followed the awesome wiki to the letter.
     
  29. ss4ivan

    Well-Known Member  

    Posted Apr 8, 2016
    Pyserial is already updated to 2.7
     
  30. ss4ivan

    Well-Known Member  

    Posted Apr 8, 2016
    Originally no, but then it told me I needed to update to the legacy branch so I did. Then it gave me what I posted earlier. It looks like I might have another job already running but I can't stop it. It keeps asking if I want to switch active brew.
    I tried running "python brewpi.py --kill" but it says "can't open file 'brewpi.py': [Erno2] no such file or directory"
     
  31. wbarber69

    Well-Known Member

    Posted Apr 8, 2016
    Are you installing from install script or manual?
     
  32. ss4ivan

    Well-Known Member  

    Posted Apr 8, 2016
    I used the updater: sudo ~/Brewpi-tools/updater.py then I had to change to legacy so I ran the same command before with "--ask" and selected legacy whenever it asked me to select a branch. Then ran pyserial --update but it said I was already at version 2.7.
     
  33. CadiBrewer

    Supporting Member  

    Posted Apr 9, 2016
    It's alive! Everything you loved about the prior shield, this time without the pesky screen scramble. Here's the finished product, a BrewPi with LCD, three probes, a rotary encoder, all running over bluetooth.

    Many, many, many thanks to day_trippr for the LCD and Bluetooth projects, and most importantly for all of the guidance while my 10 year old son and I took on building our first board. An equal amount of thanks to Fuzze for the BrewPi building project.

    20160408_165134.jpg

    Here's the bare board:
    20160408_120245.jpg

    Soldered up and mated to its UNO buddy:
    20160408_163519.jpg

    20160408_163536.jpg

    20160408_163544.jpg

    For those interested in replicating this, here are the Eagle board and schematic files:

    https://drive.google.com/file/d/0BwakCoACNDsmTnV2d1hxVFM0akE/view?usp=sharing
    https://drive.google.com/file/d/0BwakCoACNDsmVW9XejY1OENXYW8/view?usp=sharing

    Here's the corresponding BOM from Mouser. You can find this stuff cheaper if you look, but for someone who wants to click once and buy it all, here you go:

    http://www.mouser.com/ProjectManager/ProjectDetail.aspx?AccessID=ceca4ae1f4

    I should point out that this project wasn't designed to save money over the builds that are already listed here. If you go to oshpark.com to order a board, you'll spend $25 for three. At $8.33 each, plus the adafruit stackable headers, you're not saving any money over buying the UNO protoshield. I built this project because my son and I are having fun dabbling in electronics, and when I looked at day_trippr's protoshield soldering with all of the wires, I figured my chances of getting that right were not great.

    You'll still need an LCD screen from Amazon or elsewhere and the bluetooth module if you want that connectivity.

    I have one more to make but I'm probably a month or so away from doing that. I'll put together some soldering pics and a how-to for those who aren't familiar with this stuff (like me!) when I get around to building that one.

    One caveat - the board does have headers for two LEDs that correspond to the heat and cool cycles as implemented by day_trippr in his build. I intend to put those on my next build with the switches. But since I didn't include them in the first build, I haven't tested the board for those LED headers yet. My apologies if anyone runs into trouble with those.
     
  34. gezzanet

    Well-Known Member

    Posted Apr 9, 2016
    Very cool.
     
  35. gromitdj

    Well-Known Member

    Posted Apr 9, 2016
    Very nice! How did you manage to solder the BSS84? That thing is tiny!
     
  36. Elkoe

    Well-Known Member

    Posted Apr 9, 2016
    Hi Guys,

    BrewPi founder here.
    I have just updated the legacy branch of the script with everything that is backwards compatible and pushed this to the legacy_dev branch. (legacy branch unchanged for now).

    I have tested with a Leonardo and I can program it from the web interface, and even running the updater, or updateFirmware.py.
    I also tested with a Leonoardo running Blink, this works on my test system too.

    Before I merge legacy_dev into legacy, can you guys give it a test?

    You should be able to run the updater.py script with --ask to check it out.

    Hopefully it will fix some of the issues that people have with flashing their Arduino.

    Note: I updated these scripts to reduce the number of Arduino users asking for support.
    For new users, I still do not recommend picking Arduino. No firmware updates will come out for it. And the control algorithms in the firmware are 364 commits behind on our latest release.
     
    Bigdaddyale, FuzzeWuzze and gromitdj like this.
  37. Bigdaddyale

    Well-Known Member

    Posted Apr 9, 2016
    CadiBrewer Do you have a link to your board over at Oshpark?
     
  38. CadiBrewer

    Supporting Member  

    Posted Apr 9, 2016
    You're not kidding! I bought extras because I figured I'd lose one on the ground or tweak it by squeezing it wrong with the tweezers.

    I soldered it first before anything else was on the board so I wouldn't have to manipulate my soldering iron around the headers and the adjacent parts. I put a dab of solder on one of the pads and then set the p-fet on the pad and heated the leg. Then I soldered up the other two legs. It wasn't pretty, but it worked both times I did it.
     
  39. CadiBrewer

    Supporting Member  

    Posted Apr 9, 2016
    Bigdaddyale likes this.
  40. wmubronco

    Well-Known Member

    Posted Apr 9, 2016
    Is this something new? Do I need to update? I started a fresh brew and it's been going for a good 20 minutes now, and no data points yet.

    1.JPG
     
Draft saved Draft deleted

Share This Page

Group Builder