[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.
How are you running tap_manager.php?

Could you post the last few lines from /var/log/apache2/error.log

My mistake, my original query was unclear.

Followed your script from #3807 and #4417. Afterwards I was getting the Cannot execute query error. I saw post #4335 where you mentioned getting the latest admin/includes/managers/tap_manager.php
https://raw.githubusercontent.com/r...aster/admin/includes/managers/tap_manager.php

I tried putting them in the /var/www/html/admin/includes/manager folder but nothing changed. Then I attempted to run $ php /../tap_manager.php after downloading it and all 4 of the called php files. (manager.php, tapEvent_manager.php, tap.php, etc. I honestly don't remember the names of all of them, but I had them all downloaded) conn.php was not found in line 2 so I adjusted manager.php to look at the specific location for conn.php. The script did not show any errors at this point, but I am still getting the Cannot execute query when trying to add a tap. I would assume since I ran the install script yesterday again that I would have the most recent tap_manager.php that was updated back in February.

I also did this based on the script directions

pi@raspberrypi:/var/www/html $ sudo -u www-data git pull
Already up-to-date.

I am using an Arduino Uno (official) with my pins in 8, 9, and 10. I am able to add beers, kegs, and taps, but when I select the pin for my tap I get the error. There are no results in the /var/log/apache2/error.log when I run the tap list save function. There are some from a couple hours ago which I will paste to this message

[Wed Jul 24 11:25:10.382455 2019] [:error] [pid 750] [client 192.168.2.120:50582] PHP Notice: Undefined variable: tempDisplay in /var/www/html/index.php on line 177
[Wed Jul 24 11:26:06.878447 2019] [:error] [pid 754] [client 192.168.2.120:50608] PHP Notice: Undefined index: myusername in /var/www/html/admin/left_bar.php on line 8, referer: http://192.168.2.120/
[Wed Jul 24 11:26:06.878697 2019] [:error] [pid 754] [client 192.168.2.120:50608] PHP Notice: Undefined index: showadmin in /var/www/html/admin/left_bar.php on line 77, referer: http://192.168.2.120/
[Wed Jul 24 14:29:57.743459 2019] [:error] [pid 750] [client 192.168.2.120:51556] PHP Notice: Undefined variable: date in /var/www/html/index.php on line 175, referer: http://192.168.2.120/admin/tap_list.php
[Wed Jul 24 14:29:57.750536 2019] [:error] [pid 750] [client 192.168.2.120:51556] PHP Notice: Undefined variable: tempDisplay in /var/www/html/index.php on line 175, referer: http://192.168.2.120/admin/tap_list.php



I do show a serial monitor "alive" repeating over and over for the Arduino but am still having a problems getting the taps selected.
 
Cannot execute query
in conn.php make sure $showSqlState = true;
is not commented out then retry, that should show the exact query that is running if you could post that here I'll take a look at

From the error.log, I just noticed those errors in the index.php and have them fixed locally, but those shouldn't be the issue here
 
in conn.php make sure $showSqlState = true;
is not commented out then retry, that should show the exact query that is running if you could post that here I'll take a look at

From the error.log, I just noticed those errors in the index.php and have them fixed locally, but those shouldn't be the issue here

I changed the location in manager.php to /usr/share/php/conn.php and remove the // in front of $showSqlState = true;

After running tap_manager.php my terminal ended with

<div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;" tabindex="0">
<div class="Popover-message Popover-message--bottom-left Popover-message--large Box box-shadow-large" style="width:360px;">
</div>
</div>

<div aria-live="polite" class="js-global-screen-reader-notice sr-only"></div>

</body>
</html>


Now my error is when I tried to set up the Flow Pins on my Tap List in the webpage as Cannot Execute Query[ INSERT INTO tapconfig (tapid, flowPin, valvePin, valedOn, count, countUnit) VALUES (3, 10, 0, 0, 0, oz)]
 
Welcome to our little corner of HBT, @edost :mug:

What OS releases would you consider your 2.0.5 package to be compatible, and are you planning on testing on Buster?
Also, for which db manager(s) is your fork coded?

Cheers!
 
Hi all. Hope that i am not to late to the party.
i am trying to get my RPi3 up and running with Rpints and keep running into difficulty. I ampretty basic when it comes to computers but will do must best to understand what is going on. I used the link provided by LBussy -
curl -L rpints-tobor.brewpiremix.com | sudo bash to work through the installation which i think went pretty well. i then log into the local host to complete the set up and after typing in the information i recieve the following message:

Validating Entries...
Success!
Checking DB connectivity...
Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /var/www/html/install/includes/configprocessor.php:79 Stack trace: #0 {main} thrown in /var/www/html/install/includes/configprocessor.php on line 79

so it seems that somewhere i have messed up. i dont know enough about linux/debian etc to be able to work through it and hope that someone here can point me in the right direction of how to work through the problem.

Thanks in advance...
 
Flow Pins on my Tap List in the webpage as Cannot Execute Query[ INSERT INTO tapconfig (tapid, flowPin, valvePin, valedOn, count, countUnit) VALUES (3, 10, 0, 0, 0, oz)]
Thanks, that pointed me in the right direction.

Get the latest tap_manager.php and try again
 
@day_trippr To preface, I am not a programmer nor a sysadmin of any kind. When I started working on this, there wasn't any activity here in a while. My goal was to just get it working. I had a new Pi Zero W running Stretch. I took the Version 2 of the main repo and added in all of the mysql fixes that kmasaryk issued as a GitHub PR and started growing version 2 on my repo.

I'm at the point now where v2.0.5 is working on my system. As soon as I finish the documentation, I'll merge that into my master and I'll issue another PR to the main repo. I don't expect that to get merged since that seems dead though.

RandR's fork might be the better one to use, but I didn't want my work be for nothing :) Hopefully someone finds it useful.
 
Hi all. Hope that i am not to late to the party.
i am trying to get my RPi3 up and running with Rpints and keep running into difficulty. I ampretty basic when it comes to computers but will do must best to understand what is going on. I used the link provided by LBussy -
curl -L rpints-tobor.brewpiremix.com | sudo bash to work through the installation which i think went pretty well. i then log into the local host to complete the set up and after typing in the information i recieve the following message:

Validating Entries...
Success!
Checking DB connectivity...
Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /var/www/html/install/includes/configprocessor.php:79 Stack trace: #0 {main} thrown in /var/www/html/install/includes/configprocessor.php on line 79

so it seems that somewhere i have messed up. i dont know enough about linux/debian etc to be able to work through it and hope that someone here can point me in the right direction of how to work through the problem.

Thanks in advance...

Was php installed? the mysqli_connect() call is missing.
 
I'm pretty sure that's a credentials issue from filling in the initial php template incorrectly. As Lee B. can testify I ran into it a few times while he flew right through the same block.

Turned out I was mis-understanding which credentials to use where in the template. Eventually I got it right...

Cheers!
 
[...]Can someone point me to the no-fail grocery list to get started with?

I'm not sure exactly what's available in the market for Raspberry Pi models today. I would guess the Zero/Zero-W, the 3B, and the 3B+. with the 4B to become widely available very soon (couple of weeks?).

I would stay away from the 4B for now, not the least of which for the teething issues, plus it's such massive overkill for this task it's not worth dealing with its power consumption and thermal dissipation issues. I'd also avoid both Zero versions as single core and small memory really does slow down the RaspberryPints gui response (I used to run my tap list on a Model B which is just a standard Pi-size version of the Model Zero and there were occasions where it took a couple of seconds to update the tap list after a pour).

A 2B or higher makes updates blink-quick, but I don't think the 2B is available any longer, so that leaves the 3B and 3B+. I have gotten RaspberryPints running on both, so I recommend either of those.

If you're going to run flow meters, I recommend the SwissFlow SF800 if you can handle the cost, otherwise some folks have used much less expensive meters available from Adafruit and many other sites.

I also recommend using an Arduino UNO (or a Mini) instead of the Alamode hat. UNOs are hella cheaper than Alamodes and support is virtually built in to Raspbian, while the viability of Alamode support is questionable under Stretch and even more so for Buster.

hth

Cheers!
 
Thanks, that pointed me in the right direction.

Get the latest tap_manager.php and try again
That worked! Now I just have to set up the adafruit flow meters for the correct number of pulses/oz. I did hook up the rx/tx from my Arduino Uno to my rpi and see minor reductions from the sample data. Thanks again.
 
I'm not sure exactly what's available in the market for Raspberry Pi models today. I would guess the Zero/Zero-W, the 3B, and the 3B+. with the 4B to become widely available very soon (couple of weeks?).

I would stay away from the 4B for now, not the least of which for the teething issues, plus it's such massive overkill for this task it's not worth dealing with its power consumption and thermal dissipation issues. I'd also avoid both Zero versions as single core and small memory really does slow down the RaspberryPints gui response (I used to run my tap list on a Model B which is just a standard Pi-size version of the Model Zero and there were occasions where it took a couple of seconds to update the tap list after a pour).

A 2B or higher makes updates blink-quick, but I don't think the 2B is available any longer, so that leaves the 3B and 3B+. I have gotten RaspberryPints running on both, so I recommend either of those.

If you're going to run flow meters, I recommend the SwissFlow SF800 if you can handle the cost, otherwise some folks have used much less expensive meters available from Adafruit and many other sites.

I also recommend using an Arduino UNO (or a Mini) instead of the Alamode hat. UNOs are hella cheaper than Alamodes and support is virtually built in to Raspbian, while the viability of Alamode support is questionable under Stretch and even more so for Buster.

hth

Cheers!

Cool, thanks for the tips. I checked out the flow meters, those swissflow ones are A LOT more expensive! Like $60 apiece vs $10. Do the adafruit ones work just as well? And/or are they a pain to setup compared to SwissFlow models? With 4 taps, this will become a pricey endeavor!

Also, from what I can glean reading some of these posts, you want to place the flow meters as close to the keg end as possible. With these needing to be wired and my kegs connected via ball lock quick disconnects, I'm wondering how to keep the wiring clean and orderly for when I need to change out kegs. Anyone got some photos of their build they can share?
 
Yeah, the SF800 is a pricey bastid but it's quite accurate at +/- 1% rating. Full list price would give me pause.
I was fortunate to pick mine up plus a couple of spares off eBay back in the spring of 2014 for $20 each, delivered.

The model SF800 I bought had a 100cm (~40 inch) cable attached and terminated with a 3 pin inline female header. I cut those off and used 3-pin "TinyXLR" plugs, then installed a patch panel to the keezer lid liner, which in turn ends at a 37 pin D-sub installed in the metal lid. That's cabled to a control unit which is on a sliding rack mount installed in the keezer dolly.

brewpints_47.jpg

There's enough length in the meter cables that swapping kegs isn't hindered. I have my beer lines cable-tied in loops that nestle inside the rubbers at the top of the kegs with the flow meters at the bottom of each loop. The meter cables run in parallel to the beer lines so it's pretty each to move everything out of the way when swapping kegs.

keezer_back.jpg


It's crazy back there! :)

Anyway, there are lots of ways to get signals and power in and out of keezers and kegerators. I have power for heaters and fans and multiple temperature sensors running into my three fridges as well, just need to figure out safe places to drill holes for bulkheads. For that you can usually find decent diagrams on replacement parts sites...

Cheers!
 
Was php installed? the mysqli_connect() call is missing.
Thanks for the insight into what may be the issue. I shall check when i get home and see if it was installed, the version and if it is running correctly.
I was under the impression that the curl -L link would have installed everything though - am i correct in this assumption, or just being lazy/wishful thinking?
 
If you're running Lee B's installation script, it installs literally everything needed for Tobor's R'Pints fork.
Again, make sure you're filling in the initial RaspberryPints credentials template correctly. I've been running R'Pints longer than anyone and I still managed to fill it out wrong numerous times...

Cheers!
 
That worked! Now I just have to set up the adafruit flow meters for the correct number of pulses/oz. I did hook up the rx/tx from my Arduino Uno to my rpi and see minor reductions from the sample data. Thanks again.

I have one last question, I hope. I downloaded and ran the temp php files that you updated a month ago. I can see the temp probe in the configuration, but it's not adding any data in the upper corner of the screen even though I have that selected in the configuration. After running the new php files I got another Cannot Execute Query error on the temp probe manual data. There was nothing saved in the /localhost/phpmyadmin for the temp probe historical data.
 
It's crazy back there! :)

MrteY7h.jpg


That's a lot of stuff going on back there! OK that gives me some ideas though, my beer lines are currently a mess, having them nicely coiled on top of the kegs is a must. How much length did you go with between keg and tap? I'm thinking I'll just redo the lines, what kind of tubing did you use? Also those fittings on either side of the flow meters, what are those exactly?
 
Thanks for the insight into what may be the issue. I shall check when i get home and see if it was installed, the version and if it is running correctly.
I was under the impression that the curl -L link would have installed everything though - am i correct in this assumption, or just being lazy/wishful thinking?

In /var/www/html create a file named info.php

In the info.php put
<?php
phpinfo();
?>

save the file

In the browser surf to http://localhost/info.php
 
If you're running Lee B's installation script, it installs literally everything needed for Tobor's R'Pints fork.
Again, make sure you're filling in the initial RaspberryPints credentials template correctly. I've been running R'Pints longer than anyone and I still managed to fill it out wrong numerous times...

Cheers!

If the passwords are not correct he should have gotten an invalid login or can't connect to the database and not "Uncaught Error: Call to undefined function mysqli_connect()"

Here is the code, processing would not have blown up, the error would appear.
$validerror .= '<strong>Cannot connect the the database using the supplied information.</strong><br />';

Processing is complaining as it doesn't know mysqli_connect()

configprocessor.php is part of the setup. It processes the values entered into the form
 
After running the new php files I got another Cannot Execute Query error on the temp probe manual data
Did it give you the sql statement that errored out?

Also I have to admit I don't actually have temp probes I just manual test the code and found that I didn't do a good job of testing the logging after my latest change.

Get the latest /python/PintDispatch.py
it fixes the inserting the temp log
 
Old ethernet cables are great for extending flow meter cables. You'll need to tell us which flow meters you are using so we can help you figure out which wire is 5v, data and GND.

Cut the end off of the ethernet cable. Splice together all of the 5v meter wires to one ethernet wire, all of the GND meter wires to another ethernet wire, and then each individual data wire to a different color ethernet wire. Then cut off the other end of the ethernet cable and use Dupont wires like these https://www.amazon.com/dp/B01EV70C78/?tag=skimlinks_replacement-20 to connect the ethernet wires to the arduino. Cut off one end of the Dupont wires and splice it to the ethernet wire. Use the other end, either a male or female Dupont connector depending on your arduino connection, to connect to the arduino pins. Don't solder the wires directly to the arduino.

This is a really good idea, I'm glad my search turned this one up!

I haven't worked with a Pi before so I'm eager to learn but I have done work with Arduinos.

Question on connections, for Arduino they make these screw connector terminals like this: https://i.imgur.com/0ByiZLK.jpg Do they have something like this that just snaps over the GPIO pins without having to solder anything? I find these screw terminals are much better for these builds once you've completed your testing you can lock in your wires and don't have to worry about anything coming apart.
 
If the passwords are not correct he should have gotten an invalid login or can't connect to the database and not "Uncaught Error: Call to undefined function mysqli_connect()" [...]

Whatever, this is the exact message I got every time I filled the template incorrectly:

"
Validating Entries...
Success!
Checking DB connectivity...
Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /var/www/html/install/includes/configprocessor.php:79 Stack trace: #0 {main} thrown in /var/www/html/install/includes/configprocessor.php on line 79"

Cheers!
 
Did it give you the sql statement that errored out?

Also I have to admit I don't actually have temp probes I just manual test the code and found that I didn't do a good job of testing the logging after my latest change.

Get the latest /python/PintDispatch.py
it fixes the inserting the temp log

Thanks again. That gave me some errors related to /usr/lib/python2.7/run.py and py.compile.py. I'll look around through the forum to see if others have got their temp probes working. Everything else works great. Appreciate it all.
 
This is a really good idea, I'm glad my search turned this one up!

I haven't worked with a Pi before so I'm eager to learn but I have done work with Arduinos.

Question on connections, for Arduino they make these screw connector terminals like this: https://i.imgur.com/0ByiZLK.jpg Do they have something like this that just snaps over the GPIO pins without having to solder anything? I find these screw terminals are much better for these builds once you've completed your testing you can lock in your wires and don't have to worry about anything coming apart.


After some digging I managed to find an answer to my own question. This is what I was looking for:

https://www.amazon.com/gp/product/B01M27459S/ref=ox_sc_act_title_2?smid=A2OVMUS055KMW5&psc=1
 
I don't use the flow meters, but I've been updating raspberry pints on my GitHub. Feel free to see if this will help you at all. You'll want to pull from v2.0.5. I'm slowly adding documentation to that version before merging to my master.

https://github.com/ericdost/RaspberryPints

admin/includes/managers/tap_manager.php hasn't had mysql_query replaced on line 75.


Dave
 
Would it be possible for you to put your github link in your signature?
I found a link to a zip file, but I guess it's not on Github.

Also, in install/index.php, moving the <script>...</script> section from the top to after the </body> tag will get rid of the error that $ can't be found (because jQuery isn't yet defined.)

At the end of the install, there's a big error that displays. That's probably a known issue, but just thought I'd point it out. (Due to the file not existing, but as you mentioned, try/catch would be nice)


Dave
 
Last edited:
I found a link to a zip file, but I guess it's not on Github.

Also, in install/index.php, moving the <script>...</script> section from the top to after the </body> tag will get rid of the error that $ can't be found (because jQuery isn't yet defined.)

At the end of the install, there's a big error that displays. That's probably a known issue, but just thought I'd point it out. (Due to the file not existing, but as you mentioned, try/catch would be nice)


Dave

Numerous testers didn't run into this issue. What is different with your setup?
 
Are a few HBT'ers willing to collaborate on making a coherent and complete Raspberry Pints available? I'm writing about the code I did, tested flow meter tweaks (since I don't use them) and a complete and thorough install script? Then we'll put everything on github giving credit to all those involved in the project.

Contact me directly and let's do this for those struggling thru, what now 118 screens, posts.
 
I found a link to a zip file, but I guess it's not on Github.

Also, in install/index.php, moving the <script>...</script> section from the top to after the </body> tag will get rid of the error that $ can't be found (because jQuery isn't yet defined.)

At the end of the install, there's a big error that displays. That's probably a known issue, but just thought I'd point it out. (Due to the file not existing, but as you mentioned, try/catch would be nice)


Dave

Raspberry Pints version 1.0.0.369 index.php has calls to jQuery 2.1.0 so this wasn't something I added new in my version. In other words, jQuery 2.1.0 is needed and has been needed by Raspberry Pints.

The jQuery file is in the install\includes folder. Why is this file missing?
 
Last edited:
Like Pam said in post 4698.

Interesting to read this thread as outsider, to the digital aspect that is...still making good beer analog,.. you guys just set things and go to your day jobs?
 
Just find it a interesting corner of the brewing, no offense, just curious to what this tech aspect adds.

Open to learn new things...I know what a raspberry is, digital wise. Just unsure of what is being achieved by it.
 
Are a few HBT'ers willing to collaborate on making a coherent and complete Raspberry Pints available? I'm writing about the code I did, tested flow meter tweaks (since I don't use them) and a complete and thorough install script? Then we'll put everything on github giving credit to all those involved in the project.

Contact me directly and let's do this for those struggling thru, what now 118 screens, posts.

I helped test Lee B's installation script and thus have your code running sans flow meters on one of my test beds (a 3B+, fwiw).
Tbh after that I had pretty much given this path up as the lack of flow meter support is a total show-stopper. But if you're willing to try to get that working I'm willing to test whatever you come up with...

Cheers!
 
Back
Top