• 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.
I’m not using a pull-up resistor
I think the original did set the pull up resistors on the flow pins and so does mine. T

It would be interesting when you push water through it to see what the log says about resetting the tap and the number of pulses it got.
 
That was the last update, maybe I messed it up, its working locally for.
Is the apache log you posted right after a reboot or was the Pi running for awhile.

One thing I just thought of is that the configs are from the admin section which uses /admin/includes/conn.php to connect to the database, make sure that has the correct settings in it. (I know that 2 different places doesn't make sense, but its simplified from the original)
conn.php:

<?php
//show/hide SQL statements in errors
//$showSqlState = true;
$host="localhost"; // Host name
$username="Erik"; // Mysql username
$password="ikdi6317"; // Mysql password
$db_name="Rpints"; // Database name
$tbl_name="users";
//Connect to server and select database.
$mysqli = new mysqli("$host", "$username", "$password", "$db_name") or die("cannot connect to server");
?>

config.php:

<?php
function db() {
return new mysqli('localhost', 'Erik', 'ikdi6317', 'Rpints');
}
$rpintsversion="2.9.0.1";
?>

Rebooted now, attempted to open, apache2.log:

pi@rpints:~ $ tail -F /var/log/apache2/error.log
[Sun Jul 12 00:00:55.416313 2020] [mpm_prefork:notice] [pid 610] AH00163: Apache/2.4.38 (Raspbian) mod_python/3.3.1 Python/2.7.16 configured -- resuming normal operations
[Sun Jul 12 00:00:55.416351 2020] [core:notice] [pid 610] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jul 12 05:38:17.853235 2020] [mpm_prefork:notice] [pid 610] AH00169: caught SIGTERM, shutting down
[Sun Jul 12 05:38:29.790738 2020] [:error] [pid 628] python_init: Python version mismatch, expected '2.7.15', found '2.7.16'.
[Sun Jul 12 05:38:29.814085 2020] [:error] [pid 628] python_init: Python executable found '/usr/bin/python'.
[Sun Jul 12 05:38:29.814144 2020] [:error] [pid 628] python_init: Python path being used '/usr/lib/python2.7:/usr/lib/python2.7/plat-arm-linux-gnueabihf:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.
[Sun Jul 12 05:38:29.814200 2020] [:notice] [pid 628] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Sun Jul 12 05:38:29.814218 2020] [:notice] [pid 628] mod_python: using mutex_directory /tmp
[Sun Jul 12 05:38:30.120152 2020] [mpm_prefork:notice] [pid 628] AH00163: Apache/2.4.38 (Raspbian) mod_python/3.3.1 Python/2.7.16 configured -- resuming normal operations
[Sun Jul 12 05:38:30.120331 2020] [core:notice] [pid 628] AH00094: Command line: '/usr/sbin/apache2'
 
What is apache log when you try to access the webpage now
The page finally opened sometime between 5:38 AM and now, here's the current error log:

pi@rpints:~ $ tail -F /var/log/apache2/error.log
[Sun Jul 12 00:00:55.416351 2020] [core:notice] [pid 610] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jul 12 05:38:17.853235 2020] [mpm_prefork:notice] [pid 610] AH00169: caught SIGTERM, shutting down
[Sun Jul 12 05:38:29.790738 2020] [:error] [pid 628] python_init: Python version mismatch, expected '2.7.15', found '2.7.16'.
[Sun Jul 12 05:38:29.814085 2020] [:error] [pid 628] python_init: Python executable found '/usr/bin/python'.
[Sun Jul 12 05:38:29.814144 2020] [:error] [pid 628] python_init: Python path being used '/usr/lib/python2.7:/usr/lib/python2.7/plat-arm-linux-gnueabihf:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.
[Sun Jul 12 05:38:29.814200 2020] [:notice] [pid 628] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Sun Jul 12 05:38:29.814218 2020] [:notice] [pid 628] mod_python: using mutex_directory /tmp
[Sun Jul 12 05:38:30.120152 2020] [mpm_prefork:notice] [pid 628] AH00163: Apache/2.4.38 (Raspbian) mod_python/3.3.1 Python/2.7.16 configured -- resuming normal operations
[Sun Jul 12 05:38:30.120331 2020] [core:notice] [pid 628] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jul 12 10:28:57.281017 2020] [php7:notice] [pid 694] [client ::1:41986] PHP Notice: Undefined variable: date in /var/www/html/index.php on line 219

Notice the timestamp on the temperature readings on the attached screen shot ... 5:39:42 AM ... and it still shows "waiting for localhost" at the bottom of the screen as the page attempts to finish loading.
 

Attachments

  • Annotation 2020-07-12 105628.jpg
    Annotation 2020-07-12 105628.jpg
    173.9 KB
I think the original did set the pull up resistors on the flow pins and so does mine. [...
]

You're right, I missed the line in the pin setting loop. And I suppose it's possible the internal pull-ups could work alone given short cables, but I have roughly 15 feet of cables and five connectors between my meters and the Arduino, and that's a lot of capacitance that could make the rise times slow...
 
PHP Notice: Undefined variable: date in /var/www/html/index.php on line 219

Notice the timestamp on the temperature readings on the attached screen shot ... 5:39:42 AM ... and it still shows "waiting for localhost" at the bottom of the screen as the page attempts to finish loading.
I just fixed the undefined variable issue in github

As for the temperature time, one thing you can do to help my troubleshoot is to go to admin->install page and hit backup, that will generate a backup in sql/backups, if you could send my that file I can recreate your database locally and see whats up. If you don't want to do that then query the database with:
select * from tempLog order by takenDate desc;
to see the last time a temp was taken

As for the loading not finishing it would be interesting to see what the end of the source of the page is when you inspect it, that would tell me were its failing to finish
 
I just fixed the undefined variable issue in github

As for the temperature time, one thing you can do to help my troubleshoot is to go to admin->install page and hit backup, that will generate a backup in sql/backups, if you could send my that file I can recreate your database locally and see whats up. If you don't want to do that then query the database with:
select * from tempLog order by takenDate desc;
to see the last time a temp was taken

As for the loading not finishing it would be interesting to see what the end of the source of the page is when you inspect it, that would tell me were its failing to finish
Unfortunately I cannot get to the admin section right now, we had a power blink due to weather and the reboot sent me back to a blank white page again. I'll try running another update and see of that fixes the issue.
 
Very new here, and tried to cover as much ground as I could on these forums, but I can't for the life of me troubleshoot things to work. I've given about 10 hours to figuring things out, I have very little understanding of Raspberry Pi/programming and I am doing this project for a friend.

Just to do things the right way, I am using the latest available version of Raspbian on a pi 4B, and I am lost on what to do for step 4 (I don't know what packages I need to install here). Everything outside of this step I seem to have no issue with though.

THANKS FOR ANY HELP AT ALL! This has been a waking nightmare for me.

edit: I should mention I am having errors like "no installation candidate" when using outdated instructions on the official website, but I don't know what packages I should be replacing those with. I get this error with php5 and php5-mysql (obviously) and also for mysql client & server, which confused me.
 
Greetings, @zrdelong, and welcome to the forums at HomeBrewTalk! :mug:
I'm just guessing that you are trying to use the original RaspberryPints kit and installation procedure from the repository linked from raspberrypints.com (feel free to correct me if I am in error on that). Unfortunately the passage of time has not been kind to the original software as the current raspbian.org packages no longer support it. Unless one has a fully fleshed out Wheezy or Jessie vintage Raspbian environment, the original kit will not run.

Fortunately a couple of HBT members took it upon themselves to update the original package to forms that will work with the currently available environment.
If you run this command from a terminal session

Code:
curl -L install.rpints.com | sudo bash

and choose between the options provided you can either install a version that very closely resembles the original (Tobor_8thman branch) or another version that has numerous enhancements and integrates a number of previous "add-on" functions (RandR+ branch).

Cheers!
 
can you check apache log for any errors?
pi@rpints:~ $ tail -F /var/log/apache2/error.log
[Sun Jul 12 15:46:12.740117 2020] [php7:warn] [pid 626] [client ::1:59400] PHP Warning: Error while sending QUERY packet. PID=626 in /var/www/html/admin/includes/managers/config_manager.php on line 13
[Sun Jul 12 15:46:12.740347 2020] [php7:error] [pid 626] [client ::1:59400] PHP Fatal error: Uncaught Error: Call to a member function fetch_array() on bool in /var/www/html/admin/includes/managers/config_manager.php:14\nStack trace:\n#0 /var/www/html/includes/common.php(14): getAllConfigs()\n#1 /var/www/html/index.php(269): printBeerList(Array, '4', 'Keg')\n#2 {main}\n thrown in /var/www/html/admin/includes/managers/config_manager.php on line 14
[Sun Jul 12 15:46:14.141095 2020] [mpm_prefork:notice] [pid 611] AH00169: caught SIGTERM, shutting down
[Sun Jul 12 15:46:23.549534 2020] [:error] [pid 610] python_init: Python version mismatch, expected '2.7.15', found '2.7.16'.
[Sun Jul 12 15:46:23.573656 2020] [:error] [pid 610] python_init: Python executable found '/usr/bin/python'.
[Sun Jul 12 15:46:23.573710 2020] [:error] [pid 610] python_init: Python path being used '/usr/lib/python2.7:/usr/lib/python2.7/plat-arm-linux-gnueabihf:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.
[Sun Jul 12 15:46:23.573768 2020] [:notice] [pid 610] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
[Sun Jul 12 15:46:23.573788 2020] [:notice] [pid 610] mod_python: using mutex_directory /tmp
[Sun Jul 12 15:46:23.858525 2020] [mpm_prefork:notice] [pid 610] AH00163: Apache/2.4.38 (Raspbian) mod_python/3.3.1 Python/2.7.16 configured -- resuming normal operations
[Sun Jul 12 15:46:23.858634 2020] [core:notice] [pid 610] AH00094: Command line: '/usr/sbin/apache2'


FYI - still at a white screen "waiting for localhost" almost 6 hours since reboot.
 
Greetings, @zrdelong, and welcome to the forums at HomeBrewTalk! :mug:
I'm just guessing that you are trying to use the original RaspberryPints kit and installation procedure from the repository linked from raspberrypints.com (feel free to correct me if I am in error on that). Unfortunately the passage of time has not been kind to the original software as the current raspbian.org packages no longer support it. Unless one has a fully fleshed out Wheezy or Jessie vintage Raspbian environment, the original kit will not run.

Fortunately a couple of HBT members took it upon themselves to update the original package to forms that will work with the currently available environment.
If you run this command from a terminal session

Code:
curl -L install.rpints.com | sudo bash

and choose between the options provided you can either install a version that very closely resembles the original (Tobor_8thman branch) or another version that has numerous enhancements and integrates a number of previous "add-on" functions (RandR+ branch).

Cheers!

Will try this immediately, thank you so much! I will let you know if I have any issues doing this specifically but I don't think it'll give me too hard of a time!
 
PHP Warning: Error while sending QUERY packet. PID=626 in /var/www/html/admin/includes/managers/config_manager.php on line 13
I'm not sure myself unless there is something wrong with you mariadb install. one thing I can suggest it to add code to catch the false return and retry after 2 seconds. no guarantee its going to work.

In /admin/includes/managers/config_manager.php at line 14 insert
if($qry=== false)
{
sleep(2);
$qry = $mysqli->query($sql);
}

so it would look like
$qry = $mysqli->query($sql);
if($qry=== false)
{
sleep(2);
$qry = $mysqli->query($sql);
}
while($c = $qry->fetch_array()){
 
I'm not sure myself unless there is something wrong with you mariadb install. one thing I can suggest it to add code to catch the false return and retry after 2 seconds. no guarantee its going to work.

In /admin/includes/managers/config_manager.php at line 14 insert
if($qry=== false)
{
sleep(2);
$qry = $mysqli->query($sql);
}

so it would look like
$qry = $mysqli->query($sql);
if($qry=== false)
{
sleep(2);
$qry = $mysqli->query($sql);
}
while($c = $qry->fetch_array()){

After adding the code snippet above, I get:

This page isn’t working
localhost is currently unable to handle this request.
HTTP ERROR 500

Anyway, I was unable to get anything to work even after returning the code above to it's normal state ... so I did another full install via the script. This time I entered the database name, password, etc. as shown for the defaults, and once I re-entered all of my info to set the system up, it seems to be working perfectly fine again. The temperatures are updating as expected, I am able to move from admin the main screen and back again with no issues and it loads quickly again. I'm not sure what the issue was, it may be due to using non-default info for the database name, password, etc.? A caveat - I have not tried re-booting the system to see what happens at re-boot, but based on how it is responding now I do not think it will be an issue.
 
Last edited:
it may be due to using non-default info for the database name, password, etc.?
I tested installing a second Rpints instance on a test system with none default info and it works as expected, but I'm glad it sounds like you are getting it going
 
It sounds like either the Arduino or the Pi (USB port) is bad or miss wired, are the flow meters connected? If so disconnect them and do a full power cycle on everything.

Thanks for getting back to me. I did some more in-depth troubleshooting and its definitely the USB on the Arduino. Looks like I'll get another one from Amazon and hope to have better luck. Anyone have recommendation to get an official Arduino or just go with a highly rated clone?
 
I tested installing a second Rpints instance on a test system with none default info and it works as expected, but I'm glad it sounds like you are getting it going
It appears my earlier celebration was pre-mature, the system re-booted and I once again have a white screen and Raspberry Pints will not load. I'm about ready to just rip the whole thing out and go back to Taplist.io ...
 
@esdill are you re-flashing the pi's SSD before re-installing RPints, or installing on top of an old OS? If it works at first, but it's failing across reboots, that suggests something is messed up at the OS level. I would re-flash the SSD from the Raspberry Pi imager before giving up. The OS I use is the first one shown in the options in the screen grab.

Don't give up, it's awesome when it works!
 

Attachments

  • Screen Shot 2020-07-13 at 6.22.29 PM.png
    Screen Shot 2020-07-13 at 6.22.29 PM.png
    146.4 KB
Did you have anything else on the pi before installing the latest version (i.e. taplist.io or fermentrack or brewpi)

There's nothing else on the Pi, it is installed specifically for my tap list at my keezer.

It's a Raspberry Pi 4 running Buster, with an Arduino Uno connected via USB to run the flowmeters. The two temperature probes are connected the the Pi GPIO header with a 4.7K resistor between the data and 5V for the pull-up.

I noticed something last night while watching the blank white screen, a very small temperature indicator was appearing in the upper right corner where the "normal" temperature indicator would appear (it's the same shape as the normal one, but about 1/3 the size and has graduation markings on it), and it would flicker every couple of seconds).

I tested Chromium to see if it would load a different page, I typed msn.com, hit enter, and msn.com loaded in 1.38 seconds.

I have a SD card cloned from my last working install, should I load that one and run the update to see what happens?
 
@esdill are you re-flashing the pi's SSD before re-installing RPints, or installing on top of an old OS? If it works at first, but it's failing across reboots, that suggests something is messed up at the OS level. I would re-flash the SSD from the Raspberry Pi imager before giving up. The OS I use is the first one shown in the options in the screen grab.

Don't give up, it's awesome when it works!
I am not re-flashing, just running the installation script. What OS version is that? I have a Pi 4 and need to install Buster.
 
I am not re-flashing, just running the installation script. What OS version is that? I have a Pi 4 and need to install Buster.

If you download the imager from Raspberry Pi Downloads - Software for the Raspberry Pi and select that option, it will install Debian Buster configured for the Pi. On first boot, go through the setup application and it will update all the debs to the latest versions. I have a 3B+ and a 4 and this OS works fine on both of them.

One thing to try. If you power down, disconnect the temp probes and power up, does it work? Reboot again and see if it works. Then reconnect the temp probes and see if you can isolate them as the problem. You could run the command dmesg and look for suspicious messages related to the kernel from the gpio interface.

But if you’re not into debugging, I’d suggest a complete wipe and re-install the OS and the RPints. If it doesn’t work after a clean, error-free install, I’d start to suspect hardware issues. Maybe a bad probe that’s sending garbage that’s confusing the PI? That doesn’t

My temp probes arrived today. I’ll update to the latest version of RPints before I connect them up and see what happens.
 
I am having the exact same issue as @esdill and I also added a second temp probe and did an update.
Ive read through the last couple of pages but don't want to try anything yet until you get it sorted @RandR+ It worked fine for almost. week now a blank white screen. I rebooted and now if I try to start Raspberry Pints in Chromium it doesn't load at all. And I get the message saying waiting for local host in the bottom left corner.
 
I am having the exact same issue as @esdill and I also added a second temp probe and did an update.
Ive read through the last couple of pages but don't want to try anything yet until you get it sorted @RandR+ It worked fine for almost. week now a blank white screen. I rebooted and now if I try to start Raspberry Pints in Chromium it doesn't load at all. And I get the message saying waiting for local host in the bottom left corner.
Thank you for confirming my sanity! If we both did the same thing, and both have the same issues, then there must be something in the update that went haywire. It is highly unlikely that we both have the same exact hardware issues.

I am in the process of installing a brand new SD card, with a brand new Pi image, and will install Raspberry Pints as a fresh new install to see what happens when I reboot.
 
then there must be something in the update that went haywire
Maybe not haywire but instead taking forever to run, I don't have a large dataset for temps. Lets try turning off displaying temp probes from the page to see if loads
from the terminal type
sudo mysql
use raspberrypints; (or your active database name)
update config set configValue = '0' WHERE configName = 'showTempOnMainPage';

try refreshing the page
 
OK, I have two temperature probes hooked up to my Pi via the GPIO one-wire interface and both are reading out fine manually:
Code:
pi@raspberrypi:/sys $ cat /sys/devices/w1_bus_master1/28-3c01b556*/w1_slave
62 01 55 05 7f a5 a5 66 15 : crc=15 YES
62 01 55 05 7f a5 a5 66 15 t=22125
43 01 55 05 7f a5 a5 66 fe : crc=fe YES
43 01 55 05 7f a5 a5 66 fe t=20187
One is showing up in RPints (I'm at commit aa6e4725dc8d0e7e2e86436b231a73ec0b1f6595). Next step is to upgrade to the latest version and see if both show up.
 
Greetings, @zrdelong, and welcome to the forums at HomeBrewTalk! :mug:
I'm just guessing that you are trying to use the original RaspberryPints kit and installation procedure from the repository linked from raspberrypints.com (feel free to correct me if I am in error on that). Unfortunately the passage of time has not been kind to the original software as the current raspbian.org packages no longer support it. Unless one has a fully fleshed out Wheezy or Jessie vintage Raspbian environment, the original kit will not run.

Fortunately a couple of HBT members took it upon themselves to update the original package to forms that will work with the currently available environment.
If you run this command from a terminal session

Code:
curl -L install.rpints.com | sudo bash

and choose between the options provided you can either install a version that very closely resembles the original (Tobor_8thman branch) or another version that has numerous enhancements and integrates a number of previous "add-on" functions (RandR+ branch).

Cheers!

I've starting looking at doing a build, but I don't need anything special. Just want a taplist (no flow meters, no temp probe, etc). Will I still have to do what you posted above? Sounds like the raspberry pints website isn't up to date and will not work as is (with and without flow meters), right?
 
Maybe not haywire but instead taking forever to run, I don't have a large dataset for temps. Lets try turning off displaying temp probes from the page to see if loads
from the terminal type
sudo mysql
use raspberrypints; (or your active database name)
update config set configValue = '0' WHERE configName = 'showTempOnMainPage';

try refreshing the page

I grabbed a brand new SD card that I had handy, I installed a brand new Raspberry Pi image on the card, I installed the new card in the Pi and installed Raspberry Pints (RandR+) via the installation script. I have rebooted 3 times, and every time Raspberry Pints has opened with no issues. Both probes appear and both update once per minute. It seems to be working, I'll keep monitoring it throughout the day.

There is one thing I noticed when I had the white screen, I could access the Pi using VNC Viewer, but I was unable to access it using the IP address in my desktop web browser. Not sure if that has any bearing, but thought I'd mention it.
 
Back
Top