How To: BrewPi Over Bluetooth | Page 7 | 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

How To: BrewPi Over Bluetooth

Discussion in 'Fermenters' started by day_trippr, Dec 15, 2014.

 

  1. thekraken

    Well-Known Member

    Posted Aug 31, 2015
    No news, I haven't had the time to mess with it since. But I made this little write up for you to catch you up to speed on where I was with the project:
    http://www.homebrewtalk.com/showthread.php?p=7073692#post7073692
     
  2. denny123

    Member

    Posted Sep 1, 2015
    great job! thank you, this is no1 on my todo list for the next week
     
  3. doomy86

    Well-Known Member

    Posted Oct 3, 2015
    Wow this is amazing i have to order some ESP8266 right now..
     
    Bigdaddyale likes this.
  4. father_jack_hackett

    Member

    Posted Oct 19, 2015
    35 years after burning my fingers with a soldering iron, I have finally been tempted back into the world of electronics and after reading through this thread and the other ones and ordering bits and bobs, it's all working. A sincere THANK YOU! to everyone who has contributed to this project especially day_trippr.
    I got such a buzz from doing this, now all i have to do is get it off the prototype board and onto a veroboard or pcb. I think I am hooked on the electronics thing and will continue to view this forum avidly for the next big thing. I must however get back to my neglected home brewing(I've ran out for the first time in ages).
    THANKS AGAIN EVERYONE.
     
  5. gezzanet

    Well-Known Member

    Posted Oct 19, 2015
    +1.
    Daytrippr has a lot to answer for
     
  6. day_trippr

    We live in interesting times...

    Posted Oct 19, 2015
    Oh boy, you have no idea ;)

    Always happy to read success stories!

    Cheers! :mug:
     
    BumbleBeeBeer likes this.
  7. Baja_Brewer

    Well-Known Member

    Posted Nov 2, 2015
    I'm going to read this thread tonight. I have really high hopes that I can make a stand alone with an SSR and single temp probe to run a heater wrap and run a variety of fermentation profiles in my garage this winter. I want to get a stock of beers aging.
     
    thekraken likes this.
  8. wbarber69

    Well-Known Member

    Posted Nov 3, 2015
    Yup, you sure can
     
  9. Baja_Brewer

    Well-Known Member

    Posted Nov 7, 2015
    Just purchased the parts I to make two of these with Relays and a third one to run the second outlet/other two channels in my current brew-pi box. That's relays, temp probes, Arduino Nanos, and the HC-05's. Had $15 in ebay gift cards and I purchased everything from 1 ebay seller to save on shipping.

    Need to figure out what my heat blanket solution is going to be. I'm picturing some kind of keg-coozy (I ferment in 5 gallon kegs) with embedded reptile heat tap or something. I'd hate to integrate it permanently though. Going to have to think a bit more.

    Also need more thermowells.

    My current brewpi is great. Expect some stupid questions when I get around to setting this up!
     
  10. Bigdaddyale

    Well-Known Member

    Posted Dec 13, 2015
    bookmark
     
  11. CadiBrewer

    Supporting Member  

    Posted Apr 1, 2016
    I'm banging my head against the wall on this one. Trying to add the bluetooth functionality using an HC-06 module. I wire it up using the programming configuration and I get the fast blinking light. When I go to upload the HC-06.ino file, I get the following error:

    /usr/share/arduino/hardware/tools/avrdude.conf:332: programmer type must be written as "id_type"

    Any idea what I'm doing wrong?
     
  12. wbarber69

    Well-Known Member

    Posted Apr 1, 2016
    It would be easier to use ide in Windows. and as far as the hc-06 is concerned I have never used one and while they are supposed to work the same way I would recommend an hc-05
     
  13. CadiBrewer

    Supporting Member  

    Posted Apr 1, 2016
    Thanks, wbarber. I've stitched over to the Windows Arduino IDE and I've gotten past that issue. I'm now having trouble with the uploading and config using the serial monitor. I get the:

    Starting Config




    Done!

    with no programming in between. I'm rereading the thread to see if I missed some help somewhere.
     
  14. wbarber69

    Well-Known Member

    Posted Apr 1, 2016
    Like I said u might have better luck with the hc05 preferably one with a button. you hold down the button and plug in power at the same time and it's automatically in uart mode. day_tripper has more experience with the models that have no button
     
  15. wbarber69

    Well-Known Member

    Posted Apr 1, 2016
    There are walkthroughs out there for what you are trying to do id suggest googling it and following someone's tutorial for the hc06
     
  16. CadiBrewer

    Supporting Member  

    Posted Apr 1, 2016
    Thanks! Doing that now before I resort to ordering the HC-05.
     
  17. CadiBrewer

    Supporting Member  

    Posted Apr 1, 2016
    Just spent 3+hours tying to get the HC-06 working. I gave up and ordered an HC-05 from eBay. I hope it is the right one because the Bluetooth connection is the last thing I need to test on my custom pcb shield.
     
  18. day_trippr

    We live in interesting times...

    Posted Apr 1, 2016
    Sorry, been busy as hell all day, didn't get into HBT 'til now.

    Anyway, I've had an HC-06 running since a few days after I got the HC-05 working.
    The wiring is virtually identical (if offset by a pin), otherwise it just worked.
    Here are my notes, followed by the ino file...

    Cheers!

    Code:
    Configure HC-06 for use with BrewPi
    
    Load sketch HC-06_setup.ino into Arduino IDE
    
    - change ROBOT_NAME "HC-06_1" value to desired name for the HC-06
    
    - If this is the first time setting up the HC-06, try the BLUETOOTH_SPEED setting of 9600 baud.
    - If that doesn't work, try using the BLUETOOTH_SPEED setting of 57600.
    - If that doesn't work, try using BLUETOOTH_SPEED setting of 38400.
    
    - change the pairing pin value from "1234" to desired value
    
    Upload the sketch
    
    Launch the Arduino IDE serial monitor
    - setting should be 9600 baud
    
    You should see the following:
    
    Starting config
    OK
    OKlinvorV1.8
    OKsetPIN
    OKsetname
    OK57600
    Done!
    
    If you see this instead...
    
    Starting config
    
    
    Done!
    
    ...you have a wiring error or a baud rate mismatch

    Below is HC-06_setup.ino

    Code:
    /*
    
    This sketch is for configuring the hc-06 bluetooth chip to work with BrewPi.
    
    Author Credit: Glen Arrowsmith (@garrows)
    
    Minor edits made
    
    */
    
    #define NODE_NAME "BP_SAT1"
    
    // If you haven't configured your device before use this
    #define BLUETOOTH_SPEED 9600
    // If you are modifying your existing configuration, use this:
    //#define BLUETOOTH_SPEED 57600
    
    #include <SoftwareSerial.h>
    
    // Swap RX/TX connections on bluetooth chip
    //   Pin 10 --> Bluetooth TX
    //   Pin 11 --> Bluetooth RX
    SoftwareSerial mySerial(10, 11); // RX, TX
    
    
    /*
      The posible baudrates are:
        AT+BAUD1-------1200
        AT+BAUD2-------2400
        AT+BAUD3-------4800
        AT+BAUD4-------9600 - Default for hc-06
        AT+BAUD5------19200
        AT+BAUD6------38400
        AT+BAUD7------57600 - BrewPi operating baud rate
        AT+BAUD8-----115200
        AT+BAUD9-----230400
        AT+BAUDA-----460800
        AT+BAUDB-----921600
        AT+BAUDC----1382400
    */
    
    
    void setup()
    {
      Serial.begin(9600);
      while (!Serial) {
        ; // wait for serial port to connect. Needed for Leonardo only
      }
      Serial.println("Starting config");
      mySerial.begin(BLUETOOTH_SPEED);
      delay(1000);
    
      // Should respond with OK
      mySerial.print("AT");
      waitForResponse();
    
      // Should respond with its version
      mySerial.print("AT+VERSION");
      waitForResponse();
    
      // Set pin to 1234
      mySerial.print("AT+PIN1234");
      waitForResponse();
    
      // Set the name to NODE_NAME
      mySerial.print("AT+NAME");
      mySerial.print(NODE_NAME);
      waitForResponse();
    
      // Set baudrate to 57600
      mySerial.print("AT+BAUD7");
      waitForResponse();
    
      Serial.println("Done!");
    }
    
    void waitForResponse() {
        delay(1000);
        while (mySerial.available()) {
          Serial.write(mySerial.read());
        }
        Serial.write("\n");
    }
    
    void loop() {}
     
    CadiBrewer likes this.
  19. CadiBrewer

    Supporting Member  

    Posted Apr 2, 2016
    No need to apologize, you have helped me (everyone!) tremendously with all of your advice.

    I've checked and re-checked the wiring. I'm going straight to the uno, not using my shield. I'm using Windows IDE on my laptop. I've tried all three baud rates. I get no love, only the Starting Config...done!

    I'm wondering if I have a bad module. Can't think of anything else to try.:confused:
     
  20. CadiBrewer

    Supporting Member  

    Posted Apr 7, 2016
    wbarber - can you please explain this in more detail? I've got an hc-05 with the EN and State pins and a reset button. I get it to flash slowly, but when I enter a command, nothing shows up on screen, not even the command I enter.
     
  21. wbarber69

    Well-Known Member

    Posted Apr 7, 2016
    Sort hung must have gotten mixed up. you hold down the button while plugging in the power and it will enter uart. then you should be able to enter commands. when you see it say starting programming done! that's the initialization script running on the uno. and "programming" the hc05 to accept commands
     
  22. CadiBrewer

    Supporting Member  

    Posted Apr 8, 2016
    I couldn't make an HC-06 work, so I ordered what I thought was the same model HC-05 that day_trippr used in the first post. When it arrived, it was different than the picture on the Amazon.com ad, and had the EN pin instead of KEY, and it had a button.

    I tried in vain for at least 4 hours to make it work with the resistor dividers and many different wiring combos and with pushing the button before powering up, after powering up, and any other way I could think of. I could get the slow blink, but I could never get the AT commands to do anything on the serial monitor.

    What finally ended up working was eliminating the resistors and going straight through to the UNO using the pins and the script that day_trippr calls for in the how-to.

    I then wired the bluetooth up in the operating mode and spent two hours trying to troubleshoot serial port issues. Then I realized that I am an idiot and if the resistor divider didn't work for the programming, it probably wouldn't work for the operating mode. So I went straight from TX to RX and RX to TX, and it worked the first time.

    I've already ordered the same bluetooth module from the original seller, but it is on the slow boat from China and won't be here until May. Until then, I figure that I'll take a chance on screwing up the module that I have by not using the resistor divider. In total, more than 6 hours spent on a $7 piece of equipment. But somehow that made it that much sweeter when I finally got it working.

    Any idea why the resistor dividers would cause a problem with the programming and operating modes?

    Edit: On a lark, I switched the RX and TX wires and tried it again over the resistor divider and it worked! I now have it wired up exactly as called for in the OP and it seems to be doing what it is supposed to. It makes me wonder if the wires were swapped on the programming mode, too, and if it would have worked in that mode. I'm not going to take it apart just to find out.
     
  23. day_trippr

    We live in interesting times...

    Posted Apr 9, 2016
    Congrats? ;)

    Cheers!
     
  24. wbarber69

    Well-Known Member

    Posted Apr 9, 2016
    Maybe you had thought that tx went to tx when it should go to rx and vice versa a simple easy to miss mistake. I was able to get mine to do the same with regards to not dividing the voltage, but it is not recommended. but in my experience most of the ones I got that are basically exactly like yours, with exception of one I think iirc, all came with the correct values already programmed in. I only ever reprogrammed so the device would show up with a different name. that's why I like that model so much. it's easy to program and in a regular case you wouldn't even need to.
     
  25. Baja_Brewer

    Well-Known Member

    Posted May 1, 2016
    Had mine off and powered down for a few months and it doesnt seem to want to work upon turning it on. WiFi won't connect, brewpi service won't fully launch, etc. Are these really that unstable?

    I was having internet issues that day, so I scrapped my repair effort, but I'm wondering if I'll have to go through an entire software rebuild. I'll try starting with an update when I get back to it.
     
  26. day_trippr

    We live in interesting times...

    Posted May 1, 2016
    No.

    Cheers!
     
  27. Baja_Brewer

    Well-Known Member

    Posted May 1, 2016
    Whoops. Meant to post this in the other BrewPi thread. Issue is still the same - I suppose the answer is as well ;)

    Frustrating.
     
  28. Bigdaddyale

    Well-Known Member

    Posted May 26, 2016
    I'm stuck on step #9 I have no idea how to get to the LXDE screen. I'm doing all of this with PUTTY on my windows pc.
     
  29. CadiBrewer

    Supporting Member  

    Posted May 26, 2016
    That's just the Raspberry Pi gui. In other words, just the desktop that boots when the Pi boots (assuming you have that set as the default boot).
     
  30. Bigdaddyale

    Well-Known Member

    Posted May 26, 2016
    The LXDE screen is not the default. I get a bunch of text that ask me to log in then it goes to my brewpi
     
  31. CadiBrewer

    Supporting Member  

    Posted May 26, 2016
    You can run a VNC server on the Raspberry Pi to get the full graphical interface. Or try this through Xserver. I'm at work and can't run it from here, but give it a whirl:


     
  32. Bigdaddyale

    Well-Known Member

    Posted May 26, 2016
    Ok I was able to open up a vcn session using tightvcn service. All I get is a giant raspberry logo with a flashing wastebasket logo.
     
  33. CadiBrewer

    Supporting Member  

    Posted May 26, 2016
    It might be a permission issue for the user you set up for the TightVNC service. Try this code to add permissions for that user for the audio and video permissions:

    replacing <userid> with the username you created.
     
  34. Bigdaddyale

    Well-Known Member

    Posted May 26, 2016
    I ran out of gas tonight.I'll try again in the morning.Biggest hurdle is I don't know anything about unix.I'm going to search for instructions that I can go through PUTTY.Thanks for the help so far.
     
  35. wbarber69

    Well-Known Member

    Posted May 26, 2016
    If you're going to run Bluetooth I suggest you get a screen and a keyboard and do the bt setup portions directly from the desktop on the pi. sshing or vncing in is going to give you issues. the gui bt manager is actually pretty decent on the pi and I don't even know the commands to do everything you need to do in terminal in order to get everything setup like the gui does. if you hook up a screen and it goes to a command prompt instead of desktop, then run raspi-config and set it up to boot into desktop at start. you may wanna also make sure you expanded the partition while you're there.
     
    Bigdaddyale likes this.
  36. Bigdaddyale

    Well-Known Member

    Posted May 26, 2016
    I'm pretty proud of my self of how bad I hosed my Brewpi.looks like I will be starting over from scratch.I did learn a lot so far.I can get a remote terminal screen and GUI with windows Remote desktop connection and Putty.
     
  37. Bigdaddyale

    Well-Known Member

    Posted May 26, 2016
    I don't know what I did but my GUI does not look or act like all the examples I have seen with GIS and YouTube videos.I'm going to do a
    sudo apt-get update
    sudo apt-get upgrade
    and see what happens. If this doesn't work I will start over.
     
  38. wbarber69

    Well-Known Member

    Posted May 27, 2016
    You're probably using Jesse with openbox
     
  39. Bigdaddyale

    Well-Known Member

    Posted May 27, 2016
    I got the Hco5 paired to the rpi. now i'm trying to get the brewpi software to work with my uno.
    Sudo apt-get upgrade fixed the GUI on the rpi.
    i had to turn off the bluetooth manager,then turn it back on to get it to work
    all is good with the Hc05 and the rpi.
    I'm having trouble with brewpi finding my uno board. same problem when it was connected with a usb cable.
     
  40. day_trippr

    We live in interesting times...

    Posted May 27, 2016
    You need to edit the BrewPi config file to point to the rfcomm port that the BT module is paired to.

    Eg: assumes your BT module connected to rfcomm0

    Code:
    $ sudo nano /home/brewpi/settings/config.cfg
    
    scriptPath = /home/brewpi/
    wwwPath = /var/www/brewpi/
    port = /dev/rfcomm0
    altport = /dev/null
    boardType = uno
    
    Save, exit, and restart the BrewPi script to see if it'll find the Uno via the rfcomm port...

    Cheers!
     
    Bigdaddyale likes this.
Draft saved Draft deleted

Share This Page

Group Builder