[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.
At the least, I imagine those MySQL_connect failures would need addressing - weren't those supposed to be changed to $mysqli = new mysqli($servername, "RPints",$rootpass);

Cheers!
 
That sql method no longer exists so I would expect you'd have to change all instances everywhere they occur...

Cheers!

I am down to one error that I can't figure out:
PHP Fatal error: Uncaught Error: Call to undefined function mysqli() in /var/www/html/admin/includes/conn.php:8\nStack trace:\n#0 /var/www/html/admin/includes/checklogin.php(7): require()\n#1 {main}\n thrown in /var/www/html/admin/includes/conn.php on line 8, referer: http://localhost/admin/index.php
 

Attachments

  • checklogin.txt
    1.1 KB · Views: 13
  • conn.txt
    375 bytes · Views: 15
Last edited:
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

So I followed everything in that post but when I check the status of kiosk.service, it tells me that it is inactive (dead). And it seems so kill it as soon as I enable it based on the time stamp. I double checked everything and I typed everything correctly.
 
That sql method no longer exists so I would expect you'd have to change all instances everywhere they occur...

Cheers!

So I tried my hand at Jessie since I figured out how to update some of the configuration stuff (basics, like wifi). This is my process and it worked perfectly with 2.0.1 from Raspberry Pints! I will get everything up this weekend! Posting this for others out there...sorry for lack of explanation, but feel free to PM me if I don't respond to you here.

This was using RaspberryPints-2.0.1 on Jessie 2.4.1
----app update/upgrade/installs----
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install mysql-server-5.5
--create db root password
sudo apt-get install apache2
sudo apt-get install mysql-client
sudo apt-get install php5
sudo apt-get install php5-mysql
sudo apt-get install phpmyadmin
--select apache
--create database admin password
sudo apt-get install chromium-browser
sudo apt-get install git ttf-mscorefonts-installer x11-xserver-utils unclutter
-----------------------------------


-----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.x----
https://github.com/RaspberryPints/RaspberryPints
-------------------------------------


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


******Initial setup of RPints (in Chromium)*******
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..
(IGNORE THIS ERROR MESSAGE) mysql_connect is deprecated....recommend PDO or mysqli (IGNORE)
sudo reboot
************************************************************
 
Call to undefined function mysqli()
It looks like you got it solved by moving to Jessie, but I wanted to explain the error for anyone curious
mysqli is a class not a function so the code should have been
$mysqli = new mysqli("$host", "$username", "$password", "$db_name")
 

I'm not a programmer but decided to look at the code while waiting on my parts to arrive. It looks to my untrained/inexperienced eye that if I activate the RFID portion (without a shut off valve) that the pours will only be counted if the RFID was activated. That will correct my 'ghost' pours, right??
 
After much playing around with Raspberry Pints I'm getting pretty close to being done. My php skills are pretty limited but it seems to have turned out okay. There are still a few things to tinker with like massaging the CSS, fixing the temperature probe names to show the notes instead, and fixing some image items (like making a cask image for the aging section and fixing the scaling on the fermenter).

Cheers,
BDBeers
 

Attachments

  • Raspberry Pints Image.PNG
    Raspberry Pints Image.PNG
    2.4 MB · Views: 71
Looks good. Quick question though. How did you make those additional sections? I know a Bottles section is built in but I'd like to add more like that.
 
@myndflyte So that took quite a bit of tinkering. You'll have to excuse my lack of or incorrect use of technical terms in some areas. Essentially, I took the "bottle" manager, model, list and form, from the admin area and copied those into their own php for on deck, brewing and aging. I replaced (literally using the find/replace function) for anything that said "bottle" to "aging" etc etc for each. The one thing I didn't replace was anything that said "bottletype" as that called onto a different table/function that I didn't want to duplicate or change. You also have to edit the header and left bar in the admin area to make them show/function. From there I went to phpmyadmin and copied the bottles list and views into the new categories. Finally, I edited the index to pull them in as well as tinkered with the beerlisttable to make them show different images or do date calculation using a bunch of if, elseif, and else for each category depending on what I wanted. That's probably not exhaustive of everything done but generally speaking how I went about it.

If anyone is curious about the labels I actually used the built in brewery image area to make that work. My significant other likes to do artsy stuff to be involved in the brewing process and does labels for each beer. She hosts them onto her website and I just linked them into brewery image and then associated that image to the beer. Due to the way the beerlisttable calls the brewery image and image sizing issues, I made it into its own column with its own header.
 
That will correct my 'ghost' pours, right??
Not out of the box. The RFID is used to release the valves and associate the next pour to a user. To require an RFID without valves that would mean that if someone actually poured a Beer without RFID then the pour wouldn't register and the remaining amount wouldn't change.

It wouldn't be hard to modify file arduino/raspberrypints/raspberrypints.ino to not send the pour if no user is associated with it.
Just modify line ~240 from:
sendPulseCount(userIdForPin, pulsePin, pulseCount);
to
if( userIdForPin != INVALID_USER_ID)sendPulseCount(userIdForPin, pulsePin, pulseCount);

then delete arduino/raspberrypints/raspberrypints.cpp.hex, stop the flowmonitor (sudo /etc/init.d/flowmon stop), upload to the shield, start the flowmonitor (sudo /etc/init.d/flowmon start).
 
It looks like you got it solved by moving to Jessie, but I wanted to explain the error for anyone curious
mysqli is a class not a function so the code should have been
$mysqli = new mysqli("$host", "$username", "$password", "$db_name")

RandR+, thanks for the additional info. I made a backup on the Stretch version that I am working on. I think the mysql_connect and dbase commands are all through the .php files. I did go back and change this in the conn.php file; however, it didn't correct the issue and I received the same error. I am no where near smart enough to figure it out. I also noticed that you have $db_name in the statement above, but I didn't change that anywhere (typically the dbase name was in a command right below the host, username, and password line).

In the end, yes, Jessie seems to be the way to go. I'd love to get it up and running with stretch and will to try different options--I made backups at different stages in the process (new stretch install, RPints install, errors, etc).
 
I don't see anything in the admin settings.

The rotate in Step 3 of RPints refers to the actual display being rotated and doesn't do anything with the way the table is displayed. I did attempt this just to make sure I understood it. I had to look sideways to navigate everything.
 
Last edited:
I don't see anything in the admin settings.

The rotate in Step 3 of RPints refers to the actual display being rotated and doesn't do anything with the way the table is displayed. I did attempt this just to make sure I understood it. I had to look sideways to navigate everything.
In the admin section if you click configuration and scroll to the Taplist Header section. About 6 options up, there should be Show the tap list vertically. Mine is right under the option to display the RaspberryPints logo.

 
In the admin section if you click configuration and scroll to the Taplist Header section. About 6 options up, there should be Show the tap list vertically. Mine is right under the option to display the RaspberryPints logo.

Wierd...I don't have those options. I am using 2.0.1.
 

Attachments

  • Capture.JPG
    Capture.JPG
    50.9 KB · Views: 43
  • Capture1.JPG
    Capture1.JPG
    36.4 KB · Views: 44
That option is available in my branch. You can see how I did it in includes/beerListTableVerticle.php

Okay...so I checked. I thought I had been using your branch for the last several days with the mysql issues...I was wrong. I do have your branch installed now, but I can't get logged into the admin page. Can you assist? With your setup page, I used rootuser is root with the password that I set in jessie. I left admin as default at the bottom and typed in a password. Neither one of them work.
 
I left admin as default at the bottom and typed in a password. Neither one of them work.
You can do this through phpmyadmin (http://127.0.0.1/phpmyadmin/) but I am going to use the terminal

run the following
sudo mysql
use raspberrypints; (or your database name)
SELECT username from users; (Should return admin if it doesn't then that might be your issue)
UPDATE users set password = 'd41d8cd98f00b204e9800998ecf8427e';
exit

This should reset the username's password to empty and allow you to get to the admin page with a blank password

If that works then you just need to change your password, under drinker accounts
 
I would reinstall and see if it loads the database correctly.
I did. It didn't work either time. I didn't what to check the first time, but got the same "this page is not working" but i could get to admin/index.php and attempt to log in without any luck. At that time, I also tried resetting my password.

With that said, what is the proper way to uninstall and start over? I have been reformating my SDCARD and using Win32Disk to image the SDCARD again.
 
It didn't work either time
Let me attempt to install using the install page. I have been testing with my install script and that hasn't had any issues.

what is the proper way to uninstall and start over
Formatting the SD card is one way, but a simpler way would be to raspberrypints from /var/www/<html> and delete the database
sudo mysql
drop database raspberrypints;
exit

then get rpints from GitHub again
 
a simpler way would be to raspberrypints from /var/www/<html> and delete the database
sudo mysql
drop database raspberrypints;
exit

then get rpints from GitHub again

Oh my goodness...I've spent hrs reformating and imaging that SDcard...I only have one. Every issue I have had, I always start from a known-good back. This will make it so much easier!
 
Every issue I have had
After testing I did find that I had an issue with the install file. It tried to drop the database and if it didn't exist I would error out but never output the error to the user.

I just committed the fix to GitHub so if you get the latest install/includes/configprocessor.php it should work this time.

I'm sorry, I gave up on testing the installer when I created the util/installRaspberryPints script because the script was preferable as it would install and configure the software after Raspbian was installed.
 
I just committed the fix to GitHub so if you get the latest install/includes/configprocessor.php it should work this time.

I'm sorry, I gave up on testing the installer when I created the util/installRaspberryPints script because the script was preferable as it would install and configure the software after Raspbian was installed.

Thanks for the configprocessor.php update.

I also prefer scripts automated installs. I am new to this Raspberry Pi world...and github--I would have used it to install vs manual (at least after the 10th try).

I will try this out now. Thanks again!
 
A

I just committed the fix to GitHub so if you get the latest install/includes/configprocessor.php it should work this time.

You are an amazing person! I like your branch much better than the stock one. It will take me a bit to get it set up, but I can see I don't have any taps/beer listed and and I can get into the admin area to do all the setup. Thanks again!
 
@myndflyte So that took quite a bit of tinkering. You'll have to excuse my lack of or incorrect use of technical terms in some areas. Essentially, I took the "bottle" manager, model, list and form, from the admin area and copied those into their own php for on deck, brewing and aging. I replaced (literally using the find/replace function) for anything that said "bottle" to "aging" etc etc for each. The one thing I didn't replace was anything that said "bottletype" as that called onto a different table/function that I didn't want to duplicate or change. You also have to edit the header and left bar in the admin area to make them show/function. From there I went to phpmyadmin and copied the bottles list and views into the new categories. Finally, I edited the index to pull them in as well as tinkered with the beerlisttable to make them show different images or do date calculation using a bunch of if, elseif, and else for each category depending on what I wanted. That's probably not exhaustive of everything done but generally speaking how I went about it.

If anyone is curious about the labels I actually used the built in brewery image area to make that work. My significant other likes to do artsy stuff to be involved in the brewing process and does labels for each beer. She hosts them onto her website and I just linked them into brewery image and then associated that image to the beer. Due to the way the beerlisttable calls the brewery image and image sizing issues, I made it into its own column with its own header.

Did you make the fermenter icon, or is that part of the package already?
 
Hi Carlosprite,

I actually made that and added in the css and code into the beerlisttable to make it work properly. The aging, on deck and brewing are all custom from my own tinkering.

Cheers,
BDBeers
 
Hi Carlosprite,

I actually made that and added in the css and code into the beerlisttable to make it work properly. The aging, on deck and brewing are all custom from my own tinkering.

Cheers,
BDBeers

Cool!

The coding bit I can figure out with trial and error, but I’m useless at graphic work haha, what program did you make the FV picture in?

Love your idea to show what’s currently fermenting! My ultimate goal I s to have both the graphs for my fermentrack and the tap list displaying simultaneously on the 42” TV in the shed!
 
Cool!

The coding bit I can figure out with trial and error, but I’m useless at graphic work haha, what program did you make the FV picture in?

Love your idea to show what’s currently fermenting! My ultimate goal I s to have both the graphs for my fermentrack and the tap list displaying simultaneously on the 42” TV in the shed!

The significant other did them in photoshop. She found a decent stock photo and then made the images just like the keg or bottle logos with the colors and outlines. I think one of the most important one is the stroke which is the empty color interior and somehow the CSS and coding helps fill it in. I read quite a bit of the first thread on Rapsberry Pints which they talked about it a little. Other than just duplicating the functionality that already exists I'm not sure how it all works to be honest.
 
Guys first thanks for great topic. 2nd I am getting frustrated to make those flow sensors work. I wiped my sd card and started again like 8times.

I have used 2017-07-05-raspbian-jessie and randr+ script and I could get everything worked except sensors :-(
I have followed this "tutorial"

I have this sensor and tomorrow will arrive those. I am using Arduino UNO R3 and raspberry pi 3B

Attached is my log.
 

Attachments

  • Log.txt
    3 KB · Views: 15
I'd say the crux of the blocking issue is illustrated here:

2019-05-16 21:12:04 RPINTS: alamode was restarted, restart flowmonitor
2019-05-16 21:12:04 RPINTS: closing serial connection to alamode...
2019-05-16 21:12:05 RPINTS: flowmonitor aborted, restarting...
2019-05-16 21:12:05 RPINTS: resetting alamode
2019-05-16 21:12:06 RPINTS: waiting for alamode to come alive
2019-05-16 21:12:06 RPINTS: alamode alive...
2019-05-16 21:12:06 RPINTS: getting config data for alamode
2019-05-16 21:12:06 RPINTS: alamode config, about to send: C:2:7:8:0:300:200:30$
2019-05-16 21:12:06 RPINTS: Waiting for Config Response
2019-05-16 21:12:07 RPINTS: alamode says:
2019-05-16 21:12:07 RPINTS: listening to alamode
2019-05-16 21:12:07 RPINTS: alive
2019-05-16 21:12:07 RPINTS: alamode was restarted, restart flowmonitor
2019-05-16 21:12:07 RPINTS: closing serial connection to alamode...
2019-05-16 21:12:08 RPINTS: flowmonitor aborted, restarting...
2019-05-16 21:12:08 RPINTS: resetting alamode
 
Attached is my log
day_trippr is on the right path. the issue is that after the python sends the config message the Uno sends back alive but what is weird with your log is that you config ends with $ when it should end with | it may have just been cut off though.

Try stopping the Pytho (sudo /etc/init.d/flowmon stop)
In Arduino studio open the serial monitor.
You should be seeing alive messages coming across. Input C:2:7:8:0:300:200:30:250:0:0| and hit send
You should see the line echoed back to you from the Uno then see a StatusCheck message.
Try your flow meters and you should see a message that starts with U: (update) then P: (pour)

if that works then we just need to get the Uno to sync with the python.

in /arduino/raspberrypints
change line 492 of raspberrypints.ino from delay(100); to delay(1000);
delete raspberrypints.cpp.hex and update the sketch to the Uno
then restart the python ( sudo /etc/init.d/flowmon start)
 
Random hardware question. My flow meters have about 6ins of wire and those small computer (JST-XH) connectors. Im looking for small, 3wire quick disconnects i can replace these with and a spool of small wire that containes 3 wires inside i can run from each flowmeter. These will end with the mini xlr plugs into a box. In that box, I will run the combine all the PWR and GND wires and have my 4 data wires. Coming out of that i want a 6+ wire connector to run to my RPints box. Anyone have an idea for that, i saw daytripper used that huge serial plug but i dont need that much? would a USB-C plug and cable work?



So the 2 questions. small 3 wire QD's and the 3 in 1 wire. and the 6+ wire transfer.
 
Last edited:
day_trippr is on the right path. the issue is that after the python sends the config message the Uno sends back alive but what is weird with your log is that you config ends with $ when it should end with | it may have just been cut off though.

Try stopping the Pytho (sudo /etc/init.d/flowmon stop)
In Arduino studio open the serial monitor.
You should be seeing alive messages coming across. Input C:2:7:8:0:300:200:30:250:0:0| and hit send
You should see the line echoed back to you from the Uno then see a StatusCheck message.
Try your flow meters and you should see a message that starts with U: (update) then P: (pour)

if that works then we just need to get the Uno to sync with the python.

in /arduino/raspberrypints
change line 492 of raspberrypints.ino from delay(100); to delay(1000);
delete raspberrypints.cpp.hex and update the sketch to the Uno
then restart the python ( sudo /etc/init.d/flowmon start)


You are genius it is working. Is there a way how to import recipe from brewersfriend? it will freeze during xml import.

Btw. How would you prevent that extra foaming from flow sensor? Higher pressure? colder?
 
Last edited:
Back
Top