[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.
Sorry 'bout that (wife made an Italian braised beef thing that was fabulous :) )

Anyway, I think I may have this sorted.

I believe the kit that was downloaded was pulled from the Release tree - thus the zip file name RaspberryPints-2.0.0.zip.

That archive has been unofficially superseded by the branch listed as Version2 found here. If you download the zip file found on that page you'll have the latest set of files - including the updated /var/www/admin/includes/models/tap.php file.

In fact if you peruse the dates on the files shown at the above link you'll see many files that have been updated since the V2.0.0 release, including index.php in the root /var/www folder, /python/flowmon which is the new service file to run /var/www/python/flow_monitor.py, along withe aforementioned tap.php.

So you might want to expand the zip file somewhere and then copy those three files on top of their predecessor versions, and as always make sure ownership and rights are set correctly...

Cheers!

Yum! Sounds awesome.

I'm looking at the link now and I don't notice a zip file. I guess I don't know well enough the 3 files that I need to replace. Do you mind expanding a little? Also the ownership and rights, how do I make sure they are set correctly?

Edit: i just downloaded the zip, i dont see a file /var when i open the zip folder
 
Over on the right side of that screen there is a Download Zip button.

- Click it and it should be downloaded to your browser's download folder.

- Expand that zip file.

- The kit root folder will have an index.php file. Copy that to your 'Pi to /var/www/index.php.

- The kit /python folder will have a new file flowmon. Copy this file to your 'Pi to /var/www/python/flowmon

- The kit /admin/includes/models folder has the updated tap.php file. Copy this file to your 'Pi to /var/www/admin/includes/models/tap.php.

Then follow these lines from the instructions.txt that is in the kit root folder:

- on your 'Pi, copy the flowmon file from the python /var/www/python directory to /etc/init.d

$ sudo cp /var/www/python/flowmon /etc/init.d

- Then give it the proper permissions:

$ sudo chmod a+x /etc/init.d/flowmon

- You can test the program by running:

$ sudo /etc/init.d/flowmon start

to start the process, then

$ ps aux | grep flow_monitor.py

which should return:

pi 3508 0.0 0.9 8796 4112 ? S 15:35 0:00 /usr/bin/python /home/pi/raspberrypints/python/flow_monitor.py
pi 3558 0.0 0.1 3548 808 pts/0 S+ 15:43 0:00 grep --color=auto flow_monitor.py

- Then run:

$ sudo update-rc.d flowmon defaults

to ensure it runs at startup.


Let us know how you make out from there...

Cheers!
 
Over on the right side of that screen there is a Download Zip button.

- Click it and it should be downloaded to your browser's download folder.

- Expand that zip file.

- The kit root folder will have an index.php file. Copy that to your 'Pi to /var/www/index.php.

- The kit /python folder will have a new file flowmon. Copy this file to your 'Pi to /var/www/python/flowmon

- The kit /admin/includes/models folder has the updated tap.php file. Copy this file to your 'Pi to /var/www/admin/includes/models/tap.php.

Then follow these lines from the instructions.txt that is in the kit root folder:

- on your 'Pi, copy the flowmon file from the python /var/www/python directory to /etc/init.d

$ sudo cp /var/www/python/flowmon /etc/init.d

- Then give it the proper permissions:

$ sudo chmod a+x /etc/init.d/flowmon

- You can test the program by running:

$ sudo /etc/init.d/flowmon start

to start the process, then

$ ps aux | grep flow_monitor.py

which should return:

pi 3508 0.0 0.9 8796 4112 ? S 15:35 0:00 /usr/bin/python /home/pi/raspberrypints/python/flow_monitor.py
pi 3558 0.0 0.1 3548 808 pts/0 S+ 15:43 0:00 grep --color=auto flow_monitor.py

- Then run:

$ sudo update-rc.d flowmon defaults

to ensure it runs at startup.


Let us know how you make out from there...

Cheers!

Thanks for the detailed instructions, that is what I was looking for so thanks :)

I moved the 3 files but when I got to:
- on your 'Pi, copy the flowmon file from the python /var/www/python directory to /etc/init.d

$ sudo cp /var/www/python/flowmon /etc/init.d

- Then give it the proper permissions:

$ sudo chmod a+x /etc/init.d/flowmon

I received error messages. I have included a pic of the screen.

edit: im an idiot, let me try that again with out adding extra $

IMG_1397.jpg
 
Awesome! Have fun with it!

Cheers! :mug:

[edit] That break for dinner caused me to forget this was a "no meter" installation, so having you install the flowmon process wasn't actually necessary. On the up side if you ever decide to add meters you should be all set ;)
 
Awesome! Have fun with it!

Cheers! :mug:

[edit] That break for dinner caused me to forget this was a "no meter" installation, so having you install the flowmon process wasn't actually necessary. On the up side if you ever decide to add meters you should be all set ;)


Thanks again, this is really cool! I plan on getting meters so, you saved from asking more questions later :) better grab a homebrew and digest that awesome diner.

Happy trails


Sent from my iPhone using Home Brew
 
@Day_Trippr
Swiss flow got back to me over the weekend and confirmed the instructions I found on Google are correct. No resistance needed at the 5v rating. They also noted the following if it's of any interest to anyone:
"Although our sensors are know for their reliability and durability, please be careful with the use of second-hand /refurbished sensors especially when used for food and beverages. If you are interested to exchange your sensor for a brand-new SF800, just let me know. NB we would be willing to give you a discount. As our sensors are used for numerous applications (beverage dispensing, fuel measurement, chemical dispensing), the sensors can have different features. If you'd like we can check if your sensors has the appropriate features for your application (FDA-approved o-ring sealing etc). If so, please provide the 5-digit production-number which is stamped on the side of the sensor."

EDIT: I've sent him the production numbers off of mine for sh*** and giggles to check if they are, in fact, food grade as advertised. Don't see any reason why they shouldn't be but I'll post back nonetheless.
 
@Day_Trippr
Swiss flow got back to me over the weekend and confirmed the instructions I found on Google are correct. No resistance needed at the 5v rating. [...]

Excellent. Would have liked to hear when there was a component change that allowed the corresponding change in their installation instructions, but I can live with it either way. I've been running with 220 ohm 5% series resistors for a week now without issues, so I'll be leaving them in as lower activation energy = longer life.

The rest of that missive was a nice sales pitch ;)

Meanwhile I contacted our favorite Ebay SF800 seller nvdhassani to negotiate a deal that would include a replacement for my flaky meter and at the successful conclusion he informed me that he's down to 14 meters. I don't know if that's for real or just an Ebay seller trying to jazz up his market but the down-side risk is mucho dinero so y'all might want to score your meters soon.

And if you're offering more than $20 you haven't been following the thread close enough...

Cheers! ;)
 
There could be any number of reasons...

The first to check would be to kill the python script.
Rep load the sketch to the alamode and then open the serial monitor (under tools in the arduino program) and see if it's reading the pours.

Can you tell me how to do all that? I've never done any of this stuff before.

Over on the right side of that screen there is a Download Zip button.

- Click it and it should be downloaded to your browser's download folder.

- Expand that zip file.

- The kit root folder will have an index.php file. Copy that to your 'Pi to /var/www/index.php.

- The kit /python folder will have a new file flowmon. Copy this file to your 'Pi to /var/www/python/flowmon

- The kit /admin/includes/models folder has the updated tap.php file. Copy this file to your 'Pi to /var/www/admin/includes/models/tap.php.

Then follow these lines from the instructions.txt that is in the kit root folder:

- on your 'Pi, copy the flowmon file from the python /var/www/python directory to /etc/init.d

$ sudo cp /var/www/python/flowmon /etc/init.d

- Then give it the proper permissions:

$ sudo chmod a+x /etc/init.d/flowmon

- You can test the program by running:

$ sudo /etc/init.d/flowmon start

to start the process, then

$ ps aux | grep flow_monitor.py

which should return:

pi 3508 0.0 0.9 8796 4112 ? S 15:35 0:00 /usr/bin/python /home/pi/raspberrypints/python/flow_monitor.py
pi 3558 0.0 0.1 3548 808 pts/0 S+ 15:43 0:00 grep --color=auto flow_monitor.py

- Then run:

$ sudo update-rc.d flowmon defaults

to ensure it runs at startup.


Let us know how you make out from there...

Cheers!

i wasnt able to kill the python script or rep load the sketch as im not very familiar with this linux stuff and i dont know what commands to use. i did do the above listed steps and updated/added the 3 new files and this is what i got after i ran the grep flow_monitor

pi 3298 0.7 1.0 12996 4844 ? S 23:31 0:00 /usr/bin/python
/var/www/python/flow_monitor.py

pi 3319 0.0 0.1 3548 808 pts/0 S+ 23:32 0:00 grep --color=au
to flow_monitor.py
 
i wasnt able to kill the python script or rep load the sketch as im not very familiar with this linux stuff and i dont know what commands to use. i did do the above listed steps and updated/added the 3 new files and this is what i got after i ran the grep flow_monitor

pi 3298 0.7 1.0 12996 4844 ? S 23:31 0:00 /usr/bin/python
/var/www/python/flow_monitor.py

pi 3319 0.0 0.1 3548 808 pts/0 S+ 23:32 0:00 grep --color=au
to flow_monitor.py

You're good to this point, the first line shows flow_monitor.py is running.

What's next?

Cheers!
 
How do you kill the script? I cant seem to find it thru the thread.

Start the service: $ sudo /etc/init.d/flowmon start
Check the service: $ sudo /etc/init.d/flowmon status
Stop the service: $ sudo /etc/init.d/flowmon stop

This assumes you've caught up to the "almost released" V2.0.1 with the updated files and flow_monitor.py running as a system service.
If you were using the original V2 method with flow_monitor.py started via the LXDE autostart file it's probably easiest to just comment that line out and reboot the 'Pi...

Cheers!
 
You're good to this point, the first line shows flow_monitor.py is running.

What's next?

Cheers!

i was googling how to do the previous commands. i tried this to kill the python script
pkill -f /var/www/ptrhon/flow_monitor.py

then i opened the arduino program to re upload the sketch. when uploading, it kept giving an error saying it couldnt upload. i turned the pi off, unplugged it, unplugged the alamode from the pi, then reconnected everything and turned it all back on and now it is registering pours!!!
 
i was googling how to do the previous commands. i tried this to kill the python script
pkill -f /var/www/ptrhon/flow_monitor.py

then i opened the arduino program to re upload the sketch. when uploading, it kept giving an error saying it couldnt upload. i turned the pi off, unplugged it, unplugged the alamode from the pi, then reconnected everything and turned it all back on and now it is registering pours!!!

LOL! That's pretty weird, but if it's working, who cares!

Cheers! :mug:
 
with these 3 new files do we need to take out the @/usr/bin/python /var/www/python/flow_monitor.py from the /etc/xdg/lxsession/LXDE/autostart file?
 
with these 3 new files do we need to take out the @/usr/bin/python /var/www/python/flow_monitor.py from the /etc/xdg/lxsession/LXDE/autostart file?

If you followed the instructions I posted earlier that have you install the flowmon process, then you do want to remove the flow_monitor.py startup from the LXDE autostart...

Cheers!
 
i just removed that and i re uploaded the sketch and rebooted. now when i pour my PA it updates and the ounces poured is changed. when i pour the IPA it refreshes the screen when i finish pouring but the ounces poured remains at 0 ???
 
You're in unknown territory for me, never seen that one. The fact that the screen is updating says flow_monitor.py saw something and told pours.php about it.

I'd triple check the keg and tap settings in the management gui, making particularly sure you have the pin assigned to the tap matching what you set in the sketch...

Cheers!
 
When I first tapped a new keg on the gui the pin was wrong. I corrected it and then it would record any pours. I re uploaded the sketch, shut down, detached and re-attached the alamode and turned it on. At this point both beers refresh the display after a pour but only one updates ounces poured the other still says full. This is how it was when I went to bed. I woke up and re chalked the pins and they were correct. I saved the taps and went to pour and got nothing. Repeated steps above and now it is as I left it last night
 
I got everything installed finally last night. I went to check the status and kept giving me a "failed" error. But when I tried to upload the sketch to the alamode, it uploaded everything fine. This was my first issue. My second issue was doing the initial login to the database. Everything was entered correctly and the software even said so but then there was an error saying it couldnt write the config files in the install. Never have had this happen in the many times ive re-installed this software.
 
When I first tapped a new keg on the gui the pin was wrong. I corrected it and then it would record any pours. I re uploaded the sketch, shut down, detached and re-attached the alamode and turned it on. At this point both beers refresh the display after a pour but only one updates ounces poured the other still says full. This is how it was when I went to bed. I woke up and re chalked the pins and they were correct. I saved the taps and went to pour and got nothing. Repeated steps above and now it is as I left it last night

If you can open phpmyadmin and check the pours table to see if anything was recorded.

Localhost/phpmyadmin
 
First, let me say that RaspberryPints is the coolest project ever! A big thank you to all the developers, and everyone here on the boards who have helped out with questions. Now, it's my turn to try to add to the fun.

In V1, we got instructions for adding motion sensors, followed by instructions for adding sound when the motion sensors are activated. When that came out, I thought about how awesome it would be to have sound when someone pours a beer. Now that V2 and the flow meters have arrived, this dream has come true.

Here's what I did:

OPTION 1 (use an MP3):

1) Install ALSA audio drivers and MP3 player
$ sudo apt-get update
$ sudo apt-get install alsa-utils
$ sudo apt-get install mpg321
$ sudo reboot

2) Load the sound drivers:

$ sudo modprobe snd_bcm2835


3) Enable the stereo mini-plug (assumes not using HDMI sound path - if you have an hdmi monitor with speakers you probably don't need this):

$ sudo amixer cset numid=3 1


4) Copy a test mp3 file to /home/pi from...anywhere.


5) Do a sound check:

$ mpg321 your_mp3_file.mp3

or you can use aplay to play wav files instead of mp3.

OPTION 2 (use voice synthesizer):

1) Install espeak
$ sudo apt-get install espeak python-espeak

------
Now that you have the audio set up, it's time to get the taps a talkin'!

Go to /var/www/python and open up flow_monitor.py

At the top of the program are all of the imports. If you are using option 1, add "import os" after the other imports. If you are using option 2, add "from espeak import espeak". There is no problem using both methods. I have both on mine right now.

Now go down and look for the line that says:
subprocess.call(["php", path, MCP_PIN, POUR_COUNT])

Below that add the following lines, depending on which option you want to use:

playsound='mpg321 /home/pi/cheers.mp3'
if int(MPC_PIN) == 5:
_____os.system(playsound)
elif int(MPC_PIN) == 6:
_____espeak.synth('Enjoy your drink')
elif int(MPC_PIN) == 7:
_____os.system('aplay tap3.wav')

(ignore the _____. I just couldn't get the text to indent like it should have)

That's all there is to it! IMPORTANT: the numbers after the == are the pin numbers, not the tap numbers.

My plan is to use the mp3 player and make custom audio for each one. Then, instead of playsound=... I'll have tap1='mpg321 /home/pi/tap1.mp3' and so on. That way, when I change the kegs, I just need to modify the mp3, not the actual file. I'll make a new mp3, and call it tap1.mp3, tap2.mp3, etc...

Hope this helps!

Oh. And I don't know how to reset the scripts, so I just reboot after making these changes.

2Kegger
 
Is localhost/phpmyadmin typed into the browser? If so it says not found. The requested url/phpmyadmin was not found on this server
 
I installed phpmyadmin. Where do I look for it to record pours? When I got home from work today raspberry pints wasn't recording pours on either beers. It's like it just decides to quit working after a certain amount of time
 
Hi Guys,

So I set up my r pints with a cable due to my faulty wireless adaptor and the new one arrived today. It is recognizing my internet but when I click connect it only says complete. It never says Connected and I can never get a website to load. Any ideas?

Thanks and cheers
 
guys i think i accidentall changed the permissions to /etc/ folder. How do i change the permissions back because 'sudo reboot' will not work anymore.

You may not be able to. If the system can't read the files in etc it won't know who to give access to...
 
Back
Top