[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 reformatted the SD card with the format tool, then just pushed the image to the card via the win32diskimager. This is the same board that had "Jessie" loaded. I guess I am not clear on the wheezy image. I didn't install noobs because as I understand that just interfaced to load Raspian "Jessie". So I just followed instructions for the install and just pushed the image to the card. I put the card in, powered up, no hdmi video. However, I was able to ssh to it (after finding the ip that it grabbed from DHCP. I could also connect with Win SCP and had the whole file structure there. I am a windows server admin with a little bit of CLI knowledge, but has been many years since I touched linux. Actually I have another pi running brewpi on my ferm chamber. I figured this wouldn't be too much different....except the Raspian version is different. Anyways, I really appreciate your expert tutelage, so thanks!


Where did you download that wheezy image from?

Cheers,
-Th
 
Definitely the problem. The below is what my functions.php file looked like. Is it possible for you to upload that change in your github repository or did I download the wrong zip? I am not yet familiar with how github works - it feels a little ADD to me but I blame that on said unfamiliarity.
There was a brief period last year towards the end of November when this bug was in the current repository. I've since cut a release, which does have the bug fixed, did you use: https://github.com/HentschelT/RaspberryPints/releases/tag/th-2.1.0 ?
There was a post just before Christmas where I had announced that, maybe it got lost...
https://www.homebrewtalk.com/showpost.php?p=7285663&postcount=1542

Next question: I am looking at my alamode board and the header meant to the interface with the pi is only 26 pins compared to the 40 on the pi. I assume this is correct and why I have to pay attention to the pinout on the pi (searching pi GPIO pinout was most enlightening). I was going to go ahead and solder all the headers that came with the alamode but we only need the ones at the GPIO from the pi correct? Any arguments for or against all the headers?

You need the headers for the Pi, and the Alamode I/O H and I/O L headers, probably also the power header on the opposite side of the board. The Alamode board was designed for the first rev of the RPi, that's why there is a bit of misaligment now. Also, the USB sockets are now a bit higher and interfere with the Alamode PCB, so it's best to solder the RPi GPIO header not all the way flush (leave a small gap). And you need to put a couple layers of electrical tape across the USB/RJ sockets on the RPi to avoid shorting anything out on the alamode board.

Cheers,
-Th
 
You need the headers for the Pi, and the Alamode I/O H and I/O L headers, probably also the power header on the opposite side of the board. The Alamode board was designed for the first rev of the RPi, that's why there is a bit of misaligment now. Also, the USB sockets are now a bit higher and interfere with the Alamode PCB, so it's best to solder the RPi GPIO header not all the way flush (leave a small gap). And you need to put a couple layers of electrical tape across the USB/RJ sockets on the RPi to avoid shorting anything out on the alamode board.

Cheers,
-Th

I've actually been working on a 3D printable modified Rpi2 case that is intended specifically to have the alamode board mount on top of it. It solves the shorting issues, and gives the board support so it isn't only resting on the GPIO pins. It also has the unneeded 14 extra Rpi2 pins blocked off so that when you slide the alamode board on it self aligns onto the correct pins.

I'm on rev.5 so if anyone else wants to help modify the case if they have issues with it or just see a better way feel free.

http://www.thingiverse.com/thing:1288791

20160123_080812.jpg


20160123_080844.jpg


20160123_080945.jpg


20160123_081002.jpg


20160123_081024.jpg
 
There was a brief period last year towards the end of November when this bug was in the current repository. I've since cut a release, which does have the bug fixed, did you use: https://github.com/HentschelT/RaspberryPints/releases/tag/th-2.1.0 ?
There was a post just before Christmas where I had announced that, maybe it got lost...
https://www.homebrewtalk.com/showpost.php?p=7285663&postcount=1542

Nuts, I missed that. I actually have post #1542 in my notes but I did not re-read the post before installing. I am thinking I need to restart from scratch again to get a baseline image right. Will make an image prior to installing Rpints so I don't have to start ALL the way over again. You could probably just tell me what to overwrite, but I think I would feel more comfortable getting that solid image down. That said, I would like to save my current beer list, tap list, and keg list. Where/what are those files called? I feel comfortable with that at least.



I've actually been working on a 3D printable modified Rpi2 case that is intended specifically to have the alamode board mount on top of it.

That's pretty sweet. I am going to take a look into that as I have access to commercial grade printing. If I update your model I will post it back here.

My alamode board came with a little adhesive rubber foot that I imagine is meant to mount onto the pi to prevent said shorting but I like that idea a lot better!


Edit to add: I would like to add custom images for my tap handles. I am reading this post but the language is not plain enough for me on where/how to insert that line of code in the index.php file. Thanks for bearing with me!
 
Nice design, guper, gonna have to try to print that!
My alamode board came with a little adhesive rubber foot that I imagine is meant to mount onto the pi to prevent said shorting but I like that idea a lot better!

Yes, I also noticed longer "spacers" under the GPIO headers of the newer alamodes.

Cheers,
-Th

alamode-headers.JPG
 
Nuts, I missed that. I actually have post #1542 in my notes but I did not re-read the post before installing. I am thinking I need to restart from scratch again to get a baseline image right. Will make an image prior to installing Rpints so I don't have to start ALL the way over again. You could probably just tell me what to overwrite, but I think I would feel more comfortable getting that solid image down. That said, I would like to save my current beer list, tap list, and keg list. Where/what are those files called? I feel comfortable with that at least.

Ah, found what you mentioned in your PM.

You can use phpmyadmin for backup/restore, just add '/phpmyadmin' to the URL of your tap list. Log in using the database login (the one you created for the DB during the first install, not the Pi login). On the left hand side, you'll see a 'raspberrypints' database, click on that, then click the 'export' tab on the top. The defaults in that tab should download you a .sql file which contains instructions to recreate the table structure and the current data. Save that file. To restore, use the 'import' tab and browse for the .sql file that you created before.

Cheers,
-Th
 
Edit to add: I would like to add custom images for my tap handles. I am reading this post but the language is not plain enough for me on where/how to insert that line of code in the index.php file. Thanks for bearing with me!

It's a pretty easy change to make.

The original code line just wrote the tap number:
Code:
     <span class="tapcircle"><?php echo $i; ?></span>

I added extra code as an image tag to use the tap number plus additional characters to make up the file names (e.g. 1-Ball.png, 2-Ball.png, etc):
Code:
<img src="img/<?php echo $i; ?>-Ball.png" alt="">

This
Code:
     <span class="tapcircle">
     <img src="img/<?php echo $i; ?>-Ball.png" alt="">
     </span>
would be the full line of code for above example (I added line breaks since the forum starts side scrolling otherwise). It will look for those 1-Ball.png (etc.) files are in a 'img' directory under 'var/www'.

Cheers,
-Th

EDIT: the line you'r looking for is right here:
https://github.com/HentschelT/RaspberryPints/blob/master/index.php#L167
 
Ah, found what you mentioned in your PM.

You can use phpmyadmin for backup/restore, just add '/phpmyadmin' to the URL of your tap list. Log in using the database login (the one you created for the DB during the first install, not the Pi login). On the left hand side, you'll see a 'raspberrypints' database, click on that, then click the 'export' tab on the top. The defaults in that tab should download you a .sql file which contains instructions to recreate the table structure and the current data. Save that file. To restore, use the 'import' tab and browse for the .sql file that you created before.

Cheers,
-Th

hmmm, dwygrsshpr, so I just thought about this, and the above may not work for you since the db structure most likely changed from the version that you have to what it is now. You should still be able to save and restore your beers and kegs, but I think you'll have to redo the tap list (since I added the calibration per tap to it, the old db that you have doesn't have that and may make things fail).

To save the beer list:
* use phpmayadmin and log into the db as mentioned above
* click on the raspberrypints db on the left
* click on the 'beers' table on the left
* click on the 'export' tab on the top
* save the beers .sql file (hit 'go')

repeat this for the 'kegs' table, save to a separate file

Once you're done reinstalling,
* again log into phpmyadmin
* raspberrypints on the left
* click on beers table
* use the 'import' tab, find your 'beers' .sql file earlier, hit 'go'

repeat the same for the 'kegs' file saved earlier.

So, the difference here is that we only save the two DB tables that we're gonna restore into the new install, and not the entire DB, which probably won't work since the tap config structure has changed. Re-create the tap config via the web interface.

Cheers,
-Th
 
Too late.

But, no worries! I already have your latest version installed. Losing the recipe data is no big deal as I was only messing around and wanted to learn how to back that up anyway.

I now have two spanking new img files: before and after RPints install. I will edit the database and save that img. Once that's done, it's onto the tap handles.

Thanks for the continued support!


EDIT: I cannot Save Tap Config now. Did I miss something during the set-up? Does it have to do with permissions in the /var/www folder? I just checked and it looks like I have it across the board (ie chmod -R 777 /var/www
 
EDIT: I cannot Save Tap Config now. Did I miss something during the set-up? Does it have to do with permissions in the /var/www folder? I just checked and it looks like I have it across the board (ie chmod -R 777 /var/www

Attach the file /var/log/rpints.log (the whole file). I have a feeling one of the DB tables is corrupt or still has the old structure. That log file will tell me.

Cheers,
-Th
 
That may be it. I haven't done the install yet (Step 9) for the flow meters. I am signing off for the night. I will get the flow control in the morning and report back.
 
sudo chmod -R +rw /var/www/*

Cheers,
-Th

Ok, I finally got to the end, installing the DB and Creating connection files. However I am getting the same errors even after I run sudo chmod -R +rw /var/www/*

Errrr, my apologies. It is working now!

configFilesError.PNG
 
Last edited:
That may be it. I haven't done the install yet (Step 9) for the flow meters. I am signing off for the night. I will get the flow control in the morning and report back.

Capt'n my Capt'n

I have a fresh install with the latest/greatest from your git. I have my alamode all soldered up but I have not attached any flow meters yet. Can I run/debug without attaching them or do I need to hook at least one up? I can breadboard that if I have to, but want to know the best way to proceed.

I am not sure about the earlier errors as I feel like every time I run a fresh install something different bombs out.
 
Capt'n my Capt'n



I have a fresh install with the latest/greatest from your git. I have my alamode all soldered up but I have not attached any flow meters yet. Can I run/debug without attaching them or do I need to hook at least one up? I can breadboard that if I have to, but want to know the best way to proceed.



I am not sure about the earlier errors as I feel like every time I run a fresh install something different bombs out.


You should be ok w/o the meters.

Cheers,
-Th
 
First problem was I did not finish your instructions per post 1402 .

I have done so now. Next question: does the alamode board need to be plugged in? Seems like the log file is asking for it?

I am treading lightly here obviously.
 
First problem was I did not finish your instructions per post 1402 .



I have done so now. Next question: does the alamode board need to be plugged in? Seems like the log file is asking for it?



I am treading lightly here obviously.


Yes, it needs to communicate with the board.

-Th
 
alamode board is attached and I am running power through it to the Rpi (this post coming from the Rpi). I have attached the log file. If I was cooler, I could add it as a txt file for you to read but my unix is still weak. screen cap is all I could manage this late in the evening

2016-01-24-231732_809x977_scrot.png
 
alamode board is attached and I am running power through it to the Rpi (this post coming from the Rpi). I have attached the log file. If I was cooler, I could add it as a txt file for you to read but my unix is still weak. screen cap is all I could manage this late in the evening

Yes, the entire file would be sorta required to debug this properly.

One thing I can see, however, is that the flow counting is not enabled in the preferences. There was a post awhile back where I think I mentioned it (it's getting tuff to keep track of them all...), but you need to start out with everything but 4k support enabled in the pref's (the little gear in the upper right corner). It's the first section that says show/hide columns. Try to set things up with everything on but 4k, and you should be able to set things in the tap config. Also, you need to hit 'Save Tap Config' on each entry (each tap) individually for it to take that tap. I know that's kinda lame, but the best I was able to do within the limits given. Once you got all your taps setup, you can disable what you don't use in the preferences again (like fan control etc), I think it just needs it once.

Next time please get the whole rpints log file. You can rename it to .txt if the forum doesn't let you attach otherwise, or use a service like pastebin and just post the link to that. If you're having trouble getting that file off the Pi, there is a free program called 'filezilla', google for it, you can get files from the Pi to your computer that way.

Cheers,
-Th

EDIT: BTW, I'll make a note of it, I think I could just enable all this stuff in the default database that's loaded on first boot in a bug fix release.
 
I turned every service on except the 4k monitor support. Same thing happens: I can edit the fields for a tap but as soon as I click on "save tap config" it blanks all the values back to zero. I only have one tap in the list right now just for the sake of troubleshooting this.

This is a link to my most recent log file: https://drive.google.com/file/d/0B1jZ8P9yVbHQOUtzbnNneUtXR1U/view?usp=sharing

this forum only allows image files
 
I turned every service on except the 4k monitor support. Same thing happens: I can edit the fields for a tap but as soon as I click on "save tap config" it blanks all the values back to zero. I only have one tap in the list right now just for the sake of troubleshooting this.

This is a link to my most recent log file: https://drive.google.com/file/d/0B1jZ8P9yVbHQOUtzbnNneUtXR1U/view?usp=sharing

this forum only allows image files

Ok, much better to see whats going on. From what I can tell, is that you still have the number of taps set to 0. You need to set that number 1st (it's all the way on top), and hit "Update number of taps". If you've done that before while the service wasn't running, try doing that again, choosing a different number (i.e. 2), and then reset it to 1, hitting "update" each time. It may have gotten into a inconsistent state when that service wasn't running and you were trying to set things up.

Cheers,
-Th
 
No Joy. I restarted the flow service from the home screen. and did as you asked. Last night I was monkeying around from the command line trying to start and stop the service as well as go into the code from the original RasPints - it seemed to me there was a place where the tap count was zero? I know enough to be dangerous but I am pretty sure I was careful to not make any butter finger mistakes while I was looking around.

Is there some CLI things we can do to prompt different errors with the flowmon service?
 
No Joy. I restarted the flow service from the home screen. and did as you asked. Last night I was monkeying around from the command line trying to start and stop the service as well as go into the code from the original RasPints - it seemed to me there was a place where the tap count was zero? I know enough to be dangerous but I am pretty sure I was careful to not make any butter finger mistakes while I was looking around.

Is there some CLI things we can do to prompt different errors with the flowmon service?

Main thing we'd still need is the rpints.log to see what happened when you changed the tap count. If you restarted the service since, that's gone, so need to do that again (+ change a tap setting).
In addition, there is the error log of the web server that might be helpful, its in
/var/log/apache2/error.log, attach/link that as well.
I'm starting to think your DB is somehow messed up. Did you restore the DB from a backup, and was it the entire rpints db? Use phpmyadmin to export the 'config' and 'tapconfig' tables and attach those too.

There isn't that much you can do from the CLI, it's all driven from the sql db.
Cheers,
-Th
 
Steps taken:

1) reboot
2) RasPints come up with one tap shown (logo and header scripts okay)
3) goto login page (default is user is 'localhost' - I change to 'admin' with no password).
4) changed number of taps to '2' and updated. two taps showing in admin page and homepage
5) reboot
6) two taps showing on homepage

I did not import any databases. attached are what you ask (+ taps.sql):

rpints.log: https://drive.google.com/file/d/0B1jZ8P9yVbHQUUYxX2JMZmNCVVE/view?usp=sharing
error.log: https://drive.google.com/file/d/0B1jZ8P9yVbHQT2dUZVRybEtFdjA/view?usp=sharing
config: https://drive.google.com/file/d/0B1jZ8P9yVbHQeVc1UFVQTVRBRmM/view?usp=sharing
taps: https://drive.google.com/file/d/0B1jZ8P9yVbHQM1UwX25JYXlFQ0k/view?usp=sharing
tapconfig: https://drive.google.com/file/d/0B1jZ8P9yVbHQemRsejBvSFd0YVU/view?usp=sharing

I am not sure, but it looks like the database is not reporting accurately as you suspect. Before we get to far, should I go back to an earlier image and reinstall your version of RaspberryPints via post 1402?
 
Steps taken:

1) reboot
2) RasPints come up with one tap shown (logo and header scripts okay)
3) goto login page (default is user is 'localhost' - I change to 'admin' with no password).
4) changed number of taps to '2' and updated. two taps showing in admin page and homepage
5) reboot
6) two taps showing on homepage

I did not import any databases. attached are what you ask (+ taps.sql):

rpints.log: https://drive.google.com/file/d/0B1jZ8P9yVbHQUUYxX2JMZmNCVVE/view?usp=sharing
error.log: https://drive.google.com/file/d/0B1jZ8P9yVbHQT2dUZVRybEtFdjA/view?usp=sharing
config: https://drive.google.com/file/d/0B1jZ8P9yVbHQeVc1UFVQTVRBRmM/view?usp=sharing
taps: https://drive.google.com/file/d/0B1jZ8P9yVbHQM1UwX25JYXlFQ0k/view?usp=sharing
tapconfig: https://drive.google.com/file/d/0B1jZ8P9yVbHQemRsejBvSFd0YVU/view?usp=sharing

I am not sure, but it looks like the database is not reporting accurately as you suspect. Before we get to far, should I go back to an earlier image and reinstall your version of RaspberryPints via post 1402?

Ok, I think I found the problem. Your tapconfig table is missing a column, caused by a missing statement in the install file. It's in the repository, but it didn't make it into the release zip file. Sorry about that...

So, here is how you can fix this. Just follow the steps down below, don't do any extra reboots, resets, etc.

(1) disconnect/close all web browsers that currently display the tap list or RPints config screens
(2) use phpmyadmin to click on the "raspberrypints" database in the upper left area, and select the SQL tab.
(3) execute the following sql script *verbatim*, making sure there are no copy/paste mistakes. Hit 'go' in the lower right corner.
Code:
DROP TABLE IF EXISTS `tapconfig`;
CREATE TABLE IF NOT EXISTS `tapconfig` (
  `tapNumber` int(11) DEFAULT NULL,
  `flowPin` int(11) DEFAULT NULL,
  `valvePin` int(11) DEFAULT NULL,
  `valveOn` int(11) DEFAULT NULL,
  `count` float NOT NULL DEFAULT '1500'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

your table before is missing the 'count' column, with this we're creating it. After this script executes, use phpmyadmin to make sure the 'count' column is now present in the tapconfig table.

(4) try again to add your numbers of taps, and tap config. This should fix it. I will update the release .zip once you tell me that this works.

Cheers,
-Th
 
Oh baby! Looks like that worked! I will continue to test by adding recipes, kegs, and taps - will report results!

Now getting the "let it flow" button at the tap config page

Edit to add: burning an image now.
 
Oh baby! Looks like that worked! I will continue to test by adding recipes, kegs, and taps - will report results!

Now getting the "let it flow" button at the tap config page

Edit to add: burning an image now.

Ok, let me see how I can update that release .zip...

Depending on your flow meters, you'll have to change some of the defaults in the tap config. There are a few posts in this thread that tell you defaults or what to watch out for.
Cheers,
-Th

EDIT: I cut a new release on github, the new link is here: https://github.com/HentschelT/RaspberryPints/releases/tag/th-2.1.1
The old release page now points to this as well.
 
We are at a 100% install with working flow meters. I am playing the swiss flow like a damn kazoo. Many, Many thanks. As i have re-read through the thread several times in the past few days some of the trouble I was having could have been solved with a little more careful reading so thanks for your patience. It is very hard to search this thread with a search count of more than four characters and a lot of information scattered all over the place. That said, I will keep my promise on my install notes and write it all up so that we have a fresh jump-off point.

One question on the swiss flow count/gallon calibration. I have it set at 1680 per your example but it seems like any more than a breath of air will kick it in one blow. I understand that I am probably spinning it a lot faster by lung power than a fluid, but I wouldn't expect that much of a difference. I have the flow meter plugged into Vin but did not put any resistors in-line just for this quick bench test. Could the lack of resistors be the culprit? That doesn't make sense to me since that's just power to the LED and IR receiver...
 
fwiw, I can definitely spin up an SF800 using lung power to WAY higher rpms than the meters in my keezer that are dispensing beer.
You'll also find if you're not quick on the faucet handle when you kick a keg that last pour will be a hella big one ;)

Also, I don't know what version of the host-side code is being discussed at this point, but I have my "Original 2.01 Edition" pours.php "Pulse Count" divisor set to 21120, and my system is scary accurate...

Code:
// Sets the amount to be a fraction of a gallon based on 165 pulses per ounce
$amount = $PULSE_COUNT / 21120;

Cheers!
 
Thanks day!

I just reread back several posts and this was discussed - Captn had a value of 22000 as a good starting point for swissflow.
 
Ok, let me see how I can update that release .zip...

Depending on your flow meters, you'll have to change some of the defaults in the tap config. There are a few posts in this thread that tell you defaults or what to watch out for.
Cheers,
-Th

EDIT: I cut a new release on github, the new link is here: https://github.com/HentschelT/RaspberryPints/releases/tag/th-2.1.1
The old release page now points to this as well.

Captain,

I have been working on the solenoid valves over the last couple of weeks and finally got those working. Using the admin console I went in and set up tap 1 for gpio port 21. When I click on save it will flash and revert back to a blank field. This is Just like when I was having problems saving the flow monitor speed.

From what I learned from you I went in and edited the tapconfig in phpadmin and changed the value there which resolved my problem.

Since I am using the uno I then updated the board manually.

Do I have a sql problem or is it something I am doing? Should I revert my tapconfig back to the zero and send an error file? Could it have been somethin I messed up during installation

Matt
 
One question on the swiss flow count/gallon calibration. I have it set at 1680 per your example but it seems like any more than a breath of air will kick it in one blow. I understand that I am probably spinning it a lot faster by lung power than a fluid, but I wouldn't expect that much of a difference. I have the flow meter plugged into Vin but did not put any resistors in-line just for this quick bench test. Could the lack of resistors be the culprit? That doesn't make sense to me since that's just power to the LED and IR receiver...
The swissflo are quite different in terms of count per gallon, so yes it makes a big difference. The defaults in the software are for the cheaper flow meters. day_tripper already alluded to the count/gallon value, it's probably a good value. One other thing you have to change are the pour trigger count, kick trigger count and update trigger count values below the taps. There is a post in here somewhere where I speculated about good values for those settings, but I don't have those flow meters, so can't say for sure. They all need to be scaled up from their defaults with about the same ratio (21000/1500).

Since you mentioned 'kick', that's probably caused by too low a kick trigger count. In your case it should probably be at least 65 or 70. Basically the idea here is that when your keg kicks and only gas rushes thru the line, the flow count per millisecond goes way up. The software uses that to sense a kicked keg. I'd be interested to see what a sensible value for the swissflo is in that case (along with the other values too)

The pour trigger count is there to avoid 'phantom pours', i.e. line noise or other interference making it look like that there was a actual pour. It's the minimum amount of flow meter ticks that the software needs to receive before it actually considers the recent activity a pour.

update trigger count is the count after which it reports 'milestones' from the alamode to the software on the Pi. If it is too low, it may not get all the messages onto the serial connection and overload (which means you'll be missing counts). It is used to shut off the tap if a single pour is too large (i.e. someone left the tap open) and goes together with the 'pour shutoff count' value in the same screen.

Glad you got things running

Cheers,
-Th
 
Back
Top