[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.
I have seen a few questions on the flowmeter build and thought maybe my build might help answer some questions. My build my not be elegant but it got the job done.

The attached pics are pretty much from start to finish. I decided to change out all my beer lines and to add some stainless steel ball valves that will let me turn my kegerator on and off at the same time. My kegerator is outside and I don't like the idea of neighborhood kids jumping the fence and stealing my beer so the valves allow me to 'turn off' the kegs.

I had some Cat 5 cable that I used for the wiring. I bought some male to male jumpers designed for the arduino to use as my connectors.

I cut the jumpers in half and then used each half to solder onto the cat 5 cable. This let me use the same color on each end without having to go through the white/green, green/white, etc.

I have 6 taps and this is my wiring:

Alamode Pin|Jumper color|Cat 5 Color|Jumper Color | Plug from flowmeter
D8| Blue | White/Blue | Blue | meter 1- center pin
D9| Green | Green/White | Green | meter 2 - center pin
D10| Yellow | White/Orange |Yellow | meter 3 - center pin
D11| Orange |Brown/White |Orange | meter 4 - center pin
D12| Brown |White/Brown | Brown | meter 5 - center pin
D13| White |White/Green White| meter 6 - center pin
Ground|Green | Blue |*Green |* See below
Vin| Orange |Red | **Orange |** See below

* I soldered 6 connectors to the red Cat 5 cable. That way I only need to run one Ground wire to the alamode instead of 6

** Same as above. I soldered all the power wires to the same wire so I only have to run one power wire to the alamode.

I started out using a breakout board but ended up discarding it and just plugged the male pins directly into the plugs. There are a lot of connections (18) on the flowmeter side but only 8 on the alamode side (which is great since the Cat 5 has 8 wires). I connected all the connectors and used a ty wrap for strain relief. Since there isn't going to be any movement I decided the breakout board was overkill.

The male to male jumpers use very thin wire so when you solder them to the cat 5 be sure to use some heat shrink tubing to add some strain relief to the connections. I actually double the jumper wire back onto itself in a half loop and then put the shrink tubing on. That way I get even more security and no strain on the actual connection.

Since my kegerator sits outside in the Texas heat I need a lot of air circulation to keep the foaming down. What you see it some plastic grate used in ceiling light fixtures. It is strong enough to support the beer lines and keep them out of the way and still let air circulate. I have multiple computer fans in there too.

If you are going to put all the meter cables in a nice neat bundle be sure to use a marker and label each on near the connector. I marked pieces of masking tape initially until I knew all the meters were working.

Hopefully the pics will do a better job of explaining than this text does. If there are any questions I'll try to monitor the thread and answer if I can.

flowmeters-wired.jpg


flowmeter-new-beer-line.jpg


flowmeters-in-kegerator.jpg


breakout-board.jpg


alamode-wired.jpg


flowmeter-test.jpg


flowmeters-working.jpg
 
You'd lose the automagic screen refresh, but you could locate the RPi and AlaMode at your fridge and display the web gui remotely on whatever you have available - laptop, peecee, tablet, etc - or build another RPi sans AlaMode and use that as your display engine (you could literally stick it to the back of your tap list display in that case). If you stuck a mini wireless keyboard near your taps you can hit the F5 key to refresh the gui after a pour...

Cheers!


My setup is as follows: store room behind block and stucco wall of outdoor kitchen. Has a PVC pipe forgot size either 4 or 6" going through, in which the tap lines run. The fridge is in the store room. It's a three door perlick back bar floor fridge, with a forced air duct cooling the beer lines into the wall and tower. Six tap tower sits on the corner of my outdoor kitchen counter. Drain hole goes beneath into bucket. Contractors thought plumbing the drain would create more problems than it solved.
The bundle of beer lines under the counter I really can't mess around with it unless I risk screwing it all up. Granite counter tops.

I'd have to put the RPi and flow meters near the fridge and drill a hole for wires to go into it. I have a display in that room I could use temporarily for setup.

How would I then display this on the TV wall mounted above my taps on the other side of the wall (it's a really high wall so forget about running the lines over the top)? I would need another RPi, enclosure, and power supply. What else would I need, and how would I setup the remote display RPi to run since I have zero programming skills?

Also, with the motion detector setup, I assume that would be hooked to the remote display RPi unit as well?

I am guessing the second RPi would be able to access the first simply by pulling up its webpage at the appropriate IP address of the web server app it's running? I gotta say that is really really slick. I wonder if I had a smart tv with a built in web browser if it'd pull it up without the need for an RPi. I don't think that particular tv is web enabled though.

TD



Sent from my iPad using Home Brew
 
Or add in the autorefresh command like was done in V1 so that updates to the list would show.

I know there were a few potential solutions proposed for screen updates.
Do you remember if there was one that had the server send a refresh to any connected clients? So an event-based server-side update versus a time-based client-side refresh?

Cheers!
 
I know there were a few potential solutions proposed for screen updates.
Do you remember if there was one that had the server send a refresh to any connected clients? So an event-based server-side update versus a time-based client-side refresh?

Cheers!

Yes, in V1 you could edit the index page to include one more line which would cause the browser to refresh every X seconds. Lets see if I can find the code.

Edit: Found it here https://www.homebrewtalk.com/f51/in...plist-solution-456809/index8.html#post5928696
Another option to automatically refresh the main tap list is to add a meta refresh tag to the main index.php page.

For those that are willing to edit the file, just add the following line to the <head> section. The file is located in /var/www/index.php

<meta http-equiv="refresh" content="600">

Add the above line just below the current line "<meta http-equiv="Content-Type".........

This will refresh the page every 10 min. If you want more often just change the "600" to something less. It's in seconds.

You can edit the file a couple of different ways. If you're using the Pi directly, you can just "sudo nano /var/www/index.php" and edit the file directly.


Wait, you didnt want a time based one. Maybe start with this? (too long to quote)
https://www.homebrewtalk.com/f51/in...list-solution-456809-post5927996/#post5927996
 
[...]I'd have to put the RPi and flow meters near the fridge and drill a hole for wires to go into it. I have a display in that room I could use temporarily for setup.

That much is what the rest of us are doing one way or the other.

[...]Also, with the motion detector setup, I assume that would be hooked to the remote display RPi unit as well?

Exactly.

I am guessing the second RPi would be able to access the first simply by pulling up its webpage at the appropriate IP address of the web server app it's running? I gotta say that is really really slick.

It's something I've been considering. It would let me hang my display above the keezer tower with just a power cord to hide. I'd stick the second 'Pi with a wireless nic to the back, have the motion sensor peeking out, and be ready to roll. The only down-side is the whole post-pour-screen-update thing would want to be elegantly solved.


I wonder if I had a smart tv with a built in web browser if it'd pull it up without the need for an RPi. I don't think that particular tv is web enabled though.

I have never actually laid hands on a "smart tv" so I don't know what their web capabilities are, but if yours has a web browser that can access random urls and be set to full-screen/borderless mode it may well work...

Cheers!
 
So, having recovered from Testing Overload I've been putting around the joint...

It appears the V2.0 versions of /var/www/style.css and index.php are completely unchanged from V1.0.3. That's A Nice Thing for anyone who had customized their tap list by hacking either or both of those files and is going to be upgrading. Just skip copying those from the V2 kit and you're good to go.

The apparently self-inflicted ownership issue threw me because the original 1.0.3 install had everything assigned to www-data. Cloning the 'Pints kit from the default user account resulted in the new files being owned by 'pi'. And simply opening the permissions (0777) as instructed didn't allow the python script to get to the database (which seems weird to me, but I'm no os guru)...


Cheers!
 
So, question. When I click "Tap a Keg" and select a beer and a keg, click save, then I am sent back to the taplist. Only the taplist did NOT update. The keg shows "serving" but nothing happens...

Any ideas?
 
I wonder if I had a smart tv with a built in web browser if it'd pull it up without the need for an RPi. I don't think that particular tv is web enabled though.

TD



Sent from my iPad using Home Brew

It should work just fine. Here's our plasma tv displaying my tap list.

IMG_5028_B.jpg
 
My setup is as follows: store room behind block and stucco wall of outdoor kitchen. Has a PVC pipe forgot size either 4 or 6" going through, in which the tap lines run. The fridge is in the store room. It's a three door perlick back bar floor fridge, with a forced air duct cooling the beer lines into the wall and tower. Six tap tower sits on the corner of my outdoor kitchen counter. Drain hole goes beneath into bucket. Contractors thought plumbing the drain would create more problems than it solved.
The bundle of beer lines under the counter I really can't mess around with it unless I risk screwing it all up. Granite counter tops.

I'd have to put the RPi and flow meters near the fridge and drill a hole for wires to go into it. I have a display in that room I could use temporarily for setup.

How would I then display this on the TV wall mounted above my taps on the other side of the wall (it's a really high wall so forget about running the lines over the top)? I would need another RPi, enclosure, and power supply. What else would I need, and how would I setup the remote display RPi to run since I have zero programming skills?

Also, with the motion detector setup, I assume that would be hooked to the remote display RPi unit as well?

I am guessing the second RPi would be able to access the first simply by pulling up its webpage at the appropriate IP address of the web server app it's running? I gotta say that is really really slick. I wonder if I had a smart tv with a built in web browser if it'd pull it up without the need for an RPi. I don't think that particular tv is web enabled though.

TD



Sent from my iPad using Home Brew

In theory you can have the arduino and python running on the rpi attached to your keezer and flow meters and the site and php code on the one connected to your screen.

Then edit the python script to hit the php script on the remote pi and pass the parameters.

I haven't tested it but it should work.
 
In theory you can have the arduino and python running on the rpi attached to your keezer and flow meters{,} and the site and php code on the one connected to your screen.

Then edit the python script to hit the php script on the remote pi and pass the parameters.

I haven't tested it but it should work.

One added comma makes that a lot clearly to me ;)

But what's the advantage over just serving web pages to whatever can run a browser?

Cheers!
 
One added comma makes that a lot clearly to me ;)

But what's the advantage over just serving web pages to whatever can run a browser?

Cheers!

Rpi/alamode/flow meter/python script -> rpi/rpints/monitor

You could have the alamode/arduino set up on your keezer. The python script should be able to hit the rpints install on a remote pi or web server with the database on it.

In *theory* you could then have your main pi with rpints and a monitor somewhere else.
 
Is it possible to hook the power lines for the meters up to any 5v pin, or do they have to go to the VIN? I added extra pins in the servo spots so I have a ton of 5v and ground pins now. Just wondering if I can use them or if I need to run all the power through VIN. Thanks!
 
Is it possible to hook the power lines for the meters up to any 5v pin, or do they have to go to the VIN? I added extra pins in the servo spots so I have a ton of 5v and ground pins now. Just wondering if I can use them or if I need to run all the power through VIN. Thanks!

I'm using the 5V0 supply on the alamode to power mine with no issues. You should be fine.
 
So, question. When I click "Tap a Keg" and select a beer and a keg, click save, then I am sent back to the taplist. Only the taplist did NOT update. The keg shows "serving" but nothing happens...

Any ideas?

I saw this happen when I was first setting up v2. I had turned flow meters on but didn't enter a "pin" number when tapping the keg. I think that was the scenario that caused what you're describing.
 
So it ain't over yet.

Last night/this AM I finally solved my huge roadblock and was able to register pours. But that was with flow_monitor.py running in a terminal window.

Today I edited /etc/xdg/lxsession/LXDE/autostart to add the famous

@/usr/bin/python /var/www/python/flow_monitor.py

rebooted....and nothing happening.

With a $ ps aux | grep flow I see two processes that are running /var/www/python/flow_monitor.py.

pi@rpints ~ $ ps aux | grep flow
pi 2711 0.1 1.0 13484 4848 ? S 16:06 0:00 /usr/bin/python /var/www/python/flow_monitor.py
pi 3130 0.1 1.0 13416 4852 ? S 16:06 0:00 /usr/bin/python /var/www/python/flow_monitor.py
pi 3233 0.0 0.1 4036 860 pts/0 S+ 16:12 0:00 grep --color=auto flow

I tried killing one or the other but neither survivor was up to the task of listening to the AlaMode.

So I tried a different line in the autostart file:

sudo python /var/www/python/flow_monitor.py

and that inspired four flow_monitor.py processes to appear. Holy crap!

Now I'm wondering, does vncserver run the LXDE autostart script?
Well, yes, it does. And I had vncserver set for autostarting.

This going to be a problem for some people - even if you don't autostart the vncserver, if you manually start it it's going to run the LXDE autostart anyway, and create a second instance of flow_monitor.py. Of course, I don't know if that's a problem or not, being as I can't get automagic start of a single instance to do anything useful, but I presume it would not be a good thing to have going on.

I think we need to find a way to run this as a service that only gets invoked once per boot regardless of how a user configures his RPi.


Anyway...I removed the autostart for vncserver from init.rc, put the famous startup for flow_monitor.py back in the LXDE autostart file, rebooted, and now only have a single instance of monitor_flow.py running - as user 'pi'.

But the tap list still won't register pours.

Jeeze, this thing is one ornery beast!

More if I find something that works...

Cheers!
 
Rpi/alamode/flow meter/python script -> rpi/rpints/monitor

You could have the alamode/arduino set up on your keezer. The python script should be able to hit the rpints install on a remote pi or web server with the database on it.

In *theory* you could then have your main pi with rpints and a monitor somewhere else.

I got the topology, but still not getting what the advantage is. As long as server-side induced client-side gui refresh works in response to a pour update, I'd think having all of the "smarts" in one place opens up a wider range of client display devices - some of which (eg: the "smart tv") aren't smart enough to run anything other than their canned code...

Cheers!
 
Is it possible to hook the power lines for the meters up to any 5v pin, or do they have to go to the VIN? I added extra pins in the servo spots so I have a ton of 5v and ground pins now. Just wondering if I can use them or if I need to run all the power through VIN. Thanks!

You can hook up to any 5v pin
 
I have seen a few questions on the flowmeter build and thought maybe my build might help answer some questions. My build my not be elegant but it got the job done.

Hopefully the pics will do a better job of explaining than this text does. If there are any questions I'll try to monitor the thread and answer if I can.

This is an extremely helpful post for someone like me who doesn't have experience in arduino or other project boards. Can you snap some close ups of the breadboard that you attached the flow meters to? Specifically, I'm looking at how you jumped each of the + and grnd wires from the flow meters into one wire for the cat5 cable. Thanks for your help.
 
So it ain't over yet.

Last night/this AM I finally solved my huge roadblock and was able to register pours. But that was with flow_monitor.py running in a terminal window.

Today I edited /etc/xdg/lxsession/LXDE/autostart to add the famous

@/usr/bin/python /var/www/python/flow_monitor.py

rebooted....and nothing happening.

With a $ ps aux | grep flow I see two processes that are running /var/www/python/flow_monitor.py.

pi@rpints ~ $ ps aux | grep flow
pi 2711 0.1 1.0 13484 4848 ? S 16:06 0:00 /usr/bin/python /var/www/python/flow_monitor.py
pi 3130 0.1 1.0 13416 4852 ? S 16:06 0:00 /usr/bin/python /var/www/python/flow_monitor.py
pi 3233 0.0 0.1 4036 860 pts/0 S+ 16:12 0:00 grep --color=auto flow

I tried killing one or the other but neither survivor was up to the task of listening to the AlaMode.

So I tried a different line in the autostart file:

sudo python /var/www/python/flow_monitor.py

and that inspired four flow_monitor.py processes to appear. Holy crap!

Now I'm wondering, does vncserver run the LXDE autostart script?
Well, yes, it does. And I had vncserver set for autostarting.

This going to be a problem for some people - even if you don't autostart the vncserver, if you manually start it it's going to run the LXDE autostart anyway, and create a second instance of flow_monitor.py. Of course, I don't know if that's a problem or not, being as I can't get automagic start of a single instance to do anything useful, but I presume it would not be a good thing to have going on.

I think we need to find a way to run this as a service that only gets invoked once per boot regardless of how a user configures his RPi.


Anyway...I removed the autostart for vncserver from init.rc, put the famous startup for flow_monitor.py back in the LXDE autostart file, rebooted, and now only have a single instance of monitor_flow.py running - as user 'pi'.

But the tap list still won't register pours.

Jeeze, this thing is one ornery beast!

More if I find something that works...

Cheers!

Yes. Every time you log in via vnc it runt auto start.

I have an init.d script that I'm trying to make work correctly however we haven't had much luck. We agree that that would be the desired method (starting it as a service)
 
Yes. Every time you log in via vnc it runt auto start.

I have an init.d script that I'm trying to make work correctly however we haven't had much luck. We agree that that would be the desired method (starting it as a service)

Yup. I was getting into this for the last hour or so but got distracted.

So, I found a definite bug in flow_monitor.py.

Line 45 has a relative link to pours.php.

path = '../includes/pours.php'

Bad coder! Bad BAD coder! ;)

That has caused me no end of grief over the last few days.

Change that line to a rock-solid link (it's not like folks are going to relocate the 'Pints root to some random location - and if they do, they're on an island ;))

path = '/var/www/includes/pours.php'

NOW you can run the script from anywhere - and it'll still find the darned table!

With that, I now have the startup in the LXDE autostart file working properly.
First time!

Weirdly, as we agree when vnc starts up (and probably rdp if you're into Remote Desktop instead) it's going to create a second instance of flow_monitor.py -
and in fact it does - it doesn't seem to bother 'Pints?

Anyway, I would urge a quickie revision to flow_monitor.py...

Cheers!
 
CadiBrewer
Can you snap some close ups of the breadboard that you attached the flow meters to? Specifically, I'm looking at how you jumped each of the + and grnd wires from the flow meters into one wire for the cat5 cable.

I started out using a breakout board and then decided that it was not necessary. I just connected the wires directly to the flowmeter pins.

The first pic shows how I connected (soldered) six wires, one for each meter) to both the Vin wire and the Ground wire. If you look close you can see they are all connected to the various meter plugs. Ground to the end with the red stripped wire and Voltage in to the other end of the plug.

The second pic shows the same thing but I have used a ty wrap as a strain relief. The entire bundle will go inside a plastic double duplex receptacle box from Lowes (with a plastic lid). That way it will look nice and clean and the wires cannot be bumped and disconnected.

Let me know if you have any other questions. Hope this helps.

ground-wires.jpg


1-wire-to-many.jpg
 
Yup. I was getting into this for the last hour or so but got distracted.

So, I found a definite bug in flow_monitor.py.

Line 45 has a relative link to pours.php.

path = '../includes/pours.php'

Bad coder! Bad BAD coder! ;)

That has caused me no end of grief over the last few days.

Change that line to a rock-solid link (it's not like folks are going to relocate the 'Pints root to some random location - and if they do, they're on an island ;))

path = '/var/www/includes/pours.php'

NOW you can run the script from anywhere - and it'll still find the darned table!

With that, I now have the startup in the LXDE autostart file working properly.
First time!

Weirdly, as we agree when vnc starts up (and probably rdp if you're into Remote Desktop instead) it's going to create a second instance of flow_monitor.py -
and in fact it does - it doesn't seem to bother 'Pints?

Anyway, I would urge a quickie revision to flow_monitor.py...

Cheers!

Mine lives in /home/pi/raspberrypints

:p

Also... it looks like you have an older version. The last version of flow_monitor.py that I pushed (14 days ago...) has the path set to:
Code:
#The following 2 lines passes the PIN and PULSE COUNT to the php script
			path = '/var/www/includes/pours.php'
			subprocess.call(["php", path, MCP_PIN, POUR_COUNT])
 
Mine lives in /home/pi/raspberrypints

:p

Non-standard! Will not be supported! ;)

Also... it looks like you have an older version. The last version of flow_monitor.py that I pushed (14 days ago...) has the path set to:
Code:
#The following 2 lines passes the PIN and PULSE COUNT to the php script
			path = '/var/www/includes/pours.php'
			subprocess.call(["php", path, MCP_PIN, POUR_COUNT])

Aw, sonovab*&#%@^!!

I asked on Github if the kit had been updated since I pulled it and was told "No". I screwed up - I trusted 'em ;)

Anyway, good that it got caught already, it definitely was a pita.

Next time someone happens to be twiddling that file, have them take a look at an orphan reference:

# Edit this line to point to where your rpints install is
poursdir = '/var/www'

Pretty sure that never gets used...

Cheers!
 
Non-standard! Will not be supported! ;)



Aw, sonovab*&#%@^!!

I asked on Github if the kit had been updated since I pulled it and was told "No". I screwed up - I trusted 'em ;)

Anyway, good that it got caught already, it definitely was a pita.

Next time someone happens to be twiddling that file, have them take a look at an orphan reference:

# Edit this line to point to where your rpints install is
poursdir = '/var/www'

Pretty sure that never gets used...

Cheers!

Correct. That's there as a reminder that I'm supposed to make that a variable at some point so you can set the directory there and not have to worry about it.
 
CadiBrewer


I started out using a breakout board and then decided that it was not necessary. I just connected the wires directly to the flowmeter pins.

The first pic shows how I connected (soldered) six wires, one for each meter) to both the Vin wire and the Ground wire. If you look close you can see they are all connected to the various meter plugs. Ground to the end with the red stripped wire and Voltage in to the other end of the plug.

The second pic shows the same thing but I have used a ty wrap as a strain relief. The entire bundle will go inside a plastic double duplex receptacle box from Lowes (with a plastic lid). That way it will look nice and clean and the wires cannot be bumped and disconnected.

Let me know if you have any other questions. Hope this helps.

Perfect! I saw the breakout board in the pics, but I did notice on your write-up that you said you didn't use it. I'm such a newb that I figured I didn't understand and that you didn't use a board elsewhere. I got it now.

Did you pick up the jumpers online or at a Radio Shack or similar store? Sweet way to go.

Thanks for your help.
 
If anyone happens to get a flow meter working on digital IO 4, let me know please. I'm seeing non-compliant behavior on that pin on two different AlaMode boards. I had planned on using pins 4->9 for my six taps but had to avoid pin 4 to get all six to work. When I stick a DVM on that pin I'm not seeing a 5V pull-up in effect on either board...

Cheers!
 
So, 3 of my four taps read correctly, however the fourth seems to be psycho....

I pulled two pints off a "full" keg and left the room. when i returned it had registered 342fl oz poured. (thats some big damned glasses), i disconnected the quick connect on the keg for ****s and giggles and left the room again.
when i returned to +1 my beer, it showed 1042fl oz poured on the disconnected line.....

all other taps seem to read pretty spot on with the pours. is there any chance this could be software related before i assume hardware?
I'm not sure how this ebayer deals with defective product that has been 2 weeks since sale.
 
CadiBrewer
Did you pick up the jumpers online or at a Radio Shack or similar store? Sweet way to go.

I bought a variety pack on Amazon. Male to male, female to female and male to female. I did not have any Arduino experience and didn't really know what I was going to need.

As it turned out I only needed the male to male jumpers.
Here's the Amazon link. I don't know if Radio Shack sells them or not.

Probably not as elegant a solution as some will build but effective, none the less.
 
Last edited by a moderator:
So, 3 of my four taps read correctly, however the fourth seems to be psycho....

I didn't have that exact problem but after all my testing I kicked all the kegs and then tapped full kegs. After a reboot all the kegs showed some pours. I'm guessing that the database had not updated when I added the new kegs, then after the reboot the screen 'caught up' with the database.

I kicked all the kegs again and tapped all new ones. Rebooted and no problems. So this is my long way of saying that maybe you should try a reboot and be sure the screen data you are seeing is really the up to date info from the DB.
 
CadiBrewer

I bought a variety pack on Amazon. Male to male, female to female and male to female. I did not have any Arduino experience and didn't really know what I was going to need.

As it turned out I only needed the male to male jumpers.
Here's the Amazon link. I don't know if Radio Shack sells them or not.

Probably not as elegant a solution as some will build but effective, none the less.

im just using jumpers on a protoboard but i'd like to find the male plugs these meters use and make a permanent board for the leads to plug into that lock in place. if anyone has any idea the part to search for i'd appreciate it
 
Last edited by a moderator:
I didn't have that exact problem but after all my testing I kicked all the kegs and then tapped full kegs. After a reboot all the kegs showed some pours. I'm guessing that the database had not updated when I added the new kegs, then after the reboot the screen 'caught up' with the database.

I kicked all the kegs again and tapped all new ones. Rebooted and no problems. So this is my long way of saying that maybe you should try a reboot and be sure the screen data you are seeing is really the up to date info from the DB.


rebooting produced no changes. i'm 90% sure this is a bad piece of hardware. I've contacted the seller, now i just wait on a response for his return/exchange policy...
 
Back
Top