[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 laughing here because I did the exact same thing and was calling my version "Lite Beer Menu". I didn't care for all the mysql overhead and such, so I redid it completely in html and javascript. A single JSON file is used that lists the beers to be displayed. I hadn't got around to packaging it up, but I can put it into a zip file for anyone that wants it. You can see it at http://www.surfcitybrewing.com/taplist/

I'd definitely be interested in viewing your version as well.
 
I'd definitely be interested in viewing your version as well.

Here you go: http://www.surfcitybrewing.com/download/LiteBeerMenu.zip

My current version is a two column layout. I wanted to take the time to make a nice single column version before releasing it, but haven't had time. If anyone does that, let me know and I'll package the additional index file in the zip for others.

There are some extra images in this zip file that aren't needed and there's a couple of js files used for doing requests to the BCS for temperature display. If you don't need to do that, you can delete those files.

This layout is identical to my two column version I did for RPints. After two SD card crashes though I didn't feel like reinstalling all the mysql and PHP components just for running a beer menu. Thus, I slimmed it down to just the display page, css and image files and read in the beers from an XML file. When I get time, I had planned to just read in the beers from my Beersmith BeerXML file.

I'm not a web developer by trade, so I'm sure there are some better ways to do some of the things.
 
It works!
In the end I think i deleted the line of code "#port = '/dev/ttyACM0'" and never put it back.

Once I put that in it worked like a charm. Thanks again for all the help, cant wait to hook up the rest of the lines.

Which 1/2" meters did you end up going with, and how have you found them to be? I just got a set of 3/8" DIGITEN meters that I am hoping will work well for me.
 
Last edited by a moderator:
Last edited by a moderator:
Hi All,

Like many before me, I'm at am impasse and I'm coming to all of you for help. Initially, I set up Raspberry Pints without the flow meters, reasoning I could figure out the difference between the two installs when the time came and add what was needed. So, I'm now at that point, and making strides but still finding obstacles as well. My chief question is do I start over and make a clean install using the "with flow meters" (and if so, what is the best way to do this?), or is there a fix to get me to the end? Here is what I can share.

Along my way, I bungled through the initial install, was trying to add the stuff for flow meters to my existing install, and came to a point where I was getting an error message that there was no config.php file in /var/www/includes. I mention this because in my bungling, it appears I must have installed RaspberryPints in the /var/www/ location, as well as /var/www/html/ location. I copied the config.php file from the /var/www/html/ location to the other, and things move along. But, because I did not take notes on my original set up of Pints, I'm not sure which location I am using, nor how to determine this. However, as the /html location had the config.php file and the other location didn't, and it was noted as an error, then I take it to mean my Pints is running from /var/www. Is that a fair conclusion? Do I need to do anything about seeming to have it in two locations?

I worked through the installation using an Arduino Uno reposted on page 245 of this thread, and was able to get to the point of having the Uno linked.

Next, I originally had some trouble getting the flowmon file to the /etc/init.d location, and for it to be recognized. I was able to get past that, and when I boot up and check for its status, I get:
● flowmon.service - LSB: Put a short description of the service here
Loaded: loaded (/etc/init.d/flowmon)
Active: inactive (dead)

Do I need to do something to insure it is running after every boot up?

When I start it and check status, I see:
● flowmon.service - LSB: Put a short description of the service here
Loaded: loaded (/etc/init.d/flowmon)
Active: active (running) since Sat 2017-03-11 23:03:17 CST; 1min 16s ago
Process: 2082 ExecStart=/etc/init.d/flowmon start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/flowmon.service
└─2088 /usr/bin/python /var/www/python/flow_monitor.py

Mar 11 23:03:17 raspberrypi flowmon[2082]: Starting system RPFlowMon daemon:.
Mar 11 23:03:17 raspberrypi systemd[1]: Started LSB: Put a short description....
Hint: Some lines were ellipsized, use -l to show in full.

I'm not sure all is well there or not, as it has more than what I see in instructions elsewhere.

Finally, I found the following earlier in thread (along with tons of other useful hints).

Ok, if you've installed the full 2.0.1 kit, one way to debug the meters is to:

- Stop the Flowmon service:
Code:
$ sudo /etc/init.d/flowmon stop

Run the flow_monitor script in a terminal:

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

Leave that running while you blow through your meter(s).
It should display a terse (3 short lines iirc) pour packet in response to meter rotation. Get that to work first.

Once you're getting pour messages you will need to alter a constant in pours.php to account for the non-Swissflow SF800 meter...

Cheers!

When I do the latter, I see the following:
There are no windows in the stack
Invalid window '%1'
Usage: windowactivate [options] [window=%1]
--sync - only exit once the window is active (is visible + active)
If no window is given, %1 is used. See WINDOW STACK in xdotool(1)

Okay, so I just vomited all my challenges out there. Sorry. Any advice would be much appreciated.
 
First question, are you using Swiss-flow meters?

Secondly, that window error message means something along the lines of the browser window not being open.
 
Last edited by a moderator:
Run the flow_monitor script in a terminal:

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

Leave that running while you blow through your meter(s).
It should display a terse (3 short lines iirc) pour packet in response to meter rotation. Get that to work first.

Once you're getting pour messages you will need to alter a constant in pours.php to account for the non-Swissflow SF800 meter...

Cheers!

Secondly, that window error message means something along the lines of the browser window not being open.

So, I tried this again with my browser window open and I NO LONGER see the following:
There are no windows in the stack
Invalid window '%1'
Usage: windowactivate [options] [window=%1]
--sync - only exit once the window is active (is visible + active)
If no window is given, %1 is used. See WINDOW STACK in xdotool(1)​

Rather, nothing appears in the terminal window...no terse pour packet, etc.

Perhaps it is linked to this problem - I have selected to show column for flow monitoring in "Personalization" in Pints, but I do not see a column for this as has been shown in screen shots in this thread. However, with how I have things set up, when I blow through the flow monitor, the RP screen refreshes, even though there is no column to show the result of monitoring flow. Perhaps I have more going for me than I realize, just not displaying.
 
You have to enable the "Keg Column" and turn on "Use Flow Monitoring".

Not sure why you weren't getting any pour packets displayed in the terminal window, unless the flowmon service was still running the whole time.
Which OS are you running?

Cheers!
 
You have to enable the "Keg Column" and turn on "Use Flow Monitoring".

Not sure why you weren't getting any pour packets displayed in the terminal window, unless the flowmon service was still running the whole time.
Which OS are you running?

Cheers!

Ah! It was the keg column selection that was NOT done. Now it is showing, and responding to the flow monitor when I blow through it by updating a loss of volume and a corresponding new balance.

Curiously, the updating of the RP page while running "sudo python /var/ etc." was because the flowmon was still running. When I convincingly stopped it, the RP display did not update.

Then, when I ran the script "sudo python /var/www/python/flow_monitor.py" or "sudo python /var/www/html/python/flow_monitor.py" and blew through the flow meter, again there were no pour packets displayed in the terminal window.

After exiting, I did see these things, respectively:
pi@raspberrypi:~ $ sudo python /var/www/html/python/flow_monitor.py
Exiting
Traceback (most recent call last):
File "/var/www/html/python/flow_monitor.py", line 36, in <module>
POUR_COUNT = str(reading[3])
IndexError: list index out of range
pi@raspberrypi:~ $ sudo python /var/www/html/python/flow_monitor.py
Exiting
Traceback (most recent call last):
File "/var/www/html/python/flow_monitor.py", line 35, in <module>
MCP_PIN = str(reading[2])
IndexError: list index out of range
 
Never seen this before.

File "/var/www/html/python/flow_monitor.py", line 35, in <module>
MCP_PIN = str(reading[2])
IndexError: list index out of range

I wonder if it means your Arduino sketch is sending an invalid pin number with the pour packet.
Might want to double check the number of taps and the pin list in that sketch...

Cheers!
 
Never seen this before.

File "/var/www/html/python/flow_monitor.py", line 35, in <module>
MCP_PIN = str(reading[2])
IndexError: list index out of range

I wonder if it means your Arduino sketch is sending an invalid pin number with the pour packet.
Might want to double check the number of taps and the pin list in that sketch...

Cheers!
Lines 35 and 36 in that file reads as shown in the following context:
try:
while running:
msg = arduino.readline()
if not msg:
continue
reading = msg.split(";")
if ( len(reading) < 2 ):
print "Unknown message: "+msg
continue
if ( reading[0] == "P" ):
MCP_ADDR = int(reading[1])
MCP_PIN = str(reading[2])
POUR_COUNT = str(reading[3])
PULSES_PERL = 5600

Here is what I have in the Arduino sketch:
//This line is the number of flow sensors connected.
const uint8_t numSensors = 1;
//This line initializes an array with the pins connected to the flow sensors
uint8_t pulsePin[] = {8};
//number of milliseconds to wait after pour before sending message
unsigned int pourMsgDelay = 300;​
 
Has anyone tried to "update" and install the "Version 2 additions" located in the pull request? I ask because there was a couple more features I liked and so I gave it a go and tried to install but its not recognizing my pours.
 
Has anyone tried to "update" and install the "Version 2 additions" located in the pull request? I ask because there was a couple more features I liked and so I gave it a go and tried to install but its not recognizing my pours.

So, scratch it not working, i got it working. But the big reason why I wanted to install this so it would update a remote display. In the bug fixes it says "RPints now updates keg pours (and other stuff) to remote browser displays"

I take that as a tablet or whatever browser you have open to the page will automatically update after a pour. Its still not doing that, I have to click refresh on the browser from my remote display. (I get that i can download a chrome extension to update however I want but just curious) Any ideas?
 
I started trying to get it packaged for distribution, but it turned into more hassle than I expected. I actually ended up writing my own very stripped down version that has just the features I need. For example, I really don't need keg inventory and found it quite cumbersome to have to manage the keg tracking subsystem and enter OG/FG/SRM/IBU, etc. twice just to get things displayed. This is not a criticism, just my own preference.

A couple people expressed interest in the container/glassware rendering code, so I published my new project at github, which contains that, at https://github.com/y0gensha/LitePints

I also zipped my RaspberryPints folder with all my modifications before I nuked it. You can get it at http://yogensha.net/junk/pints_yogensha_bak.tar.gz Use at your own risk!

It's in the img/ folder of both projects and is actually very simple.

If any of the original developers are around, thanks for contributing the project. Also many thanks to day_trippr for the motion sensor stuff. Certainly added joy to my own home brewing!

Awesome. May fork off this. Do you have a list of packages I would need to install? Was going to do a RaspPints install but the site is down.
 
Give the guys a couple of days to get their payment into the hosting site.
If they're still off the air on Monday there are a few of us who dumped the site...

Cheers!
 
So, I'm at step 6 on a clean install and on the last command I get "sudo: unable to execute ./setup: no such file or directory". Thoughts? Once past this, I'll move on to step 7 on post #1387 (think that's the one). Unless there's a better walkthrough somewhere with all of the Capn's updates. Thank you.
 
So, I'm at step 6 on a clean install and on the last command I get "sudo: unable to execute ./setup: no such file or directory". Thoughts? Once past this, I'll move on to step 7 on post #1387 (think that's the one). Unless there's a better walkthrough somewhere with all of the Capn's updates. Thank you.

Here is something I put together the other day when the site went down. I used Google cache to get some of the code back. I used this and it worked great.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get -y install apache2 php5 mysql-client mysql-server php5-mysql phpmyadmin
sudo apt-get install arduino python-serial python-mysqldb php5-cli xdotool
sudo apt-get -y install ttf-mscorefonts-installer x11-xserver-utils unclutter

Download zip and move to var/www/html
Here is link to download zipfile https://github.com/HentschelT/RaspberryPints/tree/Version2

sudo chmod -R 777 /var/www/html
cd ~
git clone https://github.com/google/pywebsocket.git
cd pywebsocket
python setup.py build
sudo python setup.py install
sudo cp flowmon /etc/init.d
sudo chmod a+x /etc/init.d/flowmon
sudo /etc/init.d/flowmon start $ ps aux | grep PintDispatch.py
sudo update-rc.d flowmon defaults
 
Tried what you posted and at "sudo cp flowmon /etc/init.d" get "cp: cannot stat `flowmon`: No such file or directory. Thanks.<EDIT> Nevermind, think I see what you mean, just jumped around some. I just can't seem to get past step 6 on the last command, the setup won't execute.
 
If you log into the RPi as 'pi' and do an 'ls alamode-setup' does the response show that folder and a 'setup' file within?

btw, what OS version are you running - Wheezy (older) or Jessie (newer)?
If running Wheezy you'd run the 'setup' file, if Jessie there should be a jessie-setup instead.

And if you're running Jessie, when I installed R'Pints under Jessie I had to install DOS2UNIX on the RPi and run it on the jessie-setup file to get it to run correctly.
That was many months ago so the jessie-setup file might have been fixed but it doesn't hurt to run DOS2UNIX on it anyway...


Cheers!
 
Tried what you posted and at "sudo cp flowmon /etc/init.d" get "cp: cannot stat `flowmon`: No such file or directory. Thanks.<EDIT> Nevermind, think I see what you mean, just jumped around some. I just can't seem to get past step 6 on the last command, the setup won't execute.


Did you restart ?
 
It's hard core, but I've done it: run each command in the setup file from the console.
That'll at least get you down to which command in the script is failing...

Cheers!
 
Did that. Nothing failed. The setup file doesn't show anything happening with the inittab folder or the arduino-setup folder though, should they be somewhere?
 
Did that. Nothing failed. The setup file doesn't show anything happening with the inittab folder or the arduino-setup folder though, should they be somewhere?

Did you open and edit the flowmon file to var/www/html before you pasted it in the init.d location?
 
Did you open and edit the flowmon file to var/www/html before you pasted it in the init.d location?
Negative, that looks like something around step 9, I'm still stuck on step 6 with the setup file not wanting execute. Ran all the commands in the setup file, but it doesn't do anything with two of the files. I'm also having troubles downloading the zip file Version2.zip for the next step, may have to get a jump drive involved.
<EDIT> So, I continued on with the install, last command in step 6 did not work again on a clean install, but went through the setup folder and did all of the commands. Now, on step 9 that tests and starts the flowmon, I get nothing on the return using PintDispatch or flow_monitor. I've only got one meter using pin 2. Changed the arduino code to "int numSensors = 1;" and "int pulsePin[] = {2};". Running Wheezy with Version2 of RPi, so it's all in /var/www/. Thanks for the help.
 
Negative, that looks like something around step 9, I'm still stuck on step 6 with the setup file not wanting execute. Ran all the commands in the setup file, but it doesn't do anything with two of the files. I'm also having troubles downloading the zip file Version2.zip for the next step, may have to get a jump drive involved.
<EDIT> So, I continued on with the install, last command in step 6 did not work again on a clean install, but went through the setup folder and did all of the commands. Now, on step 9 that tests and starts the flowmon, I get nothing on the return using PintDispatch or flow_monitor. I've only got one meter using pin 2. Changed the arduino code to "int numSensors = 1;" and "int pulsePin[] = {2};". Running Wheezy with Version2 of RPi, so it's all in /var/www/. Thanks for the help.

So its working? Thats odd if your using the updated version 2 add on that you have to specify the pin. The whole point of that version is you dont have to, all you have to do is specify the pin in the actual raspberrypints site location.
 
So its working? Thats odd if your using the updated version 2 add on that you have to specify the pin. The whole point of that version is you dont have to, all you have to do is specify the pin in the actual raspberrypints site location.

Not working. Oh, I see. Do I still need the number of sensors? I left it at 1 sensor, deleted pin 2 and set it back to maxpins. Still nothing on the output when testing and starting flowmon. I also started a clean install with Jessie, still had problems at the last command on step 6, the setup file (jessie) would not execute, so did them all separately from the setup folder. Continued on with the install. Now problem is when trying to upload to the alamode board, the serial port section is grayed out and I can't select the serial port??? Thanks again for the help.
<EDIT> Looks like all is working and good on Wheezy, just not registering pours on Jessie. At least one of them works :>)
 
I had a number of issues getting things running under Jessie (on an RPi2B) not the least of which was getting the serial port to work with an AlaMode shield.

This was the "eureka" fix:

Edit /boot/config.txt
Change enable_uart=0

Cheers!
 
Not working. Oh, I see. Do I still need the number of sensors? I left it at 1 sensor, deleted pin 2 and set it back to maxpins. Still nothing on the output when testing and starting flowmon. I also started a clean install with Jessie, still had problems at the last command on step 6, the setup file (jessie) would not execute, so did them all separately from the setup folder. Continued on with the install. Now problem is when trying to upload to the alamode board, the serial port section is grayed out and I can't select the serial port??? Thanks again for the help.
<EDIT> Looks like all is working and good on Wheezy, just not registering pours on Jessie. At least one of them works :>)

I'm running on Jessie , rpi3 with Arduino Uno. Registering pours.
 
Hi all,

I'm using an Arduino Uno and RPi2. RPints is up and running and i have the sketch with one pin specified as a test on the arduino. I can see the info in the serial monitor of the arduino and the pin matches what I have set on the Rpi however there is no data hitting the pours table. I've checked the paths in config files and it all looks fine. I'm a bit of a linux novice so if someone could point me to a log I should be checking I'd appreciate it muchly.

Cheers,

Nick.


edit: nevermind I went back through the flowmon file and found the missing html in the path, what a pain.

Now to look at converting to metric!
 
Well done for getting up and running! :mug:

About the only gotcha with converting to metric units will be coming up with a "ticks per liter" factor for the flow meter. The rest should be straight forward...

Cheers!
 
We usually get a much longer show when a new adopter comes along. We didn't even have time to figure out who's turn it is to bring the popcorn!
 
I unplugged my RaspberryPi and Pints a few months ago because I moved, now it gets to some USB and/or Keyboard Error (cmd13) and won't load anything...not even the Raspbian desktop. Any suggestions.
 
If you unplugged a running RPi without executing a Shutdown command beforehand you likely borked the SD card.
If you have a backup, now is the time to use it.
If not, you're looking at a whole new build...
 
If you unplugged a running RPi without executing a Shutdown command beforehand you likely borked the SD card.
If you have a backup, now is the time to use it.
If not, you're looking at a whole new build...

Yeah...my SD card says it has 1.34gb total (was a 16gb card) and now I can't format it. Any suggestions, or should I just buy a new one? Also, do you think the wifi dongle is fine?

One last thing. I read on Facebook last year where you guys might be coming out with RPints V3. Any news on that?

Thanks.
 
Yeah...my SD card says it has 1.34gb total (was a 16gb card) and now I can't format it. Any suggestions, or should I just buy a new one? Also, do you think the wifi dongle is fine?

One last thing. I read on Facebook last year where you guys might be coming out with RPints V3. Any news on that?

Thanks.

Sounds like you're looking at it in Windows. If that's the case, you won't see the full size because of the Linux disk format.

However, you can wipe it in Windows and start fresh.

Here's the steps:
Start diskpart (from command prompt)
List disk
Select disk x (sd card #)
Clean
Create partition primary
Format fs=FAT32 quick
assign (to get drive letter in Windows Explorer).

Sometimes you need to eject after the "Clean" step and re-insert so Windows see's the full capacity.
 
Back
Top