[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'm halfway through rereading this mega post, but don't remember this issue. I'm stuck on where to put RPints folder. The instructions say to put it in /var/www but there isn't a www folder in my var folder. I'd like to use the default to keep it a standard install. Why wouldn't there be a www folder, did I miss some installation nuance? I'm having ownership/permission problems. I need to hit the books on Linux to know how to change the permissions to allow me to add www.



What are you doing to create backup images of the SD card. Are you just attaching it to another Linux machine and dd'ing it to a file?
Here is a link from an earlier post in this thread on how to do it from the RPi itself. Somebody wrote a script for it.
 
I've had some good progress today. My second attempt to fix my broken flow sensor was a total success. Not only is it holding pressure with no leaks, but...

it's actually functional again!

It gets better(for me) not only was I able to fix the sensor but I was actually able to bring my broken 'Pi back from the dead. Turned out the RG2 voltage regulator had taken a crap on me. I suspect from a bad power supply but I can't confirm that. I purchased a switching regulator that I found on eBay for about 3 bucks, soldered it in place, and put everything back together(with a new power supply just for good measure). From what I have read, this regulator swap is becoming more and more common and it seems to be used when the user wants to battery-power their 'pi. Obviously we aren't concerned with that..

Regardless, it did the trick. Now everything is operating exactly as it should once again. All for about 6 dollars in parts and a little bit of labor. Still lusting over the RPI 2, but that will have to come at another time.

View attachment ImageUploadedByHome Brew1426664792.553341.jpgView attachment ImageUploadedByHome Brew1426664811.999002.jpgView attachment ImageUploadedByHome Brew1426664843.339649.jpg
 
I recently upgraded my rpints software to V2.0.1 from V1 and it all seems to be running fine. I opted to install the flow meters option, however, and have a few questions while I begin to assemble all of the hardware.

First of all, I ordered the wrong size cable for my single flow meter (SF800) and was wondering what my best option might be for an easy extension. I found one option in the tread so far but figured I'd check to see if anybody had any other simple solutions: (http://www.digikey.com/product-deta...t.srch=1&wt.medium=c&WT.srch=1&WT.medium=cpc:)

I'm also having quite a bit of trouble trying to figure out all of the wiring/soldering to the alamode (Basically all of step 9 - I have minimal experience with electronics in general). Is it just the gpio header that needs to be soldered? That's all that is shown for the first rpints-supplied photo for that step. Or is it necessary to solder all of the supplied headers onto the alamode?

Also, any more help on where exactly the correct ground, digital pins, and vin are located would be appreciated as well. I'm trying to learn this as I go, but I'm a bit in over my head I think at this point...

Thanks to everyone who contributed to this; it's a great project!
 
At the minimum, you should mount the connectors and headers as shown in the AlaMode home page. It'll look like this.

raspberry_sandwich5.jpg


That said, I usually populate all of the header positions just in case. It's amazing how often you need one more ground connection or something. In any case, the WyoLum page has pictures and a user guide on how to assemble the board.

As for the meter lead, any stranded/insulated wire from 22 gauge up will work, there's very little current involved. You could twist up your own tri-lead cable from three color 18 gauge wires and be good to go.

Cheers!
 
[...]it's actually functional again![...]

That's a great save right there! Kudos for sticking with it! :mug:

And a word of warning out there to those who got in on the used meter deal: close examination of my spare meters revealed one with cracked insulation right where the cable disappears inside the meter body, and you can bet that's a prelude to wire failure due to fatigue.

I've gone ahead and tie-wrapped the leads on all my meters to the JG fitting on the input side with a small service loop. Low cost insurance...

Cheers!
 
That's a great save right there! Kudos for sticking with it! :mug:

And a word of warning out there to those who got in on the used meter deal: close examination of my spare meters revealed one with cracked insulation right where the cable disappears inside the meter body, and you can bet that's a prelude to wire failure due to fatigue.

I've gone ahead and tie-wrapped the leads on all my meters to the JG fitting on the input side with a small service loop. Low cost insurance...

Cheers!

I had an issue as well with one of mine. Since I was out of gas I decided to do a thorough scrubbing of my keezer. I pulled off the collar, and got everything out of the keezer and scrubbed with some of that clorox cleaning spray stuff. When reassembling I put the collar back on top of the keezer and then while putting the kegs back in disconnected the John Guest connector, recoiled my lines (they like to get tangled and go everywhwere), and plugged them back together.
Here is where my probem happened. Since I had one of my meters leak from the threads between the meter and the JG connector, I decided to make sure they were snug. Instead of staying hand tight, I grabbed two adjustable crescent wrenches and tightened the connectors on one of my lines. With not much pressure I managed to break the connector. Luckily I got a couple spare meters since I got them when they were cheap and stole the connector off of that one. Unfortunately when reassembling, the other sides connector broke at the same place.
Essentially the connector split at the end of the threads. I am sure the connectors have been exposed to cleaning chemicals enough times that they may be a bit brittle on the used ones.

My tldr advice - Go for hand tight. Don't use tools on them.
 
I have yet another stupid question, something I was totally oblivious about until reading through some of the previous posts. Does RaspberryPints send a message to your display when a keg has kicked? I'm getting the impression it's supposed to, even seen something written about it in the Arduino sketch. However, I'm not getting anything fancy when a keg kicks. Let's say for instance that a keg says 30 ounces remaining. 25 is poured then the keg kicks. All I see is "5 oz remaining" and that screen never changes, even if straight co2 is running through the line. Is there something that's supposed to be shown on screen when one kicks?
 
I have indeed seen the

empty.png

empty keg - on some kicks. The ones where I under-filled the keg by a couple of pints versus what I set for the initial volume, so the remaining volume was below zero for at least one pour.

Code:
if( $beer['remainAmount'] <= 0 ) { 
	$kegImgClass = "keg-empty";      
	$percentRemaining = 100; }       
else if( $percentRemaining < 15 )  
	$kegImgClass = "keg-red";        
else if( $percentRemaining < 25 )  
	$kegImgClass = "keg-orange";     
else if( $percentRemaining < 45 )  
	$kegImgClass = "keg-yellow";     
else if ( $percentRemaining < 100 )
	$kegImgClass = "keg-green";      
else if( $percentRemaining >= 100 )
	$kegImgClass = "keg-full";

Cheers!
 
I have yet another stupid question, something I was totally oblivious about until reading through some of the previous posts. Does RaspberryPints send a message to your display when a keg has kicked? I'm getting the impression it's supposed to, even seen something written about it in the Arduino sketch. However, I'm not getting anything fancy when a keg kicks. Let's say for instance that a keg says 30 ounces remaining. 25 is poured then the keg kicks. All I see is "5 oz remaining" and that screen never changes, even if straight co2 is running through the line. Is there something that's supposed to be shown on screen when one kicks?

It does not currently send a "Kicked Keg" message. It will however, keep pouring if you have more than 5gal in the keg.

The reason was that there wasn't a reliable way to determine if a keg actually kicked using the flowmeter. (I was getting faster readings from the meters depending on the "liquid" that was passing through them).

I thought better to just show an empty or below empty keg instead of kicking the kegs automatically (what happens if its a phantom kick? then the keg is kicked and you have to go in and reset the whole process)

That being said, there's a bunch of work that I need to go in and do (as well as write up the whole RFID process) to fix some of the issues... when I have time.
 
I bought these flow meters at $9.50 each and they are supposed to be 3% accurate. I have two of those high dollar SwissFlo meters coming in to compare them against.

I could solder, but that's my entire skill set when I started. I want to thank everyone and mcangeli in particular for this fun I'm having. I didn't know linux at all, look at my earlier stupid question no one answered. Yet I got it all working great. I can blow through these cheap meters and it updates with ounces served. My advice to others coming in late to this party is to READ both threads through multiple times. When you think you have found a post of something pertinent, copy it to a text file. If you truly don't have an answer and it's not a general linux question you can easily answer with a google search, I'm sure someone will be happy to help you. I stupidly didn't copy the pulse adjustment post to my text file. I guess it's time to read through again :cross:. When I get everything up and running with these cheaper flow meters, my contribution will be to give you the good the bad and the ugly on them. If someone like me needs to spend ~$500 for flow meters since we missed the Ebay buy, it probably isn't going to be approved by the SWMBO. I can budget $76 for the cheaper meters if they do what I want them to do. I will let you know when I've tested them.
 
I got mine in and have been tested them. They are quite good and better than the 3% tolerance they quote. I poured 6 individual gallons and checked the pulse counts, looks like for this model an average of 14,281/gallon is what works. I've poured interrupted flow, long pours, slow pours and did a total of 5 gallons. It was off by 5 oz at the end. I wanted plus or minus a pint, and this is definitely in my margin of error. For 8 taps I save $406.40 by using these less accurate +- a pint flow meters :mug: I'm happy. They also shipped and arrived much faster. I have 3 of the SwissFlos available for purchase if anyone feels they need the accuracy or don't want to modify the software. I'm not even going to open up the packaging on them.

EDIT: These flow meters produce nothing but foam when used with beer. It might be the way I connected them to the lines, but for now they only work on water. I'm testing another inexpensive one that doesn't produce foam, but I haven't looked at accuracy or pulse counts on them. I'll update as I know.
 
First off, thanks to everyone involved in creating, updating, and discussing RaspberryPints. I spent a bit of time yesterday getting it up and running on my laptop with the help of the http://bernerbits.github.io/ras-pints-without-pi/ thread.

Being that I have no coding experience whatsoever, and for the most part had no idea what I was doing, major win! Awesome to have the taplist on the tv above the kitchen taps!!

Quick question that I haven't been able to find an answer to: I'm not planning on adding flowmeters. Is there a way to manually update what's left in a keg?

Thanks

Andy
 
It would take some tweaking but I am sure you could code in something like a process that subtracts x oz when you click on the keg. Or pop up a box to inquire how much you think you poured.
 
Help

I'm getting the following error when trying to update my beer, keg or tap list:

Fatal error: Cannot redeclare redirect() (previously declared in /Applications/XAMPP/xamppfiles/htdocs/RaspberryPints/admin/includes/functions.php:2) in /Applications/XAMPP/xamppfiles/htdocs/raspberrypints/admin/includes/functions.php on line 5

FYI - I'm running raspberrypints on my mac via xampp.
 
Help

I'm getting the following error when trying to update my beer, keg or tap list:

Fatal error: Cannot redeclare redirect() (previously declared in /Applications/XAMPP/xamppfiles/htdocs/RaspberryPints/admin/includes/functions.php:2) in /Applications/XAMPP/xamppfiles/htdocs/raspberrypints/admin/includes/functions.php on line 5

FYI - I'm running raspberrypints on my mac via xampp.

Fixed it - apparently some things are case sensitive. Needed to use RaspberryPints and not raspberrypints.
 
I'm not planning on adding flowmeters. Is there a way to manually update what's left in a keg?

Did you figure this out?

I hacked up a way to do it on mine, though I plan on adding meters later. It's not elegant, but it works. Not sure how to post it here, though.
 
Just got my cheap flow meters in and got some sample code to read the flow. Tomorrow I test to see if they all read the same. Then on to figuring out the rpints part. Like getting it all working with an arduino uno.

View attachment 272562

Have you put those meters on beer yet? They worked fine with water, but when I put them inline with beer last night, nothing but foam. I'll check it again tonight, I bumped the keg around a bit and I hope it's just needs settling down.
 
PM answered and emails sent.

If anyone else is interested, I've got a really hack-y solution for manually updating kegs. I've got a zip file (http://kichta.com/files/RaspberryPintsManualPourupdate.zip) that contains the two files needed: index.php, and a file I created called KegPull.php.

Backup your main RPints index.php, and replace it with the one in the zip file, and then drop the KegPull.php file in the main directory with it. Clicking on the beer name will take you to a beer log page with selections for beer number and beer size. On submit it updates the pours and returns you to the main index.
 
Have you put those meters on beer yet? They worked fine with water, but when I put them inline with beer last night, nothing but foam. I'll check it again tonight, I bumped the keg around a bit and I hope it's just needs settling down.


Not yet. I still have to find the right fittings for them. I imagine you probably either put them too close to the keg or too close to the taps how much hose are you using.

If I see issues with foaming I assume they will be tied to the teeny tiny inlet hole. I'm pulling one apart right now to see if there are any implications from drilling that hole out.
 
On looking at the inside of the seedstudio flow meter, it appears that it should be okay to go ahead an drill out the input hole to match the output hole. Not really sure if the intended design is to pressurize the flow coming in to create a negative zone in the chamber. Or if it's to control the flow down to the specified "safe" rage of the meter. View attachment ImageUploadedByHome Brew1429652333.413864.jpg
View attachment ImageUploadedByHome Brew1429652406.932837.jpg
View attachment ImageUploadedByHome Brew1429652434.901094.jpg
 
I think that's an excellent diagnosis, Doctor Barber.

When you drill out the barbs, you might consider chamfering the upstream side of the outlet hole a little bit...

Cheers!
 
Working with ahariton, I realized that I also altered the stylesheet but forgot to add it, and on his system KegPull was throwing an error; still worked, just showed errors. Doesn't do it on mine.

so...

Updated the zip file to include the stylesheet and a hopefully error free KegPull: http://kichta.com/files/RaspberryPintsManualPourupdate.zip

  1. backup your index.php and style.css
  2. drop the index.php, style.css and KegPull.php from the zip file into the main RPints directory
 
Working with ahariton, I realized that I also altered the stylesheet but forgot to add it, and on his system KegPull was throwing an error; still worked, just showed errors. Doesn't do it on mine.

so...

Updated the zip file to include the stylesheet and a hopefully error free KegPull: http://kichta.com/files/RaspberryPintsManualPourupdate.zip

  1. backup your index.php and style.css
  2. drop the index.php, style.css and KegPull.php from the zip file into the main RPints directory

This is an AWESOME solution. Thanks so much for sharing!
 
I got mine in and have been tested them. They are quite good and better than the 3% tolerance they quote. I poured 6 individual gallons and checked the pulse counts, looks like for this model an average of 14,281/gallon is what works. I've poured interrupted flow, long pours, slow pours and did a total of 5 gallons. It was off by 5 oz at the end. I wanted plus or minus a pint, and this is definitely in my margin of error. For 8 taps I save $406.40 by using these less accurate +- a pint flow meters :mug: I'm happy. They also shipped and arrived much faster. I have 3 of the SwissFlos available for purchase if anyone feels they need the accuracy or don't want to modify the software. I'm not even going to open up the packaging on them.

EDIT: These flow meters produce nothing but foam when used with beer. It might be the way I connected them to the lines, but for now they only work on water. I'm testing another inexpensive one that doesn't produce foam, but I haven't looked at accuracy or pulse counts on them. I'll update as I know.

where do i change the pulse count settings
 
Look in /var/www/includes/pours.php

Around line 41 find this:

$amount = $PULSE_COUNT / 21120;

See the note a couple lines above...

Cheers!
 
Cool thanks now I just have to get my pi to be able to open up a serial port to the arduino.... I don't know what's going on but for some reason I cannot communicate with any arduino over usb anymore. Only bt seems to work......
 
On looking at the inside of the seedstudio flow meter, it appears that it should be okay to go ahead an drill out the input hole to match the output hole. Not really sure if the intended design is to pressurize the flow coming in to create a negative zone in the chamber. Or if it's to control the flow down to the specified "safe" rage of the meter. View attachment 272658
View attachment 272659
View attachment 272660
Mine were more because of the way I hooked up the tubing. I used some polyethylene tubing that matches the inlets and put a brass insert into the end and finally clamped my beer line onto it. I got another cheap flow meter of the same type that has a barbed fitting and it seems to be working OK now. Pours decent beer and seems to be registering properly.
 
Although I think I'm close to getting my setup running, my flow monitor doesn't update on the rpints page. My suspicion is that I didn't set up the software correctly. Any clues as to why it might not work based on the following commands?:

pi@raspberrypi ~ $ sudo /etc/init.d/flowmon start
[ ok ] Starting system RPFlowMon daemon:.
pi@raspberrypi ~ $ ps aux | grep flow_monitor.py
pi 5215 0.0 0.4 3552 1800 pts/1 S+ 12:52 0:00 grep --color=auto flow_monitor.py
pi@raspberrypi ~ $ sudo update-rc.d flowmon defaults
update-rc.d: using dependency based boot sequencing
insserv: warning: script 'flow_monitor.py' missing LSB tags and overrides
insserv: warning: script 'mathkernel' missing LSB tags and overrides
pi@raspberrypi ~ $ sudo reboot


Thanks.
 
Yep, I followed the steps to upgrade the 1.0.3 version to version 2.0.1. I'm able to use rpints normally otherwise and have checked that the alamode works in conjunction with the pi by using the blink test feature. I also made sure to keep track of which pin was used in the code and updated rpints accordingly.

Do you have any more troubleshooting tips that might help? Thanks again.
 
One thing to try is to stop the flow monitor service

Code:
$sudo /etc/init.d/flowmon stop

then fire up a terminal session on the local console and run the flow monitor script

Code:
$ sudo python /var/www/python/flow_monitor.py

When you pour a beer, shortly after the tap is closed you should see a "pour message" from the AlaMode that includes a tick count and a pin number. The python script is essentially a "listener service" that will then poke the pours.php table manager with this pour data.

If you never see a pour message, the rest is moot, of course. So start there.

Note once you stop running the python script in the terminal session you can restart the service with

Code:
$sudo /etc/init.d/flowmon start

Cheers!
 
When I check the flowmon status after reboot, I get this:

Code:
pi@raspberrypi ~ $ sudo /etc/init.d/flowmon status
[FAIL] /var/www/python/flow_monitor.py is not running ... failed!

So I tried starting it:

Code:
pi@raspberrypi ~ $ sudo /etc/init.d/flowmon start
[ ok ] Starting system RPFlowMon daemon:.

But I get the same failure message as before when I go to check the status.

When I try to stop the process, I get the following:

Code:
pi@raspberrypi ~ $ sudo /etc/init.d/flowmon stop
[....] Stopping system RPFlowMon daemon:start-stop-daemon: warning: failed to kill 3642: No such process
No process in pidfile '/var/run/RPFlowMon.pid' found running; none killed.
 failed!

I tried running the flow_monitor.py script and received the following:

Code:
pi@raspberrypi ~ $ sudo python /var/www/python/flow_monitor.py
Traceback (most recent call last):
  File "/var/www/python/flow_monitor.py", line 2, in <module>
    import serial
ImportError: No module named serial

I do believe that my flowmeter works, though, because I see output when I open the Arduino "serial monitor" gui and blow into the meter. I get output like "P;0;8;3078" or "K;0;8". I'm using PIN 8 on the alamode.
 
Code:
$ sudo /etc/init.d/flowmon status

will provide the status of the flow monitor service.

But from what you're showing it's pretty clear the python script is not executing properly. I'm going to guess the python-serial package was not installed.

This was supposed to be executed during the installation. It won't hurt to run it again and see if all packages either are already installed or install now...

Code:
$ sudo apt-get update
$ sudo apt-get install arduino python-serial python-mysqldb php5-cli xdotool

Cheers!
 
Has anyone had issues with flow_monitor.py stopping on its own when your setup is left running?

If I reboot the Pi, everything works. The next day, it records no pours.

Checked the arduino - it is seeing the pours and attempting to transmit (Tx led flash). When I enter the following command it seems the flow monitor has decided it doesn't want to play today.

Code:
sudo /etc/init.d/flowmon status

[....] /var/www/python/flow_monitor.py is not running[FAI failed!

If I restart the flow monitor it works again

Code:
1
pi@raspberrypi ~ $ sudo /etc/init.d/flowmon start
[ ok ] Starting system RPFlowMon daemon:.
pi@raspberrypi ~ $ sudo /etc/init.d/flowmon status
[ ok ] /var/www/python/flow_monitor.py is running.

Any thoughts on why the flow monitor daemon might stop like this?

As a bodge, I might add a cronjob to restart it every hour, but that's not the right way to fix this.

Code:
* */1 * * * sudo /etc/init.d/flowmon start
 
That's a new one. I think I'd dump the system log (look in /var/log) into a text file and search it to see if there's a clue associated with that service being stopped...

Cheers!
 
Back
Top