[Version 2 Release] RaspberryPints - Digital Taplist Solution

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.
Hi Guys,

wondering if you can help me out. I've tried to piece together all the steps and have gotten as far as running the Localhost/install in chromium. However as soon as i hit setup i get the following error:
--------
"warning:mysqli_connect(): (28000/1698): Access Denied for user 'root'@'loaclhost' in /var/www/html/install/configprocessor.php on line 52
Success!
Checking config folder permissions... Success!

Cannot connect the database using the supplied information
-------

The only issue i have had during the setup was the command "sudo usermod -aG www-data admin" which returns a user 'admin' does not exist

I am certain i have password correct. is this something that can be fixed or do I have to start again from scratch? im pretty tech savvy but Linux is new to me

TIA
I need to review my notes. I may have accidentally truncated that command in my instructions.
I believe that the correct command is: "sudo usermod -aG www-data admin-user"
 
Hi, Is anyone out there using Rpints with flow meters accessing their Rpints page through another computer on their network? If so I'm wondering how often the flow meter/pour will update to the client computer accessing the page via browser? or how to get it to refresh Tap list page after each pour.
 
I have a local console perched atop my t-tower and that updates immediately.
For remote displays I added refresh meta tags to my index.php so they'll update at 5 minute intervals.
I could probably cut that down to a minute, but I don't really use remote displays to track real-time pours...

Cheers!
 
I need to troubleshoot this but it’s raised a couple of questions in the process. I have a beer that is shooting some air or foam intermittently and it’s frustrating me. It’s not a temperature issue I need to take apart the keg and see if there’s any hop debris in the dip tube or something causing it. It isn’t consistent it just occasionally shoots a little burst of foam. My second thought Is I set 30 psi a day longer than I usual do if I’m doing my quick carb method. I had a pipe burst in my House so needless to say I got distracted.... the beer doesn’t seem over-carbonated but ill try bleeding the pressure to 0 for a couple of days to maybe off-gas any extra in case that is causing the problem. This problem caused the beer to falsely show kicked last night at my super bowl party. So for my questions.

1. is anyone taking apart and unhooking their swissflow meters for cleaning? I just ran
Starsan through my lines.

2. Is anyone disabling the keg kicked code from sending from their arduino code? Obviously solving my foam problem would erase that problem. But as a secondary measure in case an air pocket completely erases all your pour info....
 
Last edited:
Has anyone had problems with the Adafruit flow meters stopping registering pours when hooked up in-line? With all the fantastic info on this site, I was able to hook up a RPi3 and Uno and get everything running with an Adafruit meter. I was able to blow in it and register pours. Then I actually hooked it up (1 ft from the beer in with another 14 or so feet to the tap) and it was working fine for half a dozen pours. Tested out a second meter and after putting that in-line with my 2nd tap, both meters stopped registering. I unconnected one of them and plugged in a 3rd meter I'd purchased. Blew through that and it registered. So all the electronics are fine, just not the two meters hooked up to the lines. Could they have gone bad or is it something with the way I plumbed them in?
 
[...]
1. is anyone taking apart and unhooking their swissflow meters for cleaning? I just ran Starsan through my lines.

2. Is anyone disabling the keg kicked code from sending from their arduino code? Obviously solving my foam problem would erase that problem. But as a secondary measure in case an air pocket completely erases all your pour info....

I've yet to take anything apart since I built my current keezer in 2013 and installed the SF800s in 2014. I recirculate BLC or LLC (whichever is cheaper at my lhbs) for 20 minutes then rinse for 5.

As for the Arduino code, I'm pretty sure the keg kick detection is disabled by default (this was intended to detect the flow meter rotor spinning at high speed for enough time to indicate an emptied keg). What isn't disabled is "emptying" the keg by cumulative tick count, so if a meter accumulates enough ticks the keg's gonna go "MT", end o' story. There's no way for R'Pints to know someone isn't pouring beers at all hours of the day :)

Bottom line here, if your dispensing system temperature and CO2 pressure combination result in a certain volumes of CO2 at equlibrium, and your carbonation method resulted in a higher volumes of CO2, there's gonna be out-gassing until the beer reaches equilibrium again.

This can definitely mess with the flow meters - bt/dt - which encourages a tighter carbonation process. Thanks to a $100 two year old top-freezer Craig's List fridge I have a dedicated cold-carbonation stage in the pipeline with the temperature and CO2 set to the same pressure as my keezer...

Cheers!
 
Has anyone had problems with the Adafruit flow meters stopping registering pours when hooked up in-line?[...]So all the electronics are fine, just not the two meters hooked up to the lines. Could they have gone bad or is it something with the way I plumbed them in?

Just for clarity, when you swapped in the third meter, were you able to register pours?
Which digital GPIO are you using for your meters?
Also, just in case, the meters can share power and ground but need separate digital IO pins for the signal outputs.

fwiw, I've not experienced similar behavior with six meters running together, but I'm not using the same meters...

Cheers!
 
I've yet to take anything apart since I built my current keezer in 2013 and installed the SF800s in 2014. I recirculate BLC or LLC (whichever is cheaper at my lhbs) for 20 minutes then rinse for 5.

As for the Arduino code, I'm pretty sure the keg kick detection is disabled by default (this was intended to detect the flow meter rotor spinning at high speed for enough time to indicate an emptied keg). What isn't disabled is "emptying" the keg by cumulative tick count, so if a meter accumulates enough ticks the keg's gonna go "MT", end o' story. There's no way for R'Pints to know someone isn't pouring beers at all hours of the day :)

Bottom line here, if your dispensing system temperature and CO2 pressure combination result in a certain volumes of CO2 at equlibrium, and your carbonation method resulted in a higher volumes of CO2, there's gonna be out-gassing until the beer reaches equilibrium again.

This can definitely mess with the flow meters - bt/dt - which encourages a tighter carbonation process. Thanks to a $100 two year old top-freezer Craig's List fridge I have a dedicated cold-carbonation stage in the pipeline with the temperature and CO2 set to the same pressure as my keezer...

Cheers!

I took apart my keg and transferred to a different keg on inspection there was a Knick in my dip tube o ring. I figured that may be the issue. I put some keg lube on it for now but I’ll have to order some new o rings. I’m sure I still had an overpressure issue too. As far as the kicked code I guess it could have been ticks. I wasn’t the one that did the pour that killed it. To really know how it behaved Just seemed last I looked it was showing 3/4 and then next I looked it showed -5. I remember during testing a long time ago in the command prompt and blowing into the meters it sent a kicked command. So is raspberry pints by default set to ignore that or are you saying by default it doesn’t even send it? Cause mine definitely sent it.
 
Hi - yeah I soldered in female connectors so I could unplug a meter from the cables if I wanted to. So I unplugged one of the meters inside the kegerator and plugged an extra third meter into the cable. Blowing through that third meter did register on 'Pints which showed that the flow monitor and connections were working.

I'm using an Elegoo Uno board and using your great instructions got it working just with the Pi. I have each of the two meters into pins 6 & 7 on the board.
 
[...]
So is raspberry pints by default set to ignore that or are you saying by default it doesn’t even send it? Cause mine definitely sent it.

There are three layers of code to get from meters to database:
- the Arduino sketch generates tick counts and combines them with their source Pin ID into pour type ("P") messages and sends them over the physical link
- flow_monitor.py running on the host system listens to the physical link for pour messages. When it gets one it formats the message and sends it along to...
- pours.php which actually updates the database.

Note that none of the above code has the first clue how much a given keg contains at any point, all they do is detect and post pours to the database. The back end php interprets the db contents to determine how full a keg is.

So, while it looks like the Arduino sketch will still send a kick type ("K") message, if you then look at flow_monitor.py the code branch triggered by a type "K" message is almost entirely commented out and there's no connection to pours.php in that path.

As well, if you look at pours.php there is no code to handle the "kick" case.

[...]Blowing through that third meter did register on 'Pints which showed that the flow monitor and connections were working. I'm using an Elegoo Uno board and using your great instructions got it working just with the Pi. I have each of the two meters into pins 6 & 7 on the board.

This would seem to indict the second meter, yes?
Pins 6 and 7 are perfect, I use 2 and 5 through 9 so they've been thoroughly vetted :)


Cheers!
 
There are three layers of code to get from meters to database:
- the Arduino sketch generates tick counts and combines them with their source Pin ID into pour type ("P") messages and sends them over the physical link
- flow_monitor.py running on the host system listens to the physical link for pour messages. When it gets one it formats the message and sends it along to...
- pours.php which actually updates the database.

Note that none of the above code has the first clue how much a given keg contains at any point, all they do is detect and post pours to the database. The back end php interprets the db contents to determine how full a keg is.

So, while it looks like the Arduino sketch will still send a kick type ("K") message, if you then look at flow_monitor.py the code branch triggered by a type "K" message is almost entirely commented out and there's no connection to pours.php in that path.

As well, if you look at pours.php there is no code to handle the "kick" case.



This would seem to indict the second meter, yes?
Pins 6 and 7 are perfect, I use 2 and 5 through 9 so they've been thoroughly vetted :)


Cheers!

Thanks for the thorough explanation of the backend workings this explained all of my questions. I transferred the problem beer to a new clean keg also I threw in an extra one of those stir sticks in my dip tube to add more resistance and I let the keg sit overnight at zero psi. I’m happy to report it’s pouring great now. In fact kind of slow It was probably overkill adding the extra stick. Oh well.
 
Excellent! :mug:

If you pull up the pours table using phpmyadmin and look at the pour records you should be able to see where the "MT" came from.
I bet there are a lot of huge tick counts involved...

Cheers!
 
This would seem to indict the second meter, yes?
Pins 6 and 7 are perfect, I use 2 and 5 through 9 so they've been thoroughly vetted :)

Cheers!

Yes, agreed. It's just that all 3 meters were new so it seems crazy that 2 would go (I checked both meter connections with the 3rd meter) after a couple days in the kegerator. Sounds like it's the only thing it could be though. Might have to wait and save up for Swissflows :(
 
Agreed, it does sound hinky, but I haven't read much about those meters here so the data is extremely thin.

Different thought: Any chance the meters are freezing up?

Cheers!
 
Agreed, it does sound hinky, but I haven't read much about those meters here so the data is extremely thin.

Different thought: Any chance the meters are freezing up?

Cheers!

Oh wow dude great thought - that never occurred to me! Easy enough to test out tonight. Thanks!
 
Sadly, they aren't frozen... well not in the ice way. I think it's that the wheel isn't spinning during flow. There must be something in my lines that is causing this. I unhooked and took off the fitting on inlet side. I could even blow into the meter and get the wheel to spin. Once I disconnected the outlet too, then it spun freely. I'm at a loss, but I'll keep at it. So close!

Also I replaced the meter with the 3rd unused one as well and it worked for 1 pour then stopped registering again. Very strange.
 
.....Also I replaced the meter with the 3rd unused one as well and it worked for 1 pour then stopped registering again. Very strange.

I'm NOT an engineer and all this stuff is WAY above my 10th grade education pay grade but could it be that the meters cannot detect the flow once all the air has moved out of the lines? From what I see in the spec table they have a minimum flow of 1L/minute?
 
A comfortable flow of one ounce per second gets close to two liters per minute.
And I would think water would convey more force than gas at the same pressure wrt spinning the wheel...

Cheers!
 
I am an engineer, but I haven't puzzled this all out yet and I was never good at Fluids anyway ;)

I appreciate the dialog, though, since it keeps me thinking about other possibilities.

I did also take apart one of the meters and it looked pretty clean inside, so it wasn't getting gunked up with debris or anything.
 
Standard drinks measurement varies from country to country (I'm from the land down under, so ours is different to the measurement used in the US). So happy to supply the code, but it may need to be tweaked for locale.

As for date/time you first need to ensure you are capturing that information, as it's not captured by default:
Cheers,
Kal

For future reference, in the U.S., one standard drink is defined as:
Beer : 12 oz at 5% ABV
Wine : 5 oz at 12% ABV
Liquor : 1 1/2 oz at 40% ABV

And for all those other questions we've had as of late - I tore my keezer apart for cleaning, the RPs installation, and my new beer gas setup install. I'm hoping to have it back up in no more than two weeks with the adafruit flow meters, motion sensor, and, most importantly, my nitro tap setup!!
 
As a follow up - I did a lot of testing with a keg filled with water over the weekend. All the meters work great with that. The higher viscosity or something with the beer causes issues.

I did get my stout to work by upping the psi to 14. Higher than I’d like, but it does register. The IPA didn’t even respond to higher pressure. It is very foamy which could be a problem too.

[QUOTE="Munchman, post: 8217917, member: 79904"

I did also take apart one of the meters and it looked pretty clean inside, so it wasn't getting gunked up with debris or anything.[/QUOTE]
 
Until someone builds a kit with the full phpmysql7 compatibility that's about it...

If someone wanted to take a whack at this, what would be the best github repo to base from?

Edited for details:
I see the last commit on the main official repo is pretty old.

I see forks from Scimmia22 and coreymbryant that both look like that have some decent fixes.

There is a fork from tssgery that forks earlier than the above two repos but specifically calls out some php7 fixes.

Is there a single repository that the collective wisdom of the thread can point out that has the generally accepted set of features and hacks that could be used as a starting point, or should I suck it up and start from the Original, fix it for PHP7 and then integrate the generally useful hacks into it?
 
Last edited:
On general principles I would use the original 2.0.1 sources. I don't think there's a full, coherent alternative at this time.
If you get that working it can be branched...

Cheers!
 
On general principles I would use the original 2.0.1 sources. I don't think there's a full, coherent alternative at this time.
If you get that working it can be branched...

Cheers!

I've forked from the official repository and have started working on replacing the SQL Database calls in the front end first. After that I'll target the admin side of things. From there I'll root out any PHP7 compatibility items and prep for a release.

If i can stand to wait that long, I'm planning on overhauling the UI to replace all of the embedded HTML in the code with Smarty templates so that everyone can build their own front end "skins" without having the break the upgradability of the code to do it.

What is the general tolerance for size of the app and is composer typically available on Raspbian builds? Composer would allow users to upgrade dependencies for security patches and such without RPints having to bring in the upstream changes and then push them down.
 
I can't imagine one could bloat RaspberryPints to the point that performance would be impacted even on the lowly SOCs most folks are using.
As for Composer, I'm pretty sure it's not bundled into any of the Raspbian releases, but it is an installable package...

Cheers!
 
Well I got pretty far in the flow meter setup with all the work arounds and etc.
I'm an amateur at this point, But im not sure on where to install the flow meters. I have 5 and I'm supposed to put them in pins 8-12. The meters have 3 female hookups 1 red 2 grey. See image below I was able to get the alamode setup and the raspberrypints.ino uploaded to it. any tips on how to connect the flow meters?
image1.jpeg
 
I can't imagine one could bloat RaspberryPints to the point that performance would be impacted even on the lowly SOCs most folks are using.
As for Composer, I'm pretty sure it's not bundled into any of the Raspbian releases, but it is an installable package...

Cheers!
That's what I was expecting to be the response. Bummer there's no composer already there. It looks like I should be able to get this setup such that somebody would only have to install composer and execute a composer command to grab and install everything with dependencies. Obviously a web-setup portion would have to happen after that to setup the db config settings, build the DB if required and set a few initial settings. that'll be pretty far down the list though.

I've gotten the main interface page working with the PHP PDO classes (rough cut, hack and replace method so there's still cleanup to be done later). I'm going to start on the Admin side next.
 
Well I got pretty far in the flow meter setup with all the work arounds and etc.
I'm an amateur at this point, But im not sure on where to install the flow meters. I have 5 and I'm supposed to put them in pins 8-12. The meters have 3 female hookups 1 red 2 grey. See image below I was able to get the alamode setup and the raspberrypints.ino uploaded to it. any tips on how to connect the flow meters?View attachment 559227

This is how I did mine. The 3 wires on each flow meter are power, ground and pulse (instructions from Adafruit label the wires). I cut off the female adapter from each flow meter and separated the wires. I purchased some bead board jumper wires and used them to create new wires by soldering the power wires together from all the flow meters (I had 3, sounds like you have 5) to a single wire with a 1-pin male connection that can plug into the Uno. I did this for the ground wires also. Then I extended the pulse wires in length and plugged them each directly into the Uno. So I ended up with a single power connection to the Uno (3-to-1 wire powering all flow meters from the 5v connection on the Uno), a single ground connection on the Uno (3-to-1 wire grounding all flow meters from the ground connection on the Uno), and 3 individual pulse connections to the Uno (each to a unique pin number on the Uno). Hope this helps you.
 
That's pretty much par for the course, I do essentially the same through a small patch board on my live system and its backup.
btw, pins 2 and 5 through 11 are solid on the Alamode and avoid digital IO that are shared with on-Alamode features like the Time Of Year chip...

Cheers!
 
I'm shocked as how quickly this is going. All of the Basic Setup pages are working and I'm moving to Personalization.

What would people consider to be the Minimum Viable Product at this point keeping in mind starting from a fresh official source 2.0.1 build?
 
This is how I did mine. The 3 wires on each flow meter are power, ground and pulse (instructions from Adafruit label the wires). I cut off the female adapter from each flow meter and separated the wires. I purchased some bead board jumper wires and used them to create new wires by soldering the power wires together from all the flow meters (I had 3, sounds like you have 5) to a single wire with a 1-pin male connection that can plug into the Uno. I did this for the ground wires also. Then I extended the pulse wires in length and plugged them each directly into the Uno. So I ended up with a single power connection to the Uno (3-to-1 wire powering all flow meters from the 5v connection on the Uno), a single ground connection on the Uno (3-to-1 wire grounding all flow meters from the ground connection on the Uno), and 3 individual pulse connections to the Uno (each to a unique pin number on the Uno). Hope this helps you.

Thanks, It might help. I'm using the Alamode board. So ill see if that coincides with my options.
 
[...]What would people consider to be the Minimum Viable Product at this point keeping in mind starting from a fresh official source 2.0.1 build?

100% preservation of existing 2.0.1 functionality and behavior would be a solid jumping-off point to go beyond.
And I'll be happy to be a guinea pig when you want one :)

btw, I wouldn't fret about requiring Composer to be installed. Folks that have come through here are generally easily guided through such efforts...

Cheers!
 
100% preservation of existing 2.0.1 functionality and behavior would be a solid jumping-off point to go beyond.
And I'll be happy to be a guinea pig when you want one :)

btw, I wouldn't fret about requiring Composer to be installed. Folks that have come through here are generally easily guided through such efforts...

Cheers!
Everything from 2.0.1 is working at this point with PDO, PHP 7.1 returns no errors or warnings with strict turned on.

Repo is at https://github.com/zaepho/RaspberryPints for anyone willing to give it a go. There isn't an installer to setup the initial config and such yet. That should probably be my next goal.
 
Thanks is advance for you answers. Maybe these images will get some results. I'm hooking up flow meters sf800 to the alamode/raspberryPI (raspberryPINTS v2). I'm very new at this and think I'm close to the last steps here. On the alamode board does this look like the correct placement for the flow sensor wires? See colors below. If NO can Please guide me the correct placement on the alamode board.
upload_2018-2-22_19-36-21.png
upload_2018-2-22_19-38-47.png
 
Thanks is advance for you answers. Maybe these images will get some results. I'm hooking up flow meters sf800 to the alamode/raspberryPI (raspberryPINTS v2). I'm very new at this and think I'm close to the last steps here. On the alamode board does this look like the correct placement for the flow sensor wires? See colors below. If NO can Please guide me the correct placement on the alamode board.
upload_2018-2-22_19-36-21-png.559312
upload_2018-2-22_19-38-47-png.559313
 
That's not going to work.
In the picture on the right, the top (Black) wire is 5V power; the middle (Red) is the signal lead; and the bottom (Green) is Ground.
In the picture on the left, the top row (Green) are Ground pins; the middle row (Red) are 5V pins; and the bottom row are collection of digital IO.

You have your Grounds assigned correctly, but your Power connections are assigned to the digital IO pins and your digital IO connections are assigned to the Power pins.
You definitely need to move the power connections to the proper row as shown.

As for the signal connections, I recommend not using the Servo header at all, but connect to the two single row headers on the other edge of the board (that you'll want to install).
The reason is some of the digital IO signals assigned to the Servo header may not work reliably with RaspberryPints because they are shared with on-board functions like the Real Time Clock chip.

eg: I would avoid digital IO 3 and 4 and instead use digital IO 2 and 5 through 11 for up to 8 meters...

Cheers!
 
That's not going to work.
In the picture on the right, the top (Black) wire is 5V power; the middle (Red) is the signal lead; and the bottom (Green) is Ground.
In the picture on the left, the top row (Green) are Ground pins; the middle row (Red) are 5V pins; and the bottom row are collection of digital IO.

You have your Grounds assigned correctly, but your Power connections are assigned to the digital IO pins and your digital IO connections are assigned to the Power pins.
You definitely need to move the power connections to the proper row as shown.

As for the signal connections, I recommend not using the Servo header at all, but connect to the two single row headers on the other edge of the board (that you'll want to install).
The reason is some of the digital IO signals assigned to the Servo header may not work reliably with RaspberryPints because they are shared with on-board functions like the Real Time Clock chip.

eg: I would avoid digital IO 3 and 4 and instead use digital IO 2 and 5 through 11 for up to 8 meters...

Cheers!

Thank you Day_tripper and by the other edge of the board do you mean the right edge on the GPIO? I assume as there are a lot of pins there for many meters. Any clues to how those are numbered if bottom left was 1 then 2 is right or up?
upload_2018-2-22_22-18-0.png
 

Attachments

  • upload_2018-2-22_22-14-28.png
    upload_2018-2-22_22-14-28.png
    234.2 KB · Views: 51
You're pointing to the two row header that interfaces to the RPi. That's not what I was referring to.

Look just below your red outline and you will see two single row header positions, a 1x8 at the bottom and a 1x10 just above that/just below the 24 pin two row header.

The 1x8 has GPIO 0 through 7 on it, the 1x10 has GPIO 8 through 13 plus a few other signals.
All of those signals, by the way, are shown in the silk screen (you can literally read them in your picture).

Those are the recommended places to hook up your flow meter signal leads.

The 8 pin and 10 pin headers came with the Alamode PCB kit, but many folks (such as myself) use stake pins instead for those two headers as slipping a female wire over a male header is much lower profile than sticking a male wire into a female header...

Cheers!
 
Back
Top