BrewPi Remix – What’s Old is New Again

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.
so I would only be able to get 1 maybe 2 of the 3 into the RPI
If you have more than a couple of Arduinos, you may want to consider a powered USB hub. I'd have to do the math, but at some point running the Unos with relays will exceed the capacity of the Pi's USB bus.
 
If you have more than a couple of Arduinos, you may want to consider a powered USB hub. I'd have to do the math, but at some point running the Unos with relays will exceed the capacity of the Pi's USB bus.

Will most like do that or if I have to end up making custom USB cables isolating the voltage lines and putting in a dedicated power supply.
 
I threw together a quick diagram of how I plan to wire my system up. Can someone give it a sanity check or correct me if I'm way off in my understanding of how the tech works?

I have decided to do a dedicated 15 watt power supply and use the power barrels on the Arduino to utilize the onboard power circuit for extra protection and self modulation.
 
Last edited:
Off the bat: I think the Arduino power connection is 7-12VDC (6-20VVDC at the limits).

ETA: If you will use the I2C LED, you will want to use Pin A0. Also, I am not sure what you mean by "Data Bar Bus" but you won't be able to tie all three data lines together. You'd need a separate pull-up for each.
 
Off the bat: I think the Arduino power connection is 7-12VDC (6-20VVDC at the limits).

ETA: If you will use the I2C LED, you will want to use Pin A0. Also, I am not sure what you mean by "Data Bar Bus" but you won't be able to tie all three data lines together. You'd need a separate pull-up for each.



Yes, I didn't quite understand the power requirements (not sure I still do) and thought I could power the Uno from the 5V power and ground and thought the board ran of 5v at 3amp, I realize from more research I can see that by using the barrel plug and possibly the USB connection USB connection you can take advantage of the power regulator, which can operate between 6-20v but if less than 7 then the board could be unstable. So I would most likely use a 12v power adapter. My ultimate end goal is to power the Uno's locally and not rely on the Raspberry Pi, to not overload the USB, not sure if this is really necessary though..

Good to know about the data lines, I thought I had read in the documentation you could tie them all together because they each had an address but now that I think about it, that was one board with multiple probes and not multiple boards. This would explain the issue I was having in detecting components in the maintenance panel.
 
The sweet spot for the barrel connected power is 9V.
7.5V is too low for reliable operation particularly if there are peripherals involved, while 12V will require the three terminal 5V linear regulator to sink excessive heat...

Cheers!
 
I am having trouble getting brewpi remix to display tilt data from a tiltbridge. The tiltbridge is reading the tilt and relaying to brewpi however below is what is displayed along with the log. Any advice is greatly appreciated.
Screenshot 2022-04-22 113321.png
 
Thanks for the fast response, I am running
Brewpi version: 0.8.0 (main) [ 3eb9c37 - Addresses sensor save ]
and TiltBridge: v1.1.1 [master] (5dd0f00)
 
Thank you. That "Argument must be a string" error may be the one that's plagued me (and probably @Thorrak) the most consistently. I'm going to have to find a few parts and pieces and see if I can reproduce things here.

If you use the Tilt straight to your Pi, does it behave?

ETA: Tiltbridge does see that Tilt, right?
 
Thank you. That "Argument must be a string" error may be the one that's plagued me (and probably @Thorrak) the most consistently. I'm going to have to find a few parts and pieces and see if I can reproduce things here.

If you use the Tilt straight to your Pi, does it behave?

ETA: Tiltbridge does see that Tilt, right?
Tiltbridge does see the tilt with no issues.

While fermenting Pi only occasionally sees the tilt and only when "sudo hcitool lescan" is scanning.
I believe there is too much chamber in the way of the pi, hence Tiltbridge.
I have put the tilt unit next to the pi and it does work as expected at that piont.
 
Interesting, this is tickling some dendrites. I'm going to bet a dollar this is related to something I thought I fixed already but didn't. :)
 
advice is greatly appreciated.
Would you please edit your /home/brewpi/settings/config.cfg and use/edit the following line?
Code:
logJson = True
It won't change the behavior, but it will log the json it receives in the logs and we might be able to see something else.
 
Would you please edit your /home/brewpi/settings/config.cfg and use/edit the following line?
Code:
logJson = True
It won't change the behavior, but it will log the json it receives in the logs and we might be able to see something else.
Done
1650667697802.png
 
If it helps locate the issue, the lines with the bug are the ones below; I think it’s the way that the code is trying to pull the hardware version (which is now fwVersion). I hit the same problem and just commented out the problem lines as I assumed it was because I haven’t upgraded TiltBridge in forever...

Python:
diff --git a/brewpi.py b/brewpi.py
index c2ed372..767ea89 100755
--- a/brewpi.py
+++ b/brewpi.py
@@ -1342,9 +1342,9 @@ def loop():  # Main program loop
                                                     prevTempJson[config['tiltColor'] + 'Temp'] = round(_temp)
 
                                                 # Get battery value from anything >= Tilt v2
-                                                if int(prevTempJson[config['tiltColor'] + 'HWVer']) >= 2:
-                                                    if (checkKey(api['tilts'][config['tiltColor']], 'weeks_on_battery')):
-                                                        prevTempJson[config["tiltColor"] + 'Batt'] = int(api['tilts'][config['tiltColor']]['weeks_on_battery'])
+                                                #if int(prevTempJson[config['tiltColor'] + 'HWVer']) >= 2:
+                                                #    if (checkKey(api['tilts'][config['tiltColor']], 'weeks_on_battery')):
+                                                #        prevTempJson[config["tiltColor"] + 'Batt'] = int(api['tilts'][config['tiltColor']]['weeks_on_battery'])
 
                                                 # Set time of last update
                                                 lastTiltbridge = timestamp = time.time()
 
I hit the same problem and just commented out the problem lines as I assumed it was because I haven’t upgraded TiltBridge in forever...
What are we gonna do with you? ;)

That is likely where the issue lies, but I'm confused. I use TiltBridge, I'm a contributor as you know, and obviously, I use BPR. I've not seen this issue but I should have. I checked and fwVersion goes back to at least 0.2.3. Right now all of my "debug" is via github since all of my stuff is still in boxes.

Today I am pulling a new power feed to the barn and then replacing the breaker box. After that, I might be able to find my box of stuff and see what's going on here. @athistle could likely comment those same lines, but I'm scratching my head for the reason right now.
 
What are we gonna do with you?

When I first started programing in college, I wanted to install twm as my window manager rather than the HPUX window manager. Unfortunately, they taught us FORTRAN and not C, so I didn't fully understand the source code. I got twm to compile by just deleting the lines of source code that threw a compiler error until it compiled successfully. It all worked great. There were just a couple of things you couldn't do without it hitting the missing code and killing all your processes with a hard log out...

I uncommented the lines that are throwing the error and dropped my tilts in a beaker of water last night. So far, so good. Not seeing the problem yet. Something is occasionally putting a None into the variable hwVersion, but it's hard to reproduce. I think a workaround is to change line 962 of Tilt.py to
Python:
if (tiltValue.hwVersion):
  hwVersion = tiltValue.hwVersion
else:
  hwVersion = 0
but that's not a real fix...
 
I got twm to compile by just deleting the lines of source code that threw a compiler error until it compiled successfully.
I wish I could laugh at that. All I can do is not my head and sigh. :)

Something is occasionally putting a None into the variable hwVersion, but it's hard to reproduce.
Interesting - and that was with just the Tilt, not TB? That means I can’t blame @Thorrak which is a bummer.

I remember something the Tilt devs told me about that version. I think there are intervals where that part of the beacon does something else. That would explain it being a timing issue.

What I should really do is just keep that and anything else unlikely to change in the Tilt object. No reason to check it every time.

As you know there are a LOT of areas in that code which could be written better. Adding to it is always baling wire and bubblegum, so here we are.

I appreciate you testing that!
 
Yeah, can't find any issue with the JSON that tiltbridge is sending. I think that something can cause the tilt to be picked up directly and it messes with the contents of prevTempJSON, but I can't figure out what causes it. If you go for the patch, then I think the same if/else logic is needed around line 1545 in brewpy.py. Complete belt and braces would be
Python:
if (prevTempJson[config['tiltColor'] + 'HWVer']) and ( int(prevTempJson[config['tiltColor'] + 'HWVer']) >= 2):
on line 1346 to catch the None if it sneaks in from somewhere else.
 
When I first started programing in college, I wanted to install twm as my window manager rather than the HPUX window manager. Unfortunately, they taught us FORTRAN and not C, so I didn't fully understand the source code. I got twm to compile by just deleting the lines of source code that threw a compiler error until it compiled successfully. It all worked great. There were just a couple of things you couldn't do without it hitting the missing code and killing all your processes with a hard log out...

I uncommented the lines that are throwing the error and dropped my tilts in a beaker of water last night. So far, so good. Not seeing the problem yet. Something is occasionally putting a None into the variable hwVersion, but it's hard to reproduce. I think a workaround is to change line 962 of Tilt.py to
Python:
if (tiltValue.hwVersion):
  hwVersion = tiltValue.hwVersion
else:
  hwVersion = 0
but that's not a real fix...
Finally getting back to this, I edited Tilt.py as suggested and now my BPR script will not start.
Any idea where I went wrong?
 
Hmmm... that's not the error I was expecting. Can you log into the Pi, cd into the directory containing brewpy.py and type
Bash:
git diff brewpi.py
and paste in the output?
 
I feel like I'm being judged here. :)

I really need to have a closer look. I was traveling last week and when I got back I discovered my BIL helped my wife "organize" all the stored boxes. Yeah ... NO idea where my rig is now.

For the above, I don't see what could be spawning an error which is very strange. Maybe @duncan.brown will pass this eye test.
 
I don't see anything obviously bad with that code. Can you run
Git:
git status
and see if anything else has changed? You can ignore files in the data directory and the settings. I'm wondering if another piece of python code has been changed somehow.
 
I don't see anything obviously bad with that code. Can you run
Git:
git status
and see if anything else has changed? You can ignore files in the data directory and the settings. I'm wondering if another piece of python code has been changed somehow.
1651430485782.png
 
I feel like I'm being judged here. :)

I really need to have a closer look. I was traveling last week and when I got back I discovered my BIL helped my wife "organize" all the stored boxes. Yeah ... NO idea where my rig is now.

For the above, I don't see what could be spawning an error which is very strange. Maybe @duncan.brown will pass this eye test.
No judging from me. This is absolutely a first world problem.
 
There's your issue. What led you to edit that?

You should be able to issue the command: sudo git restore /home/brewpi/Tilt.py
 
Probably my blathering above. The if/else statement isn't indented properly, so python is choking on it. If you comment out the lines in br
Probably my blathering above. The if/else statement isn't indented properly, so python is choking on it. If you comment out the lines in brew.py that trigger the bug, you don't need to change any other files
w.py that trigger the bug, you don't need to change any other files.
 
Back
Top