[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 working on this right now. Just a clarification. I have to install the arduino software, but I don't actually have to flash anything? I didn't flash anything yet.

Yes, that's correct. This is done automatically when the service starts.

I entered some beers and kegs, and those worked fine. However, when I go to save taps, nothing saves. Also, when I go to save pin numbers, nothing saves.

I did not do step 9 at all in the original instructions other than plugging a couple meters in. In the software I was able to tell it 5 pins and that worked. It just won't let me save the pin numbers.
Please attach or send me /var/log/apache2/error.log. This will tell me what the problem is.
Also, once I figure what's happening, we can probably fix this via phpmyadmin. If you don't have it installed, install via:
sudo apt-get install phpmyadmin

Good luck,
-Th
 
I did not do step 9 at all in the original instructions other than plugging a couple meters in.
You'd still have to do the stuff at the end of step 9, which starts with
Code:
sudo cp flowmon /etc/init.d

Remember, when checking if the service is running, you have to grep now for
'PintDispatch', and not for 'flow_monitor'.
Code:
sudo /etc/init.d/flowmon start
ps aux | grep PintDispatch

Then go ahead and install the service
Code:
sudo update-rc.d flowmon defaults

At this point, you can check the log output to see what's going on
Code:
more /var/log/rpints.log

If you need to restart, stop or start the service, the best way to do this is via the following commands
Code:
sudo service flowmon stop
sudo service flowmon start
sudo service flowmon restart

Remember, starting or restarting wipes out the /var/log/rpints.log file, so if there is something in there that would help debugging, save that file to some other place before restarting the service.

Cheers,
-Th
 
So I noticed that my printed copies of the instructions for RPints was out of date. That could be the start of my problems. Here is my rpints.log:

Traceback (most recent call last):
File "/var/www/python/PintDispatch.py", line 463, in <module>
dispatch = PintDispatch()
File "/var/www/python/PintDispatch.py", line 104, in __init__
self.updateValvePins()
File "/var/www/python/PintDispatch.py", line 415, in updateValvePins
taps = self.getTapConfig()
File "/var/www/python/PintDispatch.py", line 141, in getTapConfig
cursor.execute("SELECT tapNumber,flowPin,valvePin,valveOn FROM tapconfig ORDER BY tapNumber")
File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1146, "Table 'raspberrypints.tapconfig' doesn't exist")

Obviously I have an issue with my tables. I am going to go back and make sure all the rest of the steps are up to date in my install instructions.
 
I'm gonna try to get this going over the weekend. Are you using the instructions from the Raspberry Pints website?

It was a bug on my part that created the problem. It's fixed now on github, and I sent 2kegger a mail with a fix it for his install.

It's basically the original instructions from the web site, substituting the zip file download, adding the pyWebSocket install, and then skipping over the steps that happen in the arduino IDE program. I guess if we could come up with a new set of instructions along the ways, I'll post it to the github wiki to help others out.

Cheers,
-Th
 
I guess if we could come up with a new set of instructions along the ways, I'll post it to the github wiki to help others out.

Cheers,
-Th

I plan on keeping good notes as I go through the install procedure and will post the entire procedure one step at a time after I get everything up and running.
 
About the auto hex uploading stuff. Will it break if it can't program the arduino? I use BT to communicate with an arduino nano inside the fridge. Once I have everything uploaded over usb I can power the nano directly and it connects and sends pour data flawlessly. But the only downside is that I cannot program over this connection. I want to add your updates but I don't know how upset the whole thing will get of it can't program everytime the rpi starts up. Maybe a way to disable the auto uploading?
 
About the auto hex uploading stuff. Will it break if it can't program the arduino? I use BT to communicate with an arduino nano inside the fridge. Once I have everything uploaded over usb I can power the nano directly and it connects and sends pour data flawlessly. But the only downside is that I cannot program over this connection. I want to add your updates but I don't know how upset the whole thing will get of it can't program everytime the rpi starts up. Maybe a way to disable the auto uploading?

Yes, as it currently stands, the flowmon service will still move on, even if the upload fails. So, it should take care of your scenario if the Alamode isn't connected to the serial port on the Pi.
I'm going to make this a bit more robust, and skip the upload/flashing altogether if the hex file is not present in the arduino/raspberrypints directory. This way, you could just remove that hex file, and it will never attempt to upload/flash the alamode. I'll probably add that later tonite.

I should also probably make the serial port that the RPi uses to talk to the Alamode a configurable option. Let me think about that (right now, you'll have to change a line of code in FlowMon.py).

Cheers,
-Th
 
Hi I'm new to the raspberry pints.It. I'm having a problem with step 9 installing flow meters. I followed all the instructions on the raspberry pints website. when I try to type sudo cp flowmon /etc/init.d I get no such file or directory. please help its driving me nuts lol thank you.
 
About the auto hex uploading stuff. Will it break if it can't program the arduino? I use BT to communicate with an arduino nano inside the fridge. Once I have everything uploaded over usb I can power the nano directly and it connects and sends pour data flawlessly. But the only downside is that I cannot program over this connection. I want to add your updates but I don't know how upset the whole thing will get of it can't program everytime the rpi starts up. Maybe a way to disable the auto uploading?

Oh, one other thing that you're gonna run into some trouble with on your setup: I use the Alamode reset line (pin 18) to kick the alamode into listening mode to upload the config parameters. Now, in your setup, since your nano is not connected, it cannot do that, and the flowmon service, after a reconfiguration of your taps, will now sit there and wait for your nano to wake up (which it never does, since it's not connected to the reset line). You'll have to reset your nano manually, whenever a new configuration is uploaded (basically when you remove taps, when you save a taps config, or change the alamode parameters). You can check whats going on via:
Code:
tail -f /var/log/rpints.log
Maybe I find a way to issue that reset over the serial connection, but this means some trickery in the arduino code...

-Th
 
Hi I'm new to the raspberry pints.It. I'm having a problem with step 9 installing flow meters. I followed all the instructions on the raspberry pints website. when I try to type sudo cp flowmon /etc/init.d I get no such file or directory. please help its driving me nuts lol thank you.

You're probably in the wrong directory. You can try absolute paths, then that won't matter. See if this works instead of your command above:

Code:
sudo cp /var/www/python/flowmon /etc/init.d/

Cheers,
-Th
 
I think it worked. after that I typed sudo chmod a+x /etc/init.d/flowmon I think that worked.then I typed sudo /etc/init.d/flowmon start $ ps aux | grep flow_monitor.py to test it but I didn't get a return like it said I would.
 
I think it worked. after that I typed sudo chmod a+x /etc/init.d/flowmon I think that worked.then I typed sudo /etc/init.d/flowmon start $ ps aux | grep flow_monitor.py to test it but I didn't get a return like it said I would.

Yes the web site is missing a return between the commands. Try this:

Code:
sudo /etc/init.d/flowmon start
ps aux | grep flow_monitor.py
(two separate commands)

Cheers,
-Th
 
Thank you that worked. I'm still waiting for the sf 800 flow meters. I work on espresso machines and had a extra turbine style flow meter that I tried to see if it worked but it didn't maybe it sends a different signal. I guess I'm stuck until I get the sf800. thank you again.
 
About the auto hex uploading stuff. Will it break if it can't program the arduino? I use BT to communicate with an arduino nano inside the fridge. Once I have everything uploaded over usb I can power the nano directly and it connects and sends pour data flawlessly. But the only downside is that I cannot program over this connection. I want to add your updates but I don't know how upset the whole thing will get of it can't program everytime the rpi starts up. Maybe a way to disable the auto uploading?

So, I thought about your scenario, and made a few extra changes. First off, as I mentioned, if the raspberrypints.hex file is not present in the admin/arduino/raspberrypints directory, then it will not even attempt to flash the sketch. You'll have to do that yourself, with the .ino sketch provided in the download. There is nothing to change in there, just compile and upload.

I also reorganized things a bit, so that for your setup things should be easier to work with. Basically, here is how it should work for you:
* Power off your nano
* Make any configuration changes necessary via the web interface (add/remove taps, change parameters, etc).
* Then start your nano, the new settings will be uploaded via BT.

I also added logic that when you happen to power cycle your nano, the RPints flow monitor part senses that, restarts itself, uploads the config parameters, and your nano should be ready to count pours.

I don't have a nano here, so the only way for me to test it was to emulate that behavior thru resetting the Alamode from the outside. I'd be interested to see it work out, make sure to send me your rpints.log file when you try it.

I also added a new file in the python directory called Config.py. This is for expert level parameters (like changing the serial port), which is probably not something needed in the web interface. You'll have to change the serial port there to the one that's used by your BT device.

Make sure to grab the latest from github, and backup your current stuff :)

Good luck,
-Th
 
So, I thought about your scenario, and made a few extra changes. First off, as I mentioned, if the raspberrypints.hex file is not present in the admin/arduino/raspberrypints directory, then it will not even attempt to flash the sketch. You'll have to do that yourself, with the .ino sketch provided in the download. There is nothing to change in there, just compile and upload.



I also reorganized things a bit, so that for your setup things should be easier to work with. Basically, here is how it should work for you:

* Power off your nano

* Make any configuration changes necessary via the web interface (add/remove taps, change parameters, etc).

* Then start your nano, the new settings will be uploaded via BT.



I also added logic that when you happen to power cycle your nano, the RPints flow monitor part senses that, restarts itself, uploads the config parameters, and your nano should be ready to count pours.



I don't have a nano here, so the only way for me to test it was to emulate that behavior thru resetting the Alamode from the outside. I'd be interested to see it work out, make sure to send me your rpints.log file when you try it.



I also added a new file in the python directory called Config.py. This is for expert level parameters (like changing the serial port), which is probably not something needed in the web interface. You'll have to change the serial port there to the one that's used by your BT device.



Make sure to grab the latest from github, and backup your current stuff :)



Good luck,

-Th


Slow down now! I'll get to it when I can. I like the idea of everything you're pushing, I just need some time to get my system updated and give it a whirl. It would be nice to be able to update the nanos over bluetooth, we'll see if it's even possible. I know you can't upload a hex over it, at least not the way I have it configured, so that'll be the first thing I try out. I would also love to see that the power cycling part works like you said. It's always a ***** if something buggers the wireless connection because it's easier to just hit the reboot button instead of opening up a terminal. This will make things so much better, since I have my brewpi setup running on the same pi. I'm content with the fact that I have to manually upload my hex file, since I never intend to change anything about my tap layout in this kegerator. I never have to change anything like which pin is which because it's hard coded into the pcb layout.
 
Thank you, CaptnDelta, for all the help. Everything is running smooth other than I need to hook up a couple more flow meters. I'm very excited about these and appreciate the work that was put in to it! I am once again up and running. It's amazing to see the quality of people on these boards who are willing to help out.
 
Dumb question. I have two separate kegerators, with a total of 6 taps, in two different rooms. Could I put the raspberry pints system in the barroom with two taps with flow monitors, and still display the 4 taps in the other room? And if I do this, is there a manual way to enter pours on the other taps, without flow control meters, to keep track of the volume of the kegs? Sorry for the dumb questions.
 
Slow down now! I'll get to it when I can.
Hehe, no prob, take your time, github is still gonna be here tomorrow (hopefully :) )
I like the idea of everything you're pushing, I just need some time to get my system updated and give it a whirl. It would be nice to be able to update the nanos over bluetooth, we'll see if it's even possible. I know you can't upload a hex over it, at least not the way I have it configured, so that'll be the first thing I try out.
Yea, I'm afraid there is quite a bit of work on your part necessary to get that working. Those BT boards typically don't have access to the DTR line on the Uno, so it would mean to add a few wires between the BT board and the Uno. And even if you do that, it's not guaranteed that your boot loader on the Uno supports hex uploads from anything but the USB port, so you most likely would have to change the boot loader too...
I would also love to see that the power cycling part works like you said. It's always a ***** if something buggers the wireless connection because it's easier to just hit the reboot button instead of opening up a terminal. This will make things so much better, since I have my brewpi setup running on the same pi. I'm content with the fact that I have to manually upload my hex file, since I never intend to change anything about my tap layout in this kegerator. I never have to change anything like which pin is which because it's hard coded into the pcb layout.
Yea, that's true for your case, but i.e. if you wanna try out the auto-kick feature, you'll probably have to fiddle a few times with that value. Doing that w/o reflashing is probably a bit easier on you...

Cheers,
-Th
 
Thank you, CaptnDelta, for all the help. Everything is running smooth other than I need to hook up a couple more flow meters. I'm very excited about these and appreciate the work that was put in to it! I am once again up and running. It's amazing to see the quality of people on these boards who are willing to help out.

Yeah, my pleasure. Thank you for enduring the debugging sessions via email :mug:

For the record: Along the ways 2Kegger and I found a couple bugs in my version:
* I forgot to include a sql statement in the installers database scheme
* There was a problem with updates to browsers when the Apache port for RPints was not the default 80. A typo on my part

Both bugs have been fixed in the current version of my repository. For the better part, I think we're ready to go...

At the same time, I'm pretty happy with what we got in my github repository at the moment, and I'd like to call a feature freeze to stabilize the current version. I'll definitely consider bug reports, but I won't add new features for this version. Once there is some confirmation from you folks that things seem to work out, I'll to cut a release on github, and start a new thread on this forum for announcement/discussion of that release.

Sound ok?
-Th
 
Ok. I'm done!

Now how do I make it fit in landscape. I only need to fit 5 taps for now.

View attachment 308648

You can try zooming out on the browser. Try holding down the left control key and scrolling down on your mouse wheel. This can mess up some image stuff though. Otherwise try changing screen resolution to be larger.
 
Try a resolution that the TV supports then if that doesn't work try one that's slightly off from that. Say it's a 1024x768 display and it's messing up, try 1024x800.
 
Did another fresh install today (Raspbian Jessie) and noticed a few things: for some reason when I installed Apache2, the document root is now "/var/www/html" instead of "/var/www/". I'm sure it's easy enough to change, but I was lazy, so my RPints is in /var/www/html.

Also, using the autostart in "/etc/xdg/lxsession/LXDE-pi" didn't work. What ended up working was using "/home/pi/.config/lxsession/LXDE-pi".

Now I'm trying to use Iceweasel since Chromium isn't readily available in Jessie, but I can't get it to start in kiosk/fullscreen, and it renders the pint glasses in the gravity/color column weirdly (color extends beyond border of glass). View attachment ImageUploadedByTapatalk1444946360.851515.jpg

Has anyone had luck with other browsers?
 
That mask issue is browser influenced, Chrome was the only browser I have tried that worked correctly. But if you go back a week or so in this thread someone cooked up a fix for that...

Cheers!
 
Did another fresh install today (Raspbian Jessie) and noticed a few things: for some reason when I installed Apache2, the document root is now "/var/www/html" instead of "/var/www/". I'm sure it's easy enough to change, but I was lazy, so my RPints is in /var/www/html.
Yes, "Jessie" switched to apache 2.4 which has /var/www/html as default (reason being security concerns). If you wanna use flow meters, and move it to /var/www/html, you need to edit the code in at least 2 other places, otherwise it won't work (in the flowmon python script and the service start/stop script). Otherwise you can also edit /etc/apache2/sites-enabled/000-default and reset it there to /var/www

Now I'm trying to use Iceweasel since Chromium isn't readily available in Jessie, but I can't get it to start in kiosk/fullscreen, and it renders the pint glasses in the gravity/color column weirdly (color extends beyond border of glass).
The post how to fix this is here:
https://www.homebrewtalk.com/showthread.php?p=7127087#post7127087

Only webkit based browsers (Chrome, Safari, etc) can deal with the css mask tag that RPints uses (and with png masks), others fail.

BTW, if you wanna use flow counters, automated updates to the RPints display only work with (not existing) Chromium as it stands. You'll have to figure out how to update the refresh script; good luck!

Has anyone had luck with other browsers?
I made some updates/bug-fixes and added some features to RPints in the version discussed here and forward: https://www.homebrewtalk.com/showthread.php?p=7128949#post7128949

Pretty much everything in circulation aside from IE seems to work with it.

Cheers,
-Th
 
...
I would also love to see that the power cycling part works like you said. It's always a ***** if something buggers the wireless connection because it's easier to just hit the reboot button instead of opening up a terminal.
...

So I went to our hardware folks at work, and they gave me a Nano, one of the guys there even had a bluetooth board in his desk...

Hooked it up to the RPints, and yes, the power cycling part works :)
Just comes right back, gets the config and starts counting, takes about a second or so after the nano is plugged back in.

Also, started porting the Pints stuff to the BeagleBone Black, should make the whole thing a bit cheaper.

Cheers,
-Th

BTW, one thing I meant to ask you: Are you powering your Nano with batteries?
 
Dumb question. I have two separate kegerators, with a total of 6 taps, in two different rooms. Could I put the raspberry pints system in the barroom with two taps with flow monitors, and still display the 4 taps in the other room? And if I do this, is there a manual way to enter pours on the other taps, without flow control meters, to keep track of the volume of the kegs? Sorry for the dumb questions.

As it stands, you can display the tap list, but manual entry of pours is not possible. And, honestly, I'm not sure I would wanna implement it.
I'd rather suggest something different: @wbarber69 here on the thread has his flow meters hooked up via a small board (arduino nano) that uses a bluetooth connection to talk to RPints. I'm thinking about changing RPints so that it can listen to more than one device that does the flow counting. In your case it could be the Alamode for one kegerator, and a Nano via bluetooth for the 2nd one. The technical part is pretty straight forward, I'm just still contemplating how this stuff would be best on the configuration user interface.
Not sure how your setup is, BT has a typical range of about 30 feet, sometimes more. Is that in range for you?

BTW, not a dumb question at all...

Cheers,
-Th
 
So I went to our hardware folks at work, and they gave me a Nano, one of the guys there even had a bluetooth board in his desk...

Hooked it up to the RPints, and yes, the power cycling part works :)
Just comes right back, gets the config and starts counting, takes about a second or so after the nano is plugged back in.

Also, started porting the Pints stuff to the BeagleBone Black, should make the whole thing a bit cheaper.

Cheers,
-Th

BTW, one thing I meant to ask you: Are you powering your Nano with batteries?


Right now I'm pulling power off the temp controller to run the nano. It's not the best solution as I really need more than 5v to the nano. I was actually thinking about getting a lipo and charge controller to work as a battery backup solution. We have intermittent power outages out where I live and it can be a pain since my pis are all on ups. Your changes would make power blinks a non-issue. I'm going on vacation tomorrow. I'll be gone for a week. When I get back I intend to start messing around with your changes.
 
Simple question that I am hoping somebody could help me with. I changed the ABV "off the chart" image to simply be a "caution" sign. I would like it to be displayed, just like the default image, but when the ABV is above 9% instead of the existing 10% threshold. Hopefully this isn't too difficult.

Can somebody point me to the file that needs to be changed?

I found a reference to the file in the index.php, but I could not really follow any logic in that file that would set a 10% threshold vs some other threshold.
 
Simple question that I am hoping somebody could help me with. I changed the ABV "off the chart" image to simply be a "caution" sign. I would like it to be displayed, just like the default image, but when the ABV is above 9% instead of the existing 10% threshold. Hopefully this isn't too difficult.

Can somebody point me to the file that needs to be changed?

I found a reference to the file in the index.php, but I could not really follow any logic in that file that would set a 10% threshold vs some other threshold.

It's a bit obfuscated but you can try changing the following in index.php:
Code:
   if( $remaining > 0 ){
     ?><div class="abv-offthechart"></div><?php
   }

to:
Code:
   if( $abv > 9.0 ){
     ?><div class="abv-offthechart"></div><?php
   }

See if this works,
Cheers,
-Th
 
Looks like that works perfectly.

I figured it had something to do with that line, but could not see for sure what "remaining" was referencing, and did not want to dig into the code to figure it out if somebody already knew the answer.
 
Has anyone moved the database to a location other than the Pi? I'd like to host in on my NAS instead. I can do the dirty work of figuring out what needs to be modified to do so, but if someone already has I'd prefer to leverage their time spent...
 
I have a flash drive as an SMB network share (hosted on one of my routers) mounted on the RPi running my 'Pints setup. I use cifs-utils on the RPi to make that much work.

But I use that for a nightly backup of the 'Pints database along with my temperature logs, not for the live database.

I don't know what would be required to convince mysql to locate the live database anywhere other than where it seems to reside by default (/var/lib/mysql/) but otherwise I suspect I'm like 9/10ths of the way there...

Cheers!
 
Has anyone moved the database to a location other than the Pi? I'd like to host in on my NAS instead. I can do the dirty work of figuring out what needs to be modified to do so, but if someone already has I'd prefer to leverage their time spent...

You're talking about using the mysql instance on the NAS, correct?
Haven't tried that myself, but should be possible, nothing in the DB is really Mysql version specific (IIRC). Try to import the sql/schema.sql file into your NAS' DB first, if that works w/o errors then you should be good to go. Now just need to change 3 files on the rpints side (not sure why it was done that way, seems silly to have the same db info 3 times over...), look at:

* admin/includes/conn.php
* admin/includes/configp.php
* includes/config.php

it's the same stuff in each file. Need to change the host/name/passwd to point to your NAS db.

If you feel more adventurous, you can sql-dump the entire 'raspberrypints' database on your rpints, and import that into your NAS instead of the schema.sql (would basically give you the db schema + all your current data) ....

Good luck,
-Th
 
This is the error I am getting when trying to do the final step to install Raspberry pints. This is were you type in your ip address and fill out all the info. I have gone in and allowed anyone to view or change folders on the Pi. Can anyone tell me what I need to change. I really have no experience with R-Pi I just wanted to set up the digital pints for my kegerator.

RP1.jpg
 
Back
Top