• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

[Version 2 Release] RaspberryPints - Digital Taplist Solution

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Rather than imperiously declaring Windows "bad" for projects, I put together some reasons I and others do use the BrewPi. Maybe some of you will have a better understanding after reading this:

https://www.brewpiremix.com/why-do-you-guys-insist-on-using-linux/

Ultimately, I have done my job right if you never think about where it's running after installing, and if I make installing a non-issue.
 
I'm having a weird problem. I got my 4 yo SF800s running again and I'm getting double pours reported on all of them when I do one continuous pour. The total amount of both pours seem to be correct. I poured 16oz and got 9.12 and 7.06 reported 7 seconds apart. I've upped the pour message delay to 5000 and it doesn't help. I put a brand new Uno on it to no avail, powered down rebooted etc. I looked at the rpints.log and it gives a broken pipe error code. The pic is below. Any words of wisdom from the group?

Edit: I'm using a Pi 3 Debian Buster and RandR+ files.
 

Attachments

  • flow.jpg
    flow.jpg
    362.3 KB
Last edited:
Is it possible to have two scripts running?
I really wouldn't know. I'm seriously a noob on Linux and Arduino stuff. Now if we were doing it in assembler on a ZiLog Z80 processor, I might know what was going on. Thanks to all the help I've gotten here, my almost 70 year old brain got this far. It's the standard RandR+ install and I uploaded the script using IDE. Is there a way to see if two processes are going on?
 
As the original RaspberryPints doesn't create any logs in /var/log, and from the dialog shown, I believe this has to be @RandR+'s fork.
I would suspect there's some kind of timer function involved inside his AVR code that's binning half the pour to one message and the other to the next. None of that behavior is native to the original RaspberryPints so I can't help debug it...

Cheers!
 
Hi, I've checked my flow meters and all work and pours are registered when i use pins 8 and 9 but not 10,11 and 12 any reason for this? I have set 4 taps up and checked counts per liter are the same. Should i solder pin in 6 and 7 instead?
 
Is there a way to see if two processes are going on?
Try this:
Code:
 ps -ef | grep "python" | grep -v "grep"
It should show everything running under Python.
Now if we were doing it in assembler on a ZiLog Z80 processor, I might know what was going on.
My favorite instruction was "polcat". Silly Texas Instruments guys. :)
 
Last edited:
Try this:
Code:
 ps -ef | grep "python" | grep -v "grep"
It should show everything running under Python.

My favorite instruction was "polcat". Silly Texas Instruments guys. :)

Only one python process and it's PintDispatch.py . Oh well, I guess it doesn't really matter unless I want to put the last pour on the screen. It seems to decrement the volumes fairly accurately.
 
It has been a while since I looked at the code, but I think it is possible that the Arduino will send pour pulse information in multiple messages for a single pour under some situations.
 
If you can enumerate the conditions I can try them out on my backup system.
I have never seen it happen, but I don't remember pouring more than 20 ounces in one shot (I don't do growlers, for instance)...

Cheers!
 
If you can enumerate the conditions I can try them out on my backup system.
I have never seen it happen, but I don't remember pouring more than 20 ounces in one shot (I don't do growlers, for instance)...

Cheers!
Thanks! Hardware RPi3, USB to Arduino Uno3 two sensors on pin 4 and 6. Software RandR+ standard build. Pour message Delay = 5000, Pour Trigger Count=200, Kick Trigger Count=30, Update Trigger Count=250, Taps=8. Refresh listeners Auto. Volume dispensed 16oz. Down at the bottom you will see two pours adding up to 16oz.
 
Interesting. My "classic" raspberrypints.ino has pourMsgDelay set to 300 (and indeed, it's milliseconds).
pourMsgDelay is only used in the main loop code:

Code:
void loop() {
  nowTime = millis();
  pollPins();
  if ( (nowTime - lastPourTime) > pourMsgDelay && lastPourTime > 0) {
    //only send pour messages after all taps have stopped pulsing for a short period
    //use lastPourTime=0 to ensure this code doesn't get run constantly
    lastPourTime = 0;
    checkPours();
    checkKicks();
  }
}

So, again, as I'm running "classic" R'Pints, I can't sim RandR+'s kit here. I do know for certain I can pull well over 8 ounces every time and only register one pour...


Hi, I've checked my flow meters and all work and pours are registered when i use pins 8 and 9 but not 10,11 and 12 any reason for this? I have set 4 taps up and checked counts per liter are the same. Should i solder pin in 6 and 7 instead?

I have been using 2, 5, 6, 7, 8 and 9 for years so I can vouch for those on either an Uno or an Alamode. And I know someone who used 8,9, 10 and 11 so those should be solid as well...

Cheers!
 
broken pipe error code.
Ive trying to suppress these as much as I can but really this error is when you close the raspberry pints webpage and then do a pour because the webpage connects to the python to know when it should refresh after a pour.

The double pour would happen if the flow meter stopped sending the pulses to the Arduino or if there is a bug in the code which I haven't found yet. is it always the same amounts or does it appear random amounts?
 
Ive trying to suppress these as much as I can but really this error is when you close the raspberry pints webpage and then do a pour because the webpage connects to the python to know when it should refresh after a pour.

The double pour would happen if the flow meter stopped sending the pulses to the Arduino or if there is a bug in the code which I haven't found yet. is it always the same amounts or does it appear random amounts?

I thought the flow meters might be dirty and randomly skip pulses or something. I cleaned them really well with BLC and it still presented the double pour on both meters on different pins. I'll hook up my third one and see if it occurs there too. The amounts seem to be +-2 oz of half the 16 oz pour. Sometimes less first and sometimes more. Occasionally it will register the full amount correctly. It's close enough that I'm not going to worry about it. If something comes to mind, let me know. Thanks for responding!
 
Can someone please explain what these settings actually mean? Cheers
Pour message Delay = 5000,
Pour Trigger Count=200,
Kick Trigger Count=30,
Update Trigger Count=250,
 
//number of milliseconds to wait after pour before sending message
unsigned int pourMsgDelay = 300;
// the number of counts until a pour starts (used to filter small flukes)
unsigned int pourTriggerValue = 10;
// the number of counts in the same time slice which are considered a kick
unsigned int kickTriggerValue = 30;
// the number of counts when a pour update will be send out
unsigned int updateTriggerValue = 200;
 
//number of milliseconds to wait after pour before sending message
unsigned int pourMsgDelay = 300; Why does there need to be a delay?
// the number of counts until a pour starts (used to filter small flukes)
unsigned int pourTriggerValue = 10;
// the number of counts in the same time slice which are considered a kick Whats a kick? Isnt that when the keg is empty? How does this work?
unsigned int kickTriggerValue = 30;
// the number of counts when a pour update will be send out What does this mean exactly?
unsigned int updateTriggerValue = 200;
Cheers mate, see my questions above? Not sure on a couple of them?
 
When a keg is kicked there is a blast of co2 and the pulse count speeds up. The code use that value to try and find that condition. Might be an attempt to disable a tap, not sure.

Message delay would help throttle messages and give time to be processed.

Not sure on the updateTriggerValue, but looks to be used to determine if enough pulses have happen to send a message.

I think some of the code is to handle multiple taps being used at once and possibly for future enhancements. You also have two independent processors running so there needs to be some sort of handshaking.

Some of those values where buried in the Arduino code, but where lifted up to keep the Arduino code from needing to be modified.
 
I already showed what pourMsgDelay does: "only send pour messages after all taps have stopped pulsing for a short period"

There needs to be some kind of delineation of an "atomic pour", so waiting until there are no "ticks" is how the originators decided to implement it. I don't know why RandR+'s version raised that value from 300 milliseconds to 5 seconds, that seems really excessive.

pourTriggerValue is explained in the code fragment provided by @ba-brewer, it's the threshold to call meter activity a "pour".

I do not believe the Kick code was ever implemented...

Cheers!
 
When a keg is kicked there is a blast of co2 and the pulse count speeds up. The code use that value to try and find that condition. Might be an attempt to disable a tap, not sure.

Message delay would help throttle messages and give time to be processed.

Not sure on the updateTriggerValue, but looks to be used to determine if enough pulses have happen to send a message.

I think some of the code is to handle multiple taps being used at once and possibly for future enhancements. You also have two independent processors running so there needs to be some sort of handshaking.

Some of those values where buried in the Arduino code, but where lifted up to keep the Arduino code from needing to be modified.
Ahh ok thanks for the explanation on all of this. So when you say 2 processors do you mean the pi and the arduino? Im still waiting to get my arduino but is this the procedure to get it all up and running.

1. Connect the Arduino uno to the pi via usb?
2. Connect the flow meters to power and the signal wire to the GPIO pins on the arduino?
3. Go into the settings page and set it all up accordingly?
 
Ahh ok thanks for the explanation on all of this. So when you say 2 processors do you mean the pi and the arduino? Im still waiting to get my arduino but is this the procedure to get it all up and running.

1. Connect the Arduino uno to the pi via usb?
2. Connect the flow meters to power and the signal wire to the GPIO pins on the arduino?
3. Go into the settings page and set it all up accordingly?

Yes, processors is the pi and Arduino. Maybe Single Board Computers or something along that line might be a better word.

Yes, your steps seem right. Not sure though if you need to rerun the install script after step 2 or if the rpints will discover the Arduino on it's own. If you see the parameters in the setup page already it seems like you should not have to rerun the install script.
 
Yes, processors is the pi and Arduino. Maybe Single Board Computers or something along that line might be a better word.

Yes, your steps seem right. Not sure though if you need to rerun the install script after step 2 or if the rpints will discover the Arduino on it's own. If you see the parameters in the setup page already it seems like you should not have to rerun the install script.
Cheers mate. Will give thata crack once I get everything.

Now I just have to find 8mm push in fittings to 1/2 inch thread for my flow meters. They seem hard to find.
 
It has been said on HBT that 1/2" NPS (straight pipe thread) and 1/2" BSPP (also straight threading) are close enough to mate tight.
If that's true (and if you look at the comparison table here https://www.valvesonline.com.au/references/threads/ it provides some support) then:

John Guest PI451014FS 1/2" FPS - 5/16" OD tubing should work

fwiw, I've picked up numerous PTC fittings from Fresh Water Systems over the years and they have that part in stock...
https://www.freshwatersystems.com/products/john-guest-female-adapter-bspp-5-16-x-1-2-bspp

The whole Aussie thing might render that non-viable, I guess ;)

Cheers!
 
It has been said on HBT that 1/2" NPS (straight pipe thread) and 1/2" BSPP (also straight threading) are close enough to mate tight.
If that's true (and if you look at the comparison table here https://www.valvesonline.com.au/references/threads/ it provides some support) then:

John Guest PI451014FS 1/2" FPS - 5/16" OD tubing should work

fwiw, I've picked up numerous PTC fittings from Fresh Water Systems over the years and they have that part in stock...
https://www.freshwatersystems.com/products/john-guest-female-adapter-bspp-5-16-x-1-2-bspp

The whole Aussie thing might render that non-viable, I guess ;)

Cheers!
Yeah thats my issue, trying to find something local or on ebay. Might try ali express
 
I definitely didn't mean to raise it to 5 seconds for pouring delay because it is excessive. I checked and it looks like its still defaults to 300....
Yah, I just changed it that high to see if it would affect my double pour issue. It did not. On another note, now I'm trying to get the taps in two columns. It worked great on my old setup, but of course that index.php file doesn't work with your version changes. I've been trying to work with your window.onload function around line 236 and not having any luck. Do you have any words of wisdom on that issue? Thanks again for all your help. DM me your snail mail addy and I'll send a case of Pliney your way.
 
Hmm, is it possible to frazzle the alamode board just by trying to remove some pins so i can move them elsewhere :/
After moving some i don't use to pins 6 and 7 my alamode no longer works when i plug the power in, only when i plug it into the pi :eek:
 
Hmm, is it possible to frazzle the alamode board just by trying to remove some pins so i can move them elsewhere :/
After moving some i don't use to pins 6 and 7 my alamode no longer works when i plug the power in, only when i plug it into the pi :eek:
Unos are dirt cheap if you have a spare USB. Might be time to replace it. I seem to recall it needing power directly to operate properly.
 
Hmm, is it possible to frazzle the alamode board just by trying to remove some pins so i can move them elsewhere :/
After moving some i don't use to pins 6 and 7 my alamode no longer works when i plug the power in, only when i plug it into the pi :eek:

If you noticed a fried electrical smell then the answer is yes. If not try disconnecting the wire and see if it rebounds.

I am assuming you made/make changes with the power off.
 
There is a 3-pin jumper header on the Alamode next to the SD card socket that selects between "powered by RPi" or powered by its own microUSB receptacle. Did you knock that loose?

Cheers!
 
On another note, now I'm trying to get the taps in two columns
Are you trying to switch from rows to columns? If so there is a option for that, just change it to Yes and the taps will display in columns.

upload_2020-1-15_7-59-54.png
 
Just wanted to share a solution to a problem that had me banging my head for almost a week.

I got my Pi and Uno all set up. Many thanks to LBussy and RandR+ for their hard work. I got one of my flow meters tested and ready to go. I take the rig down to my keezer and hook it up to my monitor, keyboard, mouse and keg full of water for testing. The Uno is running on its own dedicated power supply. Suddenly pours aren't being registered. I look at the Uno IDE and there's a few letters over the serial monitor, but not the normal "alive" message. Look at the log and see errors that service is ready, but its not seeing the Uno.

So I start troubleshooting this. I replace the USB cable to the Uno. No luck. I'd unplug and re-plug the Uno, and it would work great, but on a different serial port (ACM1 rather than ACM0). I do see pours being registered in the Uno IDE, but not in raspberry pints. Reflash the Uno, still having the same problem. Unplug everything and take the pi and Uno up to my home office to try and troubleshoot more. I SSH into the pi intending to pull the rpints log. I look at the log, and no errors! I take it back down to the keezer, but I don't hook a keyboard and mouse into the pi. I re-connect my ssh session and look at the log. No errors again. I hook up my test flowmeter, pull a test pour, and it works!

TLDR: Flow meter connection from Uno didn't work while keyboard and mouse were plugged into the pi. No keyboard or Mouse, flow meter works. Keyboard and mouse, flow meter doesn't register.

I know pi's are sensitive regarding power supplies, but I didn't ever thing that a keyboard and mouse would draw enough from power from the USB ports to mess up the Uno communication. The pi was a hand me down from a co-worker who got one of the new pi 4's, so I just took it as a given that the power supply would be strong enough. Oh well, I can reach the admin panel from a different pc and dont' need to keep a keyboard and/or a mouse plugged in all the time.
 
Are you trying to switch from rows to columns? If so there is a option for that, just change it to Yes and the taps will display in columns.
.

No, my previous version had two columns of 4 each. I ran the tap numbers across the bottom and it correlated with the handles. Similar to what JonW did with his taplist here http://www.surfcitybrewing.com/taplist/. I may have even modified his last time. I have the html file and basically he just loops
<?php for($i = 1; $i <= 4; $i++) {
if( isset($beers[$i]) ) {
$beer = $beers[$i];
I was trying to modify your code with this change in your loop, but my ignorance got in the way.
 
There is a 3-pin jumper header on the Alamode next to the SD card socket that selects between "powered by RPi" or powered by its own microUSB receptacle. Did you knock that loose?

Cheers!
Nope, checked that. Didn't hear any frazzling either but maybe the board got too hot and screwed something :( being quoted $70 for the board plus postage to norway :O i did'nt pay half that last time
 
I don't know enough about the alamode, but if you can operate it directly from the Aduino IDE without the pi that would be a way to help isolate if the problem is the pi or alamode.
 
Just so it's clear, if you plug the Alamode atop the RPi, does everything work?
If so, which position is that power jumper in when it works?

Cheers!
 
So I received my Arduino today and plugged it into the pi. haven't got my flow meters yet but whilst Im waiting just want to get everything setup properly. So in the Taps settings I have this? Do these settings look ok?

Screen Shot 2020-01-16 at 5.44.22 pm.png


Also what pins should I choose for my four taps and what figure do you use for count per litre or is there a way to calibrate this?

Do I need to change anything in the hardware I/O display section?

Thanks guys much appreciated.
 
Back
Top