• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

[Version 2 Release] RaspberryPints - Digital Taplist Solution

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
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
 
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

Yes, attaching the rpints log file would be really helpful.

BTW, you don't have to reflash the arduino unless there is a new release in software for it (I'll note that if thats the case). All the parameters should be now uploaded to the alamode/arduino automatically when needed, so it's not really necessary.

It's ok to change the DB via phpmyadmin as long as the correct datatypes etc are used. Not sure whats going on in your case, so the rpints log file is needed. And your tapconfig and config table sql files would help too.

Cheers,
-Th
 
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)

That makes perfect sense. Blowing through the swissflow caused the code think CO2 was rushing and kicked the keg for me. I was experimenting with smaller "puffs" and was able to watch it drop a little slower (still a 1/4 keg at a time!).

I am now burning another image. Will backup my beer and keg list DBs and reinstall one more time from scratch using your latest zip file that you pushed. This will then turn into the final install notes.
 
each relay has 3 contacts on the output side: The normally-open (NO) contact, the normally-closed (NC) contact and the movable contact that switches between the two. If you look from the top on each relay, NC is left, NO is right, and movable in the middle.

You go from your 12V supply (X5) to the movable, and from NO to one contact of the solenoid. The other side of the solenoid goes to ground (X4).

Also, one thing I did not mention (but which is standard practice for anything that switches a inductive load) is to add a flyback diode across the two solenoid contacts - otherwise, when opening the relay contacts the coil in the solenoid acts like the ignition coil in your car and creates a large voltage spike. The flyback diode limits that. Attached is a small diagram for illustration, but google helps too. You can get 100 of them for 2 bucks, need one for each solenoid:
http://www.amazon.com/dp/B00LUJFFAU/?tag=skimlinks_replacement-20
Make sure the polarity is correct.


Cheers,
-Th

EDIT: make sure that the solenoids work for your beer lines before you wire all this up. Connect the beer lines to your solenoids and flow counter, use the 12 power supply to open the solenoid, and make sure the beer pours to your liking. Hate to see you go thru all this and then it only creates foam...

Could you just review for me?

On your pictures where does the green ground go that comes in from the DC power jack socket?

From the power jack white goes to port 1 on x5 (12v)

From the power jack black goes to port 1 on x4 (ground)

Power converter red input cable goes to port 2 on x5 (12v)

Power converter black input cables goes to port 2 on x4 (ground)

Power converter output (5v) red cable goes to x1 port 1 (5v)

Power converter output (5v) yellow cable goes to x4 port 3 (ground)

Thanks

Mafoley
 
Last edited by a moderator:
Could you just review for me?

On your pictures where does the green ground go that comes in from the DC power jack socket?

From the power jack white goes to port 1 on x5 (12v)

From the power jack black goes to port 1 on x4 (ground)

Power converter red input cable goes to port 2 on x5 (12v)

Power converter black input cables goes to port 2 on x4 (ground)

Power converter output (5v) red cable goes to x1 port 1 (5v)

Power converter output (5v) yellow cable goes to x4 port 3 (ground)

Thanks

Mafoley

Yes, looks good. The green is ground, since I used a plastic enclosure it's not hooked to anything. If yours is metal, hook it to your enclosure.

Cheers,
-Th

EDIT: Did you ever flow beer thru your solenoid? How'd it flow?
 
First install note:

please add

sudo apt-get install git

to the install notes in the 2.1.1 repository - I have missed that twice during installs.

Edit to add: github has been down for maintenance tonight but as it comes back, the link to the zip file is still showing an error. That may still be there problem - I am signing off tonight on this step

edit to add #2: belay my last - downloaded!
 
Yes, looks good. The green is ground, since I used a plastic enclosure it's not hooked to anything. If yours is metal, hook it to your enclosure.

Cheers,
-Th

EDIT: Did you ever flow beer thru your solenoid? How'd it flow?
Oh boy they know me well at lowes after the 14 visits in two days.

First problem do not go the brass fitting route as I had so much foam.

I then switched out to PVC... Connected on both ends I added repair fittings so that I can take the flow meter and solenoid valve out so that I can clean the lines. Before the solenoid I also added a PVC shut off so that I can take off the flow valve and solenoid. Prior I had to open the keezer lid, turn the air off, then undo the coupler. This made life much easier. Though I do like lifting the lid for the freezer when friends are present as I press a keyfob which activates an electric 18" actuator which lifts the lid.

I have a 5 ft line that runs from the freezer to the keezer. Then have shut off valve to shut off solenoid. Between I reduce down to 3/8 barb and run 1 ft of beer line to flow meter. Back to 5 ft of beer line that I have coiled up to the tap. Prior I only had 1 ft. Adding the extra 4 ft was key for me.

Temp of freezer is 36
Keezer is 38

Also, laying the solenoid horizontal was better than vertical.

I did take the inline filter out of the solenoid as well.


Also, did you ever get a chance to play with the alamode I sent?

Matt
 
Just a heads up in case anyone had tried to download the .stp file for the raspberry pi case designed with for mounting an alamode board that the file for the bottom part of the case was not a true solid model and basically just a renamed .stl file, but I have since updated the thingaverse page with the correct file.

Thanks to dwygrsshpr for the heads up.

-Cheers!
 
Hi Captn,

I have just finished a completely new install based on your latest zip from github and there is still something amiss (I think). I followed all my install notes as I believe they are but I am not getting flow metering.

When I restart flowmeter service from the admin screen I get the following error in the header of the page:

Code:
restarting flowmon service: ,return var: int(1) , output: array(1) { [0]=>string(53) "sudo: no tty present and no askpass program specified" }

It's hard to read but I think I typed it accurately. I did not have this issue with my other install; still attempting to follow all the steps such that we can have that clean install directions for your edition.
 
I think we got two different problems here:
Hi Captn,

I have just finished a completely new install based on your latest zip from github and there is still something amiss (I think). I followed all my install notes as I believe they are but I am not getting flow metering.
This is the 1st one: I need to see the rpints.log for that - if possible from 1st boot thru tap config until you attempt a pour. Can't say 'til then for sure, but with the logs, I'm sure we'll get it to work.

Just to keep up with different installs: You don't have actual (physical) tap valves/solenoids, correct?

When I restart flowmeter service from the admin screen I get the following error in the header of the page:

Code:
restarting flowmon service: ,return var: int(1) , output: array(1) { [0]=>string(53) "sudo: no tty present and no askpass program specified" }

It's hard to read but I think I typed it accurately. I did not have this issue with my other install; still attempting to follow all the steps such that we can have that clean install directions for your edition.

Issue #2, yes, something I missed in the announcement about the reboot/restart stuff (I kept wondering at the time that there was something I was missing). There is a change you'll have to make to the /etc/sudoers file, but I'm traveling right now, so I don't have access to my dev system. I'm home for the weekend, I'll post here what needs to be added. No need to reinstall, just another relatively simple item for the install instructions to make this work.

I really appreciate that you're going thru this, and provide feedback and install notes. :mug:
There's things I did to my system just out of habit, but they're not necessarily default. That's why what you're doing really helpful!

Cheers,
-Th
 
I knew you were going to ask for the log file and I felt a little foolish not attaching it directly but I was getting frustrated. I enjoy working through this with you so I am glad you don't see our endless questions as a burden. Making this a simple and robust install is where I would like to end up for the community.
 
Attached are links for the error.log and the rpints.log.

I ran a new install tonight based on everything I have learned and I would say there is still something wrong in 2.1.1 Additionally, in this latest install when I try to restart the flowmeter service I see some more notes in the page header; basically three golden rules for the Admin.

This latest install was not without trouble - I have no idea why the Pi can be so flaky when I am executing the exact same CL prompts as before. I have noticed that traffic on my home network can play a role as well as trying to run simultaneous tasks on the Pi - it's just not built for that. I really need a quiet network to be sure everything is coming down as asked.


These are from yesterday - I have not attached today's. one step at a time. Will probably start over again tomorrow with a new install.

error: https://drive.google.com/open?id=0B1jZ8P9yVbHQNkN1TGJVMTNlc1U
rpints: https://drive.google.com/open?id=0B1jZ8P9yVbHQYnRpU3ZaWERIcFU
 
Hi Cap,

Hope you had a safe return. I ran a fresh install just now. It hiccupped on the very first step of updating the wheezy install but just ran that CMD again and was GTG. Attached is a screen shot of today's rpints log as well as the link to the full file. Sorry I didn't get permissions right last night - it was late...

It looks like we have a pin problem? FWIW, I have the swisflow plugged into #5 and that is what is set in the tap config page. I have not messed with restarting/rebooting as you seem to know what's happening there.

I am NOT running valves at this time but would like to exercise that in the future once I get through this hurdle. I do have the one install that worked backed up to an image but I want to be sure others can follow my steps. You deserve a break!

2016-01-30-182018_657x392_scrot.png


View attachment rpints.xml
 
Hi Cap,

Hope you had a safe return. I ran a fresh install just now. It hiccupped on the very first step of updating the wheezy install but just ran that CMD again and was GTG. Attached is a screen shot of today's rpints log as well as the link to the full file. Sorry I didn't get permissions right last night - it was late...

It looks like we have a pin problem? FWIW, I have the swisflow plugged into #5 and that is what is set in the tap config page. I have not messed with restarting/rebooting as you seem to know what's happening there.

I am NOT running valves at this time but would like to exercise that in the future once I get through this hurdle. I do have the one install that worked backed up to an image but I want to be sure others can follow my steps. You deserve a break!

Got in this morning after getting delayed, so had to catch up on some sleep :)

The pin message you can ignore, that's for valve/solenoid configuration. It indicates that a valve pin is set incorrectly (0), but no harm is done. I should probably take that out, it just has the potential for confusion.

From the attached log file I can see that flow meters are not enabled (in the little gear config screen), so if it doesn't report flow, that's probably why.

In the rpints log from yesterday it showed that the python MySQLDB module was missing. Any chance you missed that during the install, or that the site where it gets downloaded from was not reachable?

The reason why I was asking about the valve/solenoids is that those have the potential to reset the alamode if there is no flyback diode installed. Everything else will work, but no flow updates in that case. I was just trying to eliminate that possibility.

As far as the shutdown/reboot command: Add the following at the end of your /etc/sudoers file using
sudo visudo

Code:
www-data ALL=(ALL) NOPASSWD: ALL
Defaults:pi   !requiretty

You have to reboot after adding this. This is something that needs to go into the install instructions.
Thanks for all the help.

Cheers,
-Th
 
welcome home and welcome back. I DO have the flow monitoring switched to "on" in the personalization settings (I assume that going through the gear and the personalization tab on the left hand side is the same thing right?)

I just shut the valves and fan off. I will add the shutdown and reboot commands now and report back. After the reboot I will check flow and also report back/
 
From the attached log file I can see that flow meters are not enabled (in the little gear config screen), so if it doesn't report flow, that's probably why.

Ok, I think I see something here. You may enable the flow meters, but it still doesn't update. That's b/c the flow mon service reads those 'enabled' values only once on startup, and then never again. Which means the part that does the flow counting never gets started in the service, but will get started on the next flowmon restart.

So, for now until I get around to fixing this, on first start (and only needed there), enable valves/flow monitoring/etc in the little gear config screen, then restart the service, before going ahead and setting up the taps and pins. I'll see what I can do about fixing this...

Cheers,
-Th
 
adding those lines of code to the sudoers file is now preventing me from rebooting from the CLI or GUI.

~$ sudo reboot
sudo: parse error in /etc/sudoers near line 31
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin


Now, I am getting wise in the ways of things. so I backed up the original sudoers files and also added a comment in the file I modified so I can comment out the recent addition. Based on the way the second line of code looked, I added three spaces between the "pi" and the "!". In days long gone, I seem to remember that spaces could be interpreted as carriage returns. Is that the problem?

Edit to add: It is also preventing me from copying my back-up back over top with the same error! Trust me, if there is a way to break something at the CLI, you've found your man
 
adding those lines of code to the sudoers file is now preventing me from rebooting from the CLI or GUI.

~$ sudo reboot
sudo: parse error in /etc/sudoers near line 31
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin


Now, I am getting wise in the ways of things. so I backed up the original sudoers files and also added a comment in the file I modified so I can comment out the recent addition. Based on the way the second line of code looked, I added three spaces between the "pi" and the "!". In days long gone, I seem to remember that spaces could be interpreted as carriage returns. Is that the problem?

I don't think the spaces should be the problem. It's complining about a syntax error in that file, line 31. Could you paste what's on that line (which one of the two above). Also, I think the 2nd line may not even be needed, so try with just the 1st line that starts with www-data.

Also, it's possible that somehow the account that apache runs under is different. To check that, please paste the output of
ps aux | grep apache
for me. Perhaps I got the wrong account for that line.

Cheers,
-Th
 
I cannot command a reboot so will have to pull the plug. I assume on restart that I will not be able to get back into the sudoers file and undo what I just did.

Wait one....

Edit: I broke something for sure. All sudo prefixed commands report same error. Unix idiot right here <-- There was a comment line in the beginning of the sudoers file that suggested that changes get made to the sudoers.d file instead - does that make any sense?
 
I cannot command a reboot so will have to pull the plug. I assume on restart that I will not be able to get back into the sudoers file and undo what I just did.

Wait one....

Edit: I broke something for sure. There was a comment line in the beginning of the sudoers file that suggested that changes get made to the sudoers.d file instead - does that make any sense?

Yes, I guess I missed that you have to edit this via 'visudo', drats, I hope you got a backup of that file, sorry.
You can also add a file to the /etc/sudoers.d directory, the file cannot have a . (dot) in its name but otherwise you're free to pick a name. You can add the instructions there. But using 'sudo visudo' to edit /etc/sudoers will do too.


Cheers,
-Th
 
Back
Top