HOWTO - Make a BrewPi Fermentation Controller For Cheap | Page 203 | 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. thestraw0039

    Active Member

    Posted Jan 19, 2020
    Odd because I can't get the script to run, fooling around with it now but here is what the log says. Clean install on a new Pi.

    Code:
    [email protected]:/home/brewpi/logs $ cat stdout.txt
    2020-01-18 22:04:14  Opening serial port.
    2020-01-18 22:04:14  0.5.4.1 (master) [5824d24 Fix degree sign in web]
    2020-01-18 22:04:14  Starting 'My BrewPi Remix Run.'
    2020-01-18 22:04:14  Waiting 10 seconds for board to restart.
    2020-01-18 22:04:24  Checking software version on controller.
    2020-01-18 22:04:24  Found BrewPi v0.2.12 build 8d36524, running on an Arduino Uno with a revC shield on port /dev/ttyACM0.
    2020-01-18 22:04:25  Caught an unhandled exception, exiting.
    2020-01-18 22:04:25  Stopping background serial processing.
    2020-01-18 22:04:25  Closing port.
    2020-01-18 22:04:25  Closing open sockets.
    2020-01-18 22:04:25  Exiting.
    
     
  2. mwamsley

    New Member

    Posted Jan 19, 2020
    Yes, I've been working on fixing my BrewPi and have run into the same log contents. I've tried installing on 2019-04-08-rasbian-stretch (no logging, "Script not Running!") and now 2019-09-26-rasbian-buster-full ("Script not Running!") log:

    Code:
    2020-01-18 22:56:39 Opening serial port.
    2020-01-18 22:56:39 0.5.4.1 (master) [5824d24 Fix degree sign in web]
    2020-01-18 22:56:39 Starting 'My BrewPi Remix Run.'
    2020-01-18 22:56:39 Waiting 10 seconds for board to restart.
    2020-01-18 22:56:49 Checking software version on controller.
    2020-01-18 22:56:49 Found BrewPi v0.2.12 build 8d36524, running on an Arduino Uno with a revC shield on port /dev/ttyACM0.
    2020-01-18 22:56:50 Caught an unhandled exception, exiting.
    2020-01-18 22:56:50 Stopping background serial processing.
    2020-01-18 22:56:50 Closing port.
    2020-01-18 22:56:50 Closing open sockets.
    2020-01-18 22:56:50 Exiting.
    When I check device configuration and device list I get:

    Code:
    Error while receiving device configuration: SyntaxError: Unexpected token C in JSON at position 0
    Any thoughts?

    Thank you-

    Mark
     
  3. LBussy

    A Cunning Linguist  

    Posted Jan 19, 2020
    Well .... sh*t. That certainly seems like a “me” problem. I eat my own dog food however and I have it running here as well though so no initial thoughts.

    Gimme a few to wake up and smell the coffee and I’ll get to work on it.
     
  4. LBussy

    A Cunning Linguist  

    Posted Jan 19, 2020
    Okay for @mwamsley and @thestraw0039:

    Please do the following:
    Code:
    cd /home/brewpi
    sudo systemctl stop brewpi
    sudo git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
    sudo git fetch --all
    sudo git pull --all
    sudo git checkout devel
    sudo git pull
    sudo systemctl start brewpi
    
    At this point, the script will try to start up again. You can watch the logs with:
    Code:
    tail -f /home/brewpi/logs/std*.txt
    Assuming it will still raise an exception, it should show in the stderr.log. That will give me more to go on.
     
  5. Aliensrgr8

    New Member

    Posted Jan 19, 2020
    Sorry if I offended you by stating "all" documentation, that was not my intention.

    I reviewed the config.cfg file and this is what I have:

    scriptPath = /home/brewpi
    wwwPath = /var/www/html
    port = auto
    chamber = ""
    tiltColor = Orange

    I have included the full log files for both the stderr.txt and stdout.txt files.

    This was from the stderr.text file.
    2020-01-19 13:38:23 Configured for Tilt but no Bluetooth radio available. // I am using a Raspberry Pi ver 3b+. I thought this had native bluetooth radio support.
    2020-01-19 13:38:23 Starting BrewPi.
     

    Attached Files:

  6. LBussy

    A Cunning Linguist  

    Posted Jan 19, 2020
    Nah, my skin is thicker than that. :) The documentation does suck. I will accept pull requests to improve them. :p
    It does, but something's not working for sure. Try running "Tilt" on its own:
    Code:
    /home/brewpi/Tilt.py
    See if it detects the Tilt. If not ... well, we'll figure something out.
     
  7. Aliensrgr8

    New Member

    Posted Jan 19, 2020
    This is the response. I got to this by navigating to the file Located at: /home/brewpi/Tilt.py

    Reporting Tilt values every 5 seconds. Ctrl-C to stop.
    Color Purple report: No results returned.
    Color Purple report: No results returned.
    Color Purple report: No results returned.

    I have the Orange Tilt.
     
  8. LBussy

    A Cunning Linguist  

    Posted Jan 20, 2020
    Oops. :rolleyes:

    Line 516, change "Purple" to "Orange". I'll fix that so it will pick up the one from the config.
     
  9. thestraw0039

    Active Member

    Posted Jan 20, 2020
    When I get to git pull --all I get the following output, and I think this is something you need to change on GitHub.

    Code:
    [email protected]:/home/brewpi $ sudo git pull --all
    Fetching origin
    There is no tracking information for the current branch.
    Please specify which branch you want to merge with.
    See git-pull(1) for details.
    
        git pull <remote> <branch>
    
    If you wish to set tracking information for this branch you can do so with:
    
        git branch --set-upstream-to=origin/<branch> devel
    
     
  10. mwamsley

    New Member

    Posted Jan 20, 2020
    I must have a completely different issue. Same log result. I'm using defaults.cfg.

    Code:
    [email protected]:~ $ cd /home/brewpi
    [email protected]:/home/brewpi $ sudo systemctl stop brewpi
    [email protected]:/home/brewpi $ sudo git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
    [email protected]:/home/brewpi $ sudo git fetch --all
    Fetching origin
    remote: Enumerating objects: 6, done.
    remote: Counting objects: 100% (6/6), done.
    remote: Compressing objects: 100% (4/4), done.
    remote: Total 6 (delta 2), reused 3 (delta 2), pack-reused 0
    Unpacking objects: 100% (6/6), done.
    From https://github.com/brewpi-remix/brewpi-script-rmx
       3c25020..9bb9ffe  devel      -> origin/devel
    [email protected]:/home/brewpi $ sudo git pull --all
    Fetching origin
    Already up to date.
    [email protected]:/home/brewpi $ sudo git checkout devel
    Branch 'devel' set up to track remote branch 'devel' from 'origin'.
    Switched to a new branch 'devel'
    [email protected]:/home/brewpi $ sudo git pull
    Already up to date.
    [email protected]:/home/brewpi $ sudo systemctl start brewpi
    [email protected]:/home/brewpi $ tail -f /home/brewpi/logs/std*.txt
    ==> /home/brewpi/logs/stderr.txt <==
    2020-01-19 18:05:14  Starting BrewPi.
    
    ==> /home/brewpi/logs/stdout.txt <==
    2020-01-19 18:05:14  Opening serial port.
    2020-01-19 18:05:14  0.5.4.1 (master) [5824d24 Fix degree sign in web]
    2020-01-19 18:05:14  Starting 'My BrewPi Remix Run.'
    2020-01-19 18:05:14  Waiting 10 seconds for board to restart.
    2020-01-19 18:05:24  Checking software version on controller.
    2020-01-19 18:05:24  Found BrewPi v0.2.12 build 8d36524, running on an Arduino Uno with a revC shield on port /dev/ttyACM0.
    2020-01-19 18:05:24  Caught an unhandled exception, exiting.
    2020-01-19 18:05:24  Stopping background serial processing.
    2020-01-19 18:05:24  Closing port.
    2020-01-19 18:05:24  Exiting.
    
    Thank you for your work on this project. This is truly my most important 2020 resolution.

    Mark
     
  11. thestraw0039

    Active Member

    Posted Jan 20, 2020
    Alright, I think I got the devel up and running, here is the error. I'm curious if you have this written for wifi (I ask because this is a wired connection), I think I remember you reading this, the stdout.txt isn't showing anything, but this appears to be looping:

    Code:
    [email protected]:/home/brewpi $ tail -f /home/brewpi/logs/std*.txt
    ==> /home/brewpi/logs/stderr.txt <==
    2020-01-19 20:46:10 DOWIFI WARN: 3 failure(s) to reach 192.168.1.1.
    2020-01-19 20:46:10 DOWIFI ERROR: Gateway unreachable. Restarting wlan0.
    2020-01-19 20:55:30 DOWIFI WARN: 1 failure(s) to reach 192.168.1.1.
    2020-01-19 20:55:50 DOWIFI WARN: 2 failure(s) to reach 192.168.1.1.
    2020-01-19 20:56:10 DOWIFI WARN: 3 failure(s) to reach 192.168.1.1.
    2020-01-19 20:56:10 DOWIFI ERROR: Gateway unreachable. Restarting wlan0.
    2020-01-19 21:05:31 DOWIFI WARN: 1 failure(s) to reach 192.168.1.1.
    2020-01-19 21:05:51 DOWIFI WARN: 2 failure(s) to reach 192.168.1.1.
    2020-01-19 21:06:11 DOWIFI WARN: 3 failure(s) to reach 192.168.1.1.
    2020-01-19 21:06:11 DOWIFI ERROR: Gateway unreachable. Restarting wlan0.
    
    
    Edit: After looking at this the daemon won't start:

    Code:
    [email protected]:/home/brewpi $ systemctl status brewpi
    ● brewpi.service - BrewPi Remix daemon for: brewpi
       Loaded: loaded (/etc/systemd/system/brewpi.service; enabled; vendor preset: enabled)
       Active: failed (Result: exit-code) since Sun 2020-01-19 21:26:43 EST; 1min 33s ago
         Docs: https://docs.brewpiremix.com/
      Process: 21527 ExecStart=/bin/bash /home/brewpi/utils/doBrewPi.sh -d (code=exited, status=1/FAILURE)
     Main PID: 21527 (code=exited, status=1/FAILURE)
    
    Jan 19 21:26:43 raspberrypi systemd[1]: brewpi.service: Service RestartSec=1s expired, scheduling restart.
    Jan 19 21:26:43 raspberrypi systemd[1]: brewpi.service: Scheduled restart job, restart counter is at 5.
    Jan 19 21:26:43 raspberrypi systemd[1]: Stopped BrewPi Remix daemon for: brewpi.
    Jan 19 21:26:43 raspberrypi systemd[1]: brewpi.service: Start request repeated too quickly.
    Jan 19 21:26:43 raspberrypi systemd[1]: brewpi.service: Failed with result 'exit-code'.
    Jan 19 21:26:43 raspberrypi systemd[1]: Failed to start BrewPi Remix daemon for: brewpi.
    
    Second edit: turning on wifi and daemon still won't start.
     
    Last edited: Jan 20, 2020
  12. 5spdvl

    Member

    Posted Jan 20, 2020
    Yeah sorry LBussy, I haven't got around to getting the exact output for you just yet - been focused on determing which of my DS18b20s are dead/alive, rearranging the setup and getting it working. I'm proud to report it now operates perfectly, running three probes (beer, fridge & room) and two relays for heating and cooling.

    Re: the Arduino issue; I also had a few difficulties for a while uploading a sketch from my PC and other communication issues, but I'd say at this stage it's probably user error I have successfully flashed with avrdude via command line (same command as thestraw0039) previously, but not been able to since.
     

    Attached Files:

  13. thestraw0039

    Active Member

    Posted Jan 21, 2020
    Alright, daemon appeared to not be running due to permission issues, a quick run of doPerms.py seemed to fix that. Here is the error I am getting:

    Code:
    [email protected]:/home/brewpi/logs $ cat stderr.txt
    2020-01-20 22:06:07  Starting BrewPi.
    2020-01-20 22:06:18  '_csv.reader' object has no attribute 'next'
    
     
  14. thestraw0039

    Active Member

    Posted Jan 21, 2020
    Found the issue,

    in temperatureProfile.py line 44 and 45

    Code:
    temperatureReader = csv.reader(csvfile, dialect)
    temperatureReader.next() # Discard the first row, which is the table header
    temperatureReader.next() is a Python2 code, and this method needs to be changed for Python3. Changing the code to below gets my Brewpi up and running:

    Code:
    temperatureReader = csv.reader(csvfile, dialect)
    next(temperatureReader)
    
    Here is the link that helped me out.

    https://memoryleak.in/2018/02/27/ho...o-attribute-next-python-3-6-csv-reader-error/
     
    LBussy and Thorrak like this.
  15. LBussy

    A Cunning Linguist  

    Posted Jan 21, 2020
    There is nothing I like more than an end-user fixing their own issues. :)

    It's strange that I don't have the issue here though. I'll try to repro first, probably late this afternoon.

    Thanks! Issue #105 entered.
     
    thestraw0039 and Thorrak like this.
  16. LBussy

    A Cunning Linguist  

    Posted Jan 22, 2020 at 1:42 PM
    Issue #105 closed, change merged into Master and Devel.
     
    thestraw0039 likes this.
Draft saved Draft deleted

Share This Page

Group Builder