[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.
ok I found a few issues with my tempProbe code. Somehow my testing didn't reveal the issues even though they are very obvious.

As for the name, that should be populated with the probe device id from the devices directory, but that was one error in my code. The name will not be editable as that is from the 1wire, but you can add a description to the notes field

The changes are committed. To update go into the base directory of RPints (i.e cd /var/www/html) then do sudo git pull
 
Hi @RandR+,

This is the output:
pi@raspberrypi:/var/www/html $ sudo git pull
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 7 (delta 5), reused 2 (delta 0), pack-reused 0
Unpacking objects: 100% (7/7), done.
From https://github.com/rtlindne/RaspberryPints
9ea6e70..24eb1d2 master -> origin/master
Updating 9ea6e70..24eb1d2
error: Your local changes to the following files would be overwritten by merge:
python/FlowMonitor.py
sql/schema.sql
sql/update.sql
Please commit your changes or stash them before you merge.
Aborting

Thank you,
BDBeers
 
I actually have a few SD cards running around tinkering with different things before I make a final build. I'll be doing a fresh install soon so I'll just report back on that. Thanks again for all the help! I can't wait to show off the final product!
 
@RandR+ - reinstall worked perfectly. It recognizes all 3 probes I have connected for testing. Next part is figuring out the php code to make them all show (hints are welcome!) :)

Cheers- BDBeers
 
Try running this Script on the pi:
https://raw.githubusercontent.com/rtlindne/RaspberryPints/master/util/installRaspberryPints
simply download it to the pi and run
# i.e. "chmod +x installRaspberryPints"
# i.e. "sudo ./installRaspberryPints"

Ive made some updates to it in the past month that should make it work on the latest Stretch version

I used this method to install RaspberryPints. Everything seems to have gone well but when it tries to launch, I get the following errors:

Fontconfig warning: "/etc/fonts/fonts.conf", line 100: unknown element "blank"
Failed to connect to the bus: Could not parse server address: Unknown address type
ATTENTION: default value of option force_s3tc_enable overridden by environment.
ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.

Based on my google searching, these all seem to be errors related to Chromium, but the browser launches just fine.

And when I try to load it using localhost on the pi or using the IP address on a different computer, I get a 404 error. Any advise on how to resolve this?
I did take a look at the fonts.conf file and there are 2 lines with <blank> in them, I don't know if that is causing the issue.

And on top of that, how do I run RaspberryPints again, in my case, like say after a reboot.
 
Last edited:
So I have searched throughout the forums here and can't seem to find a fix for my issues.

I first started with the original instructions :
sudo apt-get -y install apache2 php5 mysql-client mysql-server php5-mysql phpmyadmin

Then I tried the following three and different times:
sudo apt-get -y install apache2 php7 mysql-client mysql-server php7-mysql phpmyadmin
sudo apt-get -y install apache2 php7.0 mysql-client mysql-server php7.0-mysql phpmyadmin
sudo apt-get -y install apache2 libapache2-mod-php7.0 mysql-client mysql-server php7.0-mysql phpmyadmin

What I can't seem to do is get it to be fully functional:
Errors were encountered while processing:
mariadb-server-10.1
default-mysql-server
mysql-server

Can anyone provide any assistance? I am using Pi2 Model B.
 
Next part is figuring out the php code to make them all show

Where do you want them to show? the average can be shown in the upper right corner through the configuration screen. Look for configuration Show Avg Temperature on home page and turn it on

the code for the upper right corner is in index.php

change lines 161-166 to:
$tempInfos = $tempProbeManager->get_lastTemp();
foreach($tempInfos as $tempInfo){
$temp = $tempInfo["temp"];
$probe = $tempInfo["probe"];
$date = $tempInfo["takenDate"];
$tempDisplay .= sprintf('%s - %0.1fF<br/>', $probe, $temp );
}
$tempDisplay .= sprintf('%s', str_replace(' ', "<br/>", $date));

and add the following to admin/includes/managers/tempProbe_Manager.php

function get_lastTemp(){
$sql="SELECT temp, probe, takenDate FROM tempLog WHERE takenDate = (SELECT MAX(takenDate) FROM tempLog)";
return $this->executeNonObjectQueryWithArrayResults($sql);
}

the temp gauge itself will use the last temp retreived
 
"/etc/fonts/fonts.conf", line 100: unknown element "blank"
are you running chromium from the terminal? if so I get some of the same warnings and since it launches normally I think you can ignore them.

I get a 404 error
Verify that there are files in /var/www and then check /var/log/apache2/error.log for any error

like say after a reboot.
Everything should start automatically so there is no need to do anything manually.
If you are looking to start and stop the python use:
sudo /etc/init.d/flowmon [start|stop|restart]
 
can't seem to find a fix for my issues.
what version of raspbian are you using?
If you are using stretch use:
sudo apt-get install --assume-yes apache2 libapache2-mod-php7.0 mysql-client mysql-server php7.0-mysql phpmyadmin chromium-browser git ttf-mscorefonts-installer x11-xserver-utils unclutter

if using Jessie use:
apt-get install --assume-yes apache2 php5 mysql-client mysql-server php5-mysql phpmyadmin chromium-browser git ttf-mscorefonts-installer x11-xserver-utils unclutter
 
A little background:
When it was first released I had the original version of Raspberry Pints working with 6 flow meters. The problem is that I was experiencing hundreds of "ghost" pours almost every night. I'm convinced that it was because my kegerator was/is located outside (in the shade) and I live in Texas where it gets really hot. The flow meter created ghost pours due to temperature variations (possibly running backwards due to temp changed. And yes the kegerator is very well insulated but the temp fluctuations still occur. The problem was so bad that I disconnected the system and gave away the components.

So now I would like to revisit installing the system again...

Which leads me to the following question:
Is there any way to have the Raspberry Pints system only register pours within a few minutes of sensing movement via a motion detector? My hope is that a system like that will eliminate the ghost pours. Maybe have the system "turn on" with the motion detector and remain on for just a few minutes or limit the time it's allowed to write 'pours' to the database to X number of seconds after motion has been detected. I'm not a programmer so have no idea if this is possible or how difficult it might be to implement.

Open to suggestions here.
 
only register pours within a few minutes of sensing movement via a motion detector

That is certainly a possibility, would just require saving the timestamp of when motion detected to the database and before saving pours check the difference between the motion timestamp and current time.

Do you remember how bad the ghost pours were? Were they just a few ticks or half pours? The current logic has a minimum number of pulses and no pulses for a minimum time before registering a pour.
 
I was able to get the last 3 to show simultaneously by editing the get_lastTemp function slightly:

function get_lastTemp(){
$sql="SELECT temp, probe, takenDate FROM tempLog ORDER BY takenDate DESC LIMIT 3";
return $this->executeNonObjectQueryWithArrayResults($sql);
}

The only other thing that would be nice is if the probe actually pulled the note so it could be named something other than just the probe name.
 

Attachments

  • Pints Temps.PNG
    Pints Temps.PNG
    301.3 KB · Views: 33
what version of raspbian are you using?
If you are using stretch use:
sudo apt-get install --assume-yes apache2 libapache2-mod-php7.0 mysql-client mysql-server php7.0-mysql phpmyadmin chromium-browser git ttf-mscorefonts-installer x11-xserver-utils unclutter
So I think I figured where my problem happened. I had an error with the configuration the first time I did it...I don't have the exact error but it was a socket that was needed to provide a connection to sql. I remember this because I am getting this error:
-----
dpkg: error processing package mariadb-server-10.1 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of default-mysql-server
default-mysql-server depends on mariadb-server-10.1; however:
Package mariadb-server-10.1 is not configured yet.

dpkg: error processing package default-mysql-server (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mysql-server
mysql-server depends on default-mysql-server; however:
Package default-mysql-server is not configured yet.

dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
-----

Looks like it all stems from the mariadb-server-10.1 (not being configured).

I tried to remove it and reinstall it (sudo apt-get --purge remove), but it still failed.

UPDATE: I was able to get everything installed by starting over with Step 1 @ RaspberryPints. I did have to install mysql-server first, then apache2, and so on.
 
Last edited:
Verify that there are files in /var/www and then check /var/log/apache2/error.log for any error
There are files in /var/www and here is the error log
Code:
[Thu May 02 21:51:36.436737 2019] [mpm_event:notice] [pid 15684:tid 3069766976] AH00489: Apache/2.4.25 (Raspbian) configured -- resuming normal operations
[Thu May 02 21:51:36.468857 2019] [core:notice] [pid 15684:tid 3069766976] AH00094: Command line: '/usr/sbin/apache2'
[Thu May 02 21:54:32.302630 2019] [mpm_event:notice] [pid 15684:tid 3069766976] AH00491: caught SIGTERM, shutting down
[Thu May 02 21:54:33.124871 2019] [mpm_prefork:notice] [pid 18553] AH00163: Apache/2.4.25 (Raspbian) configured -- resuming normal operations
[Thu May 02 21:54:33.126246 2019] [core:notice] [pid 18553] AH00094: Command line: '/usr/sbin/apache2'
[Thu May 02 21:54:41.170890 2019] [mpm_prefork:notice] [pid 18553] AH00169: caught SIGTERM, shutting down
[Thu May 02 21:54:45.541334 2019] [mpm_prefork:notice] [pid 18608] AH00163: Apache/2.4.25 (Raspbian) configured -- resuming normal operations
[Thu May 02 21:54:45.542148 2019] [core:notice] [pid 18608] AH00094: Command line: '/usr/sbin/apache2'
[Thu May 02 21:57:50.536660 2019] [mpm_prefork:notice] [pid 18608] AH00171: Graceful restart requested, doing restart
AH00112: Warning: DocumentRoot [/var/www/html] does not exist
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Thu May 02 21:58:00.646888 2019] [mpm_prefork:notice] [pid 18608] AH00163: Apache/2.4.25 (Raspbian) configured -- resuming normal operations
[Thu May 02 21:58:00.647162 2019] [core:notice] [pid 18608] AH00094: Command line: '/usr/sbin/apache2'
[Thu May 02 22:13:30.108419 2019] [mpm_prefork:notice] [pid 18608] AH00171: Graceful restart requested, doing restart
AH00112: Warning: DocumentRoot [/var/www/html] does not exist
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Thu May 02 22:13:34.864390 2019] [mpm_prefork:notice] [pid 18608] AH00163: Apache/2.4.25 (Raspbian) configured -- resuming normal operations
[Thu May 02 22:13:34.864675 2019] [core:notice] [pid 18608] AH00094: Command line: '/usr/sbin/apache2'
[Thu May 02 22:14:09.839484 2019] [mpm_prefork:notice] [pid 18608] AH00169: caught SIGTERM, shutting down
[Thu May 02 22:14:38.458979 2019] [mpm_prefork:notice] [pid 446] AH00163: Apache/2.4.25 (Raspbian) configured -- resuming normal operations
[Thu May 02 22:14:38.508538 2019] [core:notice] [pid 446] AH00094: Command line: '/usr/sbin/apache2'
[Fri May 03 06:46:13.855667 2019] [core:warn] [pid 446] AH00045: child process 470 still did not exit, sending a SIGTERM
[Fri May 03 06:46:13.862848 2019] [core:warn] [pid 446] AH00045: child process 480 still did not exit, sending a SIGTERM
[Fri May 03 06:46:13.863078 2019] [core:warn] [pid 446] AH00045: child process 481 still did not exit, sending a SIGTERM
[Fri May 03 06:46:13.863223 2019] [core:warn] [pid 446] AH00045: child process 482 still did not exit, sending a SIGTERM
[Fri May 03 06:46:13.863360 2019] [core:warn] [pid 446] AH00045: child process 483 still did not exit, sending a SIGTERM
[Fri May 03 06:46:13.863504 2019] [core:warn] [pid 446] AH00045: child process 837 still did not exit, sending a SIGTERM
[Fri May 03 06:46:13.863640 2019] [core:warn] [pid 446] AH00045: child process 1320 still did not exit, sending a SIGTERM
[Fri May 03 06:46:13.863778 2019] [core:warn] [pid 446] AH00045: child process 1321 still did not exit, sending a SIGTERM
[Fri May 03 06:46:13.863918 2019] [core:warn] [pid 446] AH00045: child process 1322 still did not exit, sending a SIGTERM
[Fri May 03 06:46:15.897793 2019] [mpm_prefork:notice] [pid 446] AH00169: caught SIGTERM, shutting down
[Fri May 03 06:46:45.395924 2019] [mpm_prefork:notice] [pid 449] AH00163: Apache/2.4.25 (Raspbian) configured -- resuming normal operations
[Fri May 03 06:46:45.402224 2019] [core:notice] [pid 449] AH00094: Command line: '/usr/sbin/apache2'
 
Holy Moly...

After getting everything installed and it erroring out on my when I try to configure the Raspberry Pints, I followed these instructions found on pg 74 of this fourm:

sudo mysql -u root
update mysql.user set plugin = '' where user='root' and host='localhost';
set password = password('enter_your_password_here');
flush privileges;
quit

After doing the above commands, you will probably need to use "sudo mysql -u root -p" to be prompted for a password.

Last thing I have to do is figure out how to get Raspberry Pints web interface to work.

Update: I found the consolidated instructions for Jessie earlier in this thread so I am going to try those out and see if it works better for me. Seems like a good time to do it since I didn't back up my stuff properly and lost it all.

Update: All instructions I have found don't work. I even tried going back to wheezy based on a previous post. I have the same issues with it (and more) that I have with Stretch.
 
Last edited:
That is certainly a possibility, would just require saving the timestamp of when motion detected to the database and before saving pours check the difference between the motion timestamp and current time.

Do you remember how bad the ghost pours were? Were they just a few ticks or half pours? The current logic has a minimum number of pulses and no pulses for a minimum time before registering a pour.

It's been so long ago I don't remember a lot of details but I remember one keg show -23 gallons one morning. Good to know about the parameters in place now. I will order everything and give it another go. Thank you for the prompt reply.

Now all I have to do if go through this incredibly long thread and find flow meters and John Guest fittings (hint, hint).
 
Last edited:
I can't seem to find instructions to get this to work. I saw that someone was building a guide but wanted to wait until the "with flow meter" was working. That was a year ago so I guess he never got it working.

I am trying to get it to work "without flow meter" and continue to run into issues with Stretch, Jessie, and Wheezy.

I am using Raspberry Pi 2 Model B if anyone has a good set of instructions.
 
Anyone ever come up with a solution for iPhone or iPad?

Came across this video and love everything about it. Flow sensors, wall mounted tablet, tap list.



Would like an iPad solution. Any feedback would be appreciated.
 
The tap list runs on a Raspberry Pi that serves up a webpage that you can access with any device on your network, or even outside your network if you configure your router correctly. You can use an iPad to display the webpage and place it anywhere you like. There are plenty of examples on the web of people building display cases for iPads for use as calendars, etc.
 
root@localhost
Are you using stretch? if so the root user is disabled from logging in by default.

You will need to log into the database from the terminal and create a new user. the commands are in the stretch instructions lines 81-104

Then go back to the install page and use that user
 
000-default.conf
is your index.php in /var/www/ or /var/www/html? (there are multiple index.php in raspberrypints, but only one in the root directory)

Open 000-default.conf and check line 12 setting for documentroot it should be the same directory where your index.php is. if it isn't change it to match and restart apache (sudu /etc/init.d/apache2 restart)
 
Are you using stretch? if so the root user is disabled from logging in by default.

You will need to log into the database from the terminal and create a new user. the commands are in the stretch instructions lines 81-104

Then go back to the install page and use that user

In short....yes.

Per the instructions, I typed this in...I have changed my user/pass on this but want to make sure I used all the correct syntax.
-------------
pi@raspberrypi ~ $ sudo mysql

MariaDB [(none)]> CREATE USER RPints@'%' IDENTIFIED BY 'RPints';

MariaDB [(none)]> grant all privileges on *.* to RPints@'%';

MariaDB [(none)]> exit
-------------

On the install page, there is no spot for username. It simply asks for the host and password. In my case, I used localhost/RPints.

Thoughts?
 
Last edited:
Thoughts?
The original RPints defaulted to root and uses a function call that is deprecated in PhP7 which is the default version for stretch.

you can modify install/includes/configprocessor.php and change "root" to your "RPints"

But even if you get past that most likely you will have more issues because the original doesn't like Stretch.
You can either downgrade to Jessie or use a different branch of RPints that works on Stretch.

Others have used my branch on stretch - https://github.com/rtlindne/RaspberryPints
 
The original RPints defaulted to root and uses a function call that is deprecated in PhP7 which is the default version for stretch.

you can modify install/includes/configprocessor.php and change "root" to your "RPints"

But even if you get past that most likely you will have more issues because the original doesn't like Stretch.
You can either downgrade to Jessie or use a different branch of RPints that works on Stretch.

Others have used my branch on stretch - https://github.com/rtlindne/RaspberryPints
Awesome, thanks!

I backed up my install before MariaDB edit and RaspberryPints install. I will start from there and let you know how it goes.
 
is your index.php in /var/www/ or /var/www/html? (there are multiple index.php in raspberrypints, but only one in the root directory)

Open 000-default.conf and check line 12 setting for documentroot it should be the same directory where your index.php is. if it isn't change it to match and restart apache (sudu /etc/init.d/apache2 restart)
That did the trick. In the txt file, it said the default was /var/www but when it was installing, it said it was going to install to /var/www/html so I changed it to just /var/www.

One more question. Since I was just setting it up, I didn't want to have the screen rotated. When I mount the monitor, I'd like to make it vertical. Where do I change that because I didn't see that configuration in the RaspberryPints configuration screen? Do I just edit the /boot/config.txt? Also, on reboot, it doesn't seem to boot into kiosk mode despite me editing /etc/xdg/lxsession/LXDE/autostart
 
Last edited:
The original RPints defaulted to root and uses a function call that is deprecated in PhP7 which is the default version for stretch.

you can modify install/includes/configprocessor.php and change "root" to your "RPints"

But even if you get past that most likely you will have more issues because the original doesn't like Stretch.
You can either downgrade to Jessie or use a different branch of RPints that works on Stretch.

Others have used my branch on stretch - https://github.com/rtlindne/RaspberryPints
***
UPDATE2: So putting my 2nd update here at the top...may prevent you from reading my whole output. I found a post you made: https://www.homebrewtalk.com/forum/...-taplist-solution.487694/page-91#post-8327283

When comparing the configprocessor.txt file you uploaded to the one I downloaded from your github link, I see it referencing $dbuser instead of "root" and $dbpass1 instead of $rootpass.

I don't know anything about MariaDB, but I can do the replace function in the configprocessor.php.
***


I went ahead and created a new user in MariaDB. That gave me the same error. I then replace "root" with "RPints" in configprocessor.php (there were 4 spots). After that I got a Fatal Error on line 178.

Here is my full process using the your modified 2.0.1 @ https://github.com/rtlindne/RaspberryPints


----app update/upgrade/installs----
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install mysql-server
sudo apt-get install apache2
sudo apt-get install mysql-client
sudo apt-get install libapache2-mod-php7.0
sudo apt-get install php7.0-mysql
sudo apt-get install phpmyadmin
sudo apt-get install chromium-browser
sudo apt-get install git ttf-mscorefonts-installer x11-xserver-utils unclutter
sudo reboot
-----------------------------------


-----Disable Screen Blanking----
sudo nano /etc/xdg/lxsession/LXDE/autostart
#Added lines at bottom:
@xset s off
@xset -dpms
@xset s noblank
@chromium –kiosk localhost
sudo reboot
---------------------------------


----Download RaspberryPints-2.0.1----
https://github.com/rtlindne/RaspberryPints
-------------------------------------


----Prepare system for running RaspberryPints----
sudo rm /var/www/html/index.html
unzip Downloads/RaspberryPints-2.0.1.zip
sudo mv Downloads/RaspberryPints-2.0.1/* /var/www/html/
sudo chmod -R 777 /var/www/html
-------------------------------------------------


----Set root password for RPints setup-----
sudo passwd root
#entered a password for root
sudo reboot
-------------------------------------------

******Inital setup of RPints (in Chromium)******
When doing the intial setup stages for RPints, I clicked on submit and got:

Validating Entries....Success!
Checking DB Connectivity...
Warning: mysqli_connect(): (HY000/1698): Access denied for user 'root'@'localhost' in /var/www/html/install/includes/configprocessor.php on

line 52
Success!
Checking Config folder permissions...Success!

Cnanot connect the the database using the supplied information.

Please press the back button on your browser to fix these erorrs.
****************************************************

----Creating user in MariaDB/modify configprocessor.php----
sudo mysql
CREATE USER RPints@'%' IDENTIFIED BY 'RPints';
grant all privileges on *.* to RPints@'%';
exit
sudo nano /var/www/html/install/includes/configprocessor.php
#replace "root" with "RPints"
CTRL+\
"root"
"RPints"
y
y
y
y
CTRL+o
#press enter to save file
CTRL+x
-------------------------------------------


******Initial setup of RPints (in Chromium), 2nd try*******
After filling in the fields, using RPints as my password in Step 1, I get the following:

Validating Entries....Success!
Checking DB Connectivity...Success!
Checking config folder permissions...Success!
Update config files...Success!
Update admin config files....Success!
Creating RPints database user...Success!
Running Database Script..
Fatal error: Unaught Error: Call to undefined function mysql_connect() in /var/www/html/install/includes/configprocessor.php:178 Stack trace: #0{main} thrown in /var/www/html/install/includes/configprocessor.php on line 178
************************************************************
 
Last edited:
So I finally got it all up and running but there is one display issue that is really bothering me. The right column is the ABV/Gravity column and it is getting cut off on the right side to the point where half the T and all of the Y in gravity are off the screen and that whole column is getting cut off.

It's not an overscan issue as everything else looks fine. What's more frustrating is that on my laptop it looks fine, but on the pi, it's getting cut off. I tried changing the width setting .bodywrapper in style.css and it reduces the overall width but is still cutting off that column. What setting do I need to change?


Actually, scratch all that. I did change the right style but just needed to clear browser cache to see the change.
 
Do I just edit the /boot/config.txt? Also, on reboot, it doesn't seem to boot into kiosk mode despite me editing /etc/xdg/lxsession/LXDE/autostart
See http://raspberrypints.com/byo/step-3-operating-system-configuration/ to configure rotation.

As for the Kiosk will have to do more digging, it works on my fresh VM but it doesn't seem to work on the actual Pi version. Try following the link in this post https://www.homebrewtalk.com/forum/...taplist-solution.487694/page-113#post-8581055
 
Change MySQL_connect to $mysqli = new mysqli($servername, "RPints",$rootpass);
then change MySQL_query to $mysqli->query

I am so glad you are here!

Great news! Got further...and yes, I had already deleted the index.html file, but the display wanted to tell me that too.
******output******
Validating Entries....Success!
Checking DB Connectivity...Success!
Checking config folder permissions...Success!
Update config files...Success!
Update admin config files....Success!
Creating RPints database user...Success!
Running Database Script...Success!
Adding new admin user...Success!
Deleting default index.html page...
Warning: unlink(../../index.html); No such file or directory in /var/www/html/install/includes/configprocessor.php on line 212
File already deleted.
Adding sample data...Success!

Congratulations! Your Raspeberry Pints has been setup successfully.
Click for - Tap List
Click for - Administration
*******************

When I click taplist, I get "this page is not working" (it sends me to localhost/index.php).
When I click Administration, it loads the page, but when I log in with my admin username/pass, I get "this page is not working" (it sends me to localhost/admin/includes/checklogin.php).
 
Back
Top