[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.
created brewpi as a systemd service and removing the crontab entry all together is successfully booting as I had hoped thanks for the great walkthrough as always day_trippr hopefully this helps if anyone else ever runs into this and needs brewpi or anything for that matter to start via systemd. Now I just need to get my flow sensors wired back up! Thanks for everything guys.. I've left my work in case it helps someone else

sudo nano /lib/systemd/system/brewpi.service

***paste in the following save and exit

[Unit]
Description=Brewpi Service
After=multi-user.target

[Service]
Type=idle
ExecStart=/usr/bin/python /home/brewpi/brewpi.py

[Install]
WantedBy=multi-user.target

***

sudo chmod 644 /lib/systemd/system/brewpi.service
sudo systemctl daemon-reload
sudo systemctl enable brewpi.service
sudo systemctl startt brewpi

finally you can check the status with should start on boot with systemd
sudo systemctl status brewpi
 
Without seeing your actual cron entry I would expect a path problem. There isn't a lot else to go on...

Cheers!
crazy part is that I made zero changes to the original crontab entry after changing to the logical ports... so as it worked before no paths should have changed... something else had to be going on there.. I was able to get everything working however via systemd as posted above... cheers
 
lol! I have encountered more mysteries than answers in playing with BrewPi over the years ;)

It appears one would need to create a separate service for each BrewPi instance on a system, yes?

Cheers!
 
Used Notepad++ to find the following references in Raspberry Pints version 2.0.1.

mysql_close
admin\update.php (1 hit)

mysql_connect
install\includes\configprocessor.php (2 hits)
install\includes\config_files.php (2 hits)

mysql_fetch_array
admin\includes\managers\beerStyle_manager.php (2 hits)
admin\includes\managers\beer_manager.php (4 hits)
admin\includes\managers\kegStatus_manager.php (2 hits)
admin\includes\managers\kegType_manager.php (2 hits)
admin\includes\managers\keg_manager.php (5 hits)
admin\includes\managers\tap_manager.php (3 hits)
admin\includes\send_username_ac.php (1 hit)
admin\personalize.php (2 hits)
admin\tap_form.php (1 hit)
admin\update.php (1 hit)
includes\pours.php (2 hits)
index.php (4 hits)

mysql_fetch_row
admin\includes\email_tou.php (1 hit)

mysql_num_rows
admin\includes\checklogin.php (1 hit)
admin\includes\send_username_ac.php (1 hit)

mysql_query
admin\includes\checklogin.php (1 hit)
admin\includes\email_tou.php (1 hit)
admin\includes\insert.php (1 hit)
admin\includes\managers\beerStyle_manager.php (2 hits)
admin\includes\managers\beer_manager.php (6 hits)
admin\includes\managers\kegStatus_manager.php (2 hits)
admin\includes\managers\kegType_manager.php (2 hits)
admin\includes\managers\keg_manager.php (7 hits)
admin\includes\managers\tap_manager.php (11 hits)
admin\includes\sendpassword.php (1 hit)
admin\includes\send_username_ac.php (1 hit)
admin\left_bar.php (1 hit)
admin\Mya.php (3 hits)
admin\personalize.php (2 hits)
admin\push_update.php (1 hit)
admin\tap_form.php (1 hit)
admin\update.php (1 hit)
admin\update_header_text.php (1 hit)
admin\update_header_text_trunclen.php (1 hit)
includes\pours.php (3 hits)
index.php (4 hits)
install\includes\configprocessor.php (2 hits)
install\index.php (1 hit)

mysql_real_escape_string
admin\includes\checklogin.php (2 hits)

mysql_result
admin\left_bar.php (1 hit)
admin\Mya.php (3 hits)
install\index.php (1 hit)

mysql_select_db
install\includes\config_files.php (2 hits)
As promised, I grabbed a couple of SD cards to test with: one will be a clone of my Jessie environment to test upgrading RPints, the other will be a Stretch/PHP7/MariaDB environment to test new installs. What envisage is just a drop-in set of updated files like what I did with the Keg Volume Kalculator mod a couple of pages back: https://www.homebrewtalk.com/forum/index.php?posts/8479841
This should be fun!
 
Upgrading from MySQL5.5 to MariaDB10.0 couldn't have been much easier!

I just did this:
Code:
sudo service mysql stop
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install mariadb-server
sudo reboot

During the sudo apt-get upgrade I had to hit 'q' to escape out of a certificate upgrade message, and during the sudo apt-get install mariadb-server I had to enter my previous MySQL password again, but apart from that it was smooth sailing.

You'll see a few errors like this during the MariaDB install:

Code:
190106 15:37:16 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11
190106 15:37:16 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.

That's because MariaDB uses the Aria engine rather than the InnoDB engine, so you can safely ignore.

screen_20190106-143838.png


Bada bing bada boom!
 
I've been trying to read through the 101 pages of threads and am coming up stumped. Any help would be much appreciated

I'm looking for a step by step install from scratch, or at least what OS (I think that's the right verbiage) to install on a SD card.

I have a Raspberry pi 3B+ and a regular 3B. I would like to use the + and an arduino uno/uno clone. I want to run brewpi for a couple fermenaters and raspberrypints with flow meters. If anybody has a link or can tell me what I should do first. I'm completely new to this raspberry pi universe, so please forgive me for being annoying.
 
I've been trying to read through the 101 pages of threads and am coming up stumped. Any help would be much appreciated

I'm looking for a step by step install from scratch, or at least what OS (I think that's the right verbiage) to install on a SD card.

I have a Raspberry pi 3B+ and a regular 3B. I would like to use the + and an arduino uno/uno clone. I want to run brewpi for a couple fermenaters and raspberrypints with flow meters. If anybody has a link or can tell me what I should do first. I'm completely new to this raspberry pi universe, so please forgive me for being annoying.
If you want to run the jessi software on your 3B start with this post by @day_trippr
https://www.homebrewtalk.com/forum/...-taplist-solution.487694/page-67#post-8040187

one thing I found is if you get the software using the instruction on the raspberry pints site you end up with the latest strech software so get your NOOBS using this link from @kaljade .
https://www.homebrewtalk.com/forum/...-taplist-solution.487694/page-80#post-8187169
 
@day_trippr and @kaljade thank you both for all of the excellent information you two provide to this thread. With your posts I was able to a Rpi 3B up and running Raspberry pints in short order.

I am faking the flow meters for now with a LCD button shield and will first try some of these cheapo flow meters to see how they work next.
https://www.amazon.com/gp/product/B07JWD4C46/?tag=skimlinks_replacement-20

Thanks again.
Should be okay specs wise, only challenge you'll have is working out the number of ticks per ounce and adjusting your pours.php file accordingly. Let us know how you go, I'm super happy with the performance and reliability of the Swissflow SF800s but finding cheaper alternatives has always been popular here.

Cheers,

Kal
 
I've been trying to read through the 101 pages of threads and am coming up stumped. Any help would be much appreciated

I'm looking for a step by step install from scratch, or at least what OS (I think that's the right verbiage) to install on a SD card.

I have a Raspberry pi 3B+ and a regular 3B. I would like to use the + and an arduino uno/uno clone. I want to run brewpi for a couple fermenaters and raspberrypints with flow meters. If anybody has a link or can tell me what I should do first. I'm completely new to this raspberry pi universe, so please forgive me for being annoying.
Alternatively, if you want a simple setup option, start from this page and work your way back looking for a post from @RandR+ with links and an automated install script. Works on the latest version of NOOBS. If you want to go old school and stick with the original RPints, follow the suggested steps above.

Cheers,

Kal
 
Should be okay specs wise, only challenge you'll have is working out the number of ticks per ounce and adjusting your pours.php file accordingly. Let us know how you go, I'm super happy with the performance and reliability of the Swissflow SF800s but finding cheaper alternatives has always been popular here.

Cheers,

Kal

The cost of the SF800 is what made me drag my feet in attempting this project. I am comfortable with the Arduino so I don't mind tuning things to save some money. I have 4 taps so even if they turn out too loose for practical use I am only out about half the price of a single SF800.
 
The cost of the SF800 is what made me drag my feet in attempting this project. I am comfortable with the Arduino so I don't mind tuning things to save some money. I have 4 taps so even if they turn out too loose for practical use I am only out about half the price of a single SF800.
Yeah I hear ya, here in Oz the Swissflows work out to about $100 each including shipping, so I bought mine one at a time.

Good luck!

Cheers,

Kal
 
Alright, after reading through almost all of this giant thread I want to say you guys are awesome for helping all of us get this stuff up and running. I got my first setup done last year using mostly day_trippr's posts since he's covered the stock rpints setup wonderfully. However Christmas brought some new Tilt hydrometers and I'm trying to update my RPi to Stretch so that I can monitor those which means diving back into this setup.

I've followed RandR+'s script so far and was able to get things up and running except for my flow meters. I'm using the UNO with the Adafruit meters and it looks like RandR+'s version is pretty customized for the Alamode. Has anyone tried tweaking that for an UNO? I've attempted just modifying the port the script listens on like I did in the older version but it looks like there's more to it than that.
 
Alright, after reading through almost all of this giant thread I want to say you guys are awesome for helping all of us get this stuff up and running. I got my first setup done last year using mostly day_trippr's posts since he's covered the stock rpints setup wonderfully. However Christmas brought some new Tilt hydrometers and I'm trying to update my RPi to Stretch so that I can monitor those which means diving back into this setup.

I've followed RandR+'s script so far and was able to get things up and running except for my flow meters. I'm using the UNO with the Adafruit meters and it looks like RandR+'s version is pretty customized for the Alamode. Has anyone tried tweaking that for an UNO? I've attempted just modifying the port the script listens on like I did in the older version but it looks like there's more to it than that.
You'll also need to edit your pours.php file to the correct tick count per gallon for adafruit meters, as it's different to the swissflow meters.
 
@kaljade have you updated your Keg Kalculator add-in to match your latest spreadsheet?
And are there any known issues with the installation directions in your earlier post here?
Working up the courage....

Cheers! ;)
 
@kaljade have you updated your Keg Kalculator add-in to match your latest spreadsheet?
And are there any known issues with the installation directions in your earlier post here?
Working up the courage....

Cheers! ;)
Actually, I updated the spreadsheet to match the add-in as that's how I discovered the issue. Only problem with the original install was a hardcoded link in the left menu file which I've since fixed. Should be peachy now, go for it! :)
 
Ok, I think I've had enough beer to give this a try :D
Cloning the running card on my test system now, and while that's going on I compared the affected files in the revert archive to mine and I haven't changed any of those. And I found the line in index.php to change and did that (on a local copy).
Once the backup is done I'll push the new files over, do the chmod thing and reboot.

Cheers! (Fingers crossed ;))
 
Ok, I think I've had enough beer to give this a try :D
Cloning the running card on my test system now, and while that's going on I compared the affected files in the revert archive to mine and I haven't changed any of those. And I found the line in index.php to change and did that (on a local copy).
Once the backup is done I'll push the new files over, do the chmod thing and reboot.

Cheers! (Fingers crossed ;))
Go you good thing!
 
lol!
Point of order while waiting for the cloning to complete: do we do the mysql insert step prior to changing out the affected files - or after?

Cheers!
 
lol!
Point of order while waiting for the cloning to complete: do we do the mysql insert step prior to changing out the affected files - or after?

Cheers!
You can technically do it in any order but if you push the files first, the tap & keg forms will break because they rely on database entries that don't exist yet, so as long as you don't login until after you run the DB query it won't affect anything.
 
I'm using the UNO with the Adafruit meters and it looks like RandR+'s version is pretty customized for the Alamode. Has anyone tried tweaking that for an UNO? I've attempted just modifying the port the script listens on like I did in the older version but it looks like there's more to it than that.

Wish I could help more, but I followed the original install that was setup for alamode. Did you look at python/config.py and uncomment line 8? it setups the port to /dev/ttyACM0 my guess is that should match the Arduino IDE port.

You'll also need to edit your pours.php file to the correct tick count per gallon for adafruit meters, as it's different to the swissflow meters.
As for the pour count, I moved that configuration to the taps configuration in the admin page so people don't need to modify php. Also incase you buy different meters per tap.
 
Et voila! It works! Nice job @kaljade!
Ran through a couple of scenarios and the keg weight follows along appropriately.
I'll update my working system soon, have a couple of other things I need to do to that one anyway.

Cheers! (And thanks again! :mug:)
 
Et voila! It works! Nice job @kaljade!
Ran through a couple of scenarios and the keg weight follows along appropriately.
I'll update my working system soon, have a couple of other things I need to do to that one anyway.

Cheers! (And thanks again! :mug:)
Excellent, glad you like it! Enjoy :)
 
Et voila! It works! Nice job @kaljade!
Ran through a couple of scenarios and the keg weight follows along appropriately.
I'll update my working system soon, have a couple of other things I need to do to that one anyway.

Cheers! (And thanks again! :mug:)
If I know how you work, Dave, you've got a nice list of steps you've followed to get to this point. As you've done countless times in the past, mind posting those instructions for those of us who follow along behind you?
 
Hah! BUSTED! :D

Code:
======================================================================================
January 07, 2019  Add Keg Weight Calculator to RaspberryPints

- Log into system and fire up Mysql:

sudo mysql -u root -p

- Copy and paste the following into the terminal session:

use raspberrypints;
INSERT INTO config ( configName, configValue, displayName, showOnPanel, createdDate, modifiedDate ) VALUES
( 'altitude', '0', 'Altitude', '0', NOW(), NOW() ),
( 'temperature', '0', 'Temperature', '0', NOW(), NOW() ),
( 'pressure', '0', 'Pressure', '0', NOW(), NOW() );
ALTER TABLE kegs
ADD COLUMN maxVolume decimal(6,3) NOT NULL AFTER weight;
UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '1';
UPDATE kegs SET maxVolume = '2.5' WHERE kegTypeId = '2';
UPDATE kegs SET maxVolume = '3' WHERE kegTypeId = '3';
UPDATE kegs SET maxVolume = '10' WHERE kegTypeId = '4';
UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '5';
UPDATE kegs SET maxVolume = '5.16' WHERE kegTypeId = '6';
UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '7';
UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '8';
UPDATE kegs SET maxVolume = '15.5' WHERE kegTypeId = '9';
UPDATE kegs SET maxVolume = '13.2' WHERE kegTypeId = '10';
UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '11';
UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '12';
UPDATE kegs SET maxVolume = '21.62' WHERE kegTypeId = '13';
UPDATE kegs SET maxVolume = '43.23' WHERE kegTypeId = '14';
UPDATE kegs SET maxVolume = '64.85' WHERE kegTypeId = '15';
Quit;

======================================================================================
terminal session:

pi@rpints ~ $ sudo mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 47
Server version: 5.5.41-0+wheezy1 (Debian)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use raspberrypints;
INSERT INTO config ( configName, configValue, displayName, showOnPanel, createdDate, modifiedDate ) VALUES
( 'altitude', '0', 'Altitude', '0', NOW(), NOW() ),
( 'temperature', '0', 'Temperature', '0', NOW(), NOW() ),
( 'pressure', '0', 'Pressure', '0', NOW(), NOW() );
ALTER TABLE kegs
ADD COLUMN maxVolume decimal(6,3) NOT NULL AFTER weight;
UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '1';
UPDATE kegs SET maxVolume = '2.5' WHERE kegTypeId = '2';
UPDATE kegs SET maxVolume = '3' WHERE kegTypeId = '3';
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

UPDATE kegs SET maxVolume = '10' WHERE kegTypeId = '4';
UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '5';
UPDATE kegs SET maxVolume = '5.16' WHERE kegTypeId = '6';
UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '7';
UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '8';
UPDATE kegs SET maxVolume = '15.5' WHERE kegTypeId = '9';
UPDATE kegs SET maxVolume = '13.2' WHERE kegTypeId = '10';
UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '11';
UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '12';
UPDATE kegs SET maxVolume = '21.62' WHERE kegTypeId = '13';
UPDATE kegs SET maxVolume = '43.23' WHERE kegTypeId = '14';
UPDATE kegs SET maxVolume = '64.85' WHERE kegTypeId = '15';
Quit;Database changed
mysql> INSERT INTO config ( configName, configValue, displayName, showOnPanel, createdDate, modifiedDate ) VALUES
    -> ( 'altitude', '0', 'Altitude', '0', NOW(), NOW() ),
    -> ( 'temperature', '0', 'Temperature', '0', NOW(), NOW() ),
    -> ( 'pressure', '0', 'Pressure', '0', NOW(), NOW() );
Query OK, 3 rows affected (0.01 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> ALTER TABLE kegs
    -> ADD COLUMN maxVolume decimal(6,3) NOT NULL AFTER weight;
Query OK, 16 rows affected (0.05 sec)
Records: 16  Duplicates: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '1';
Query OK, 16 rows affected (0.01 sec)
Rows matched: 16  Changed: 16  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '2.5' WHERE kegTypeId = '2';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '3' WHERE kegTypeId = '3';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '10' WHERE kegTypeId = '4';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '5';
Query OK, 0 rows affected (0.01 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '5.16' WHERE kegTypeId = '6';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '7';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '8';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '15.5' WHERE kegTypeId = '9';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '13.2' WHERE kegTypeId = '10';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '11';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '12';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '21.62' WHERE kegTypeId = '13';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '43.23' WHERE kegTypeId = '14';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '64.85' WHERE kegTypeId = '15';
Query OK, 0 rows affected (0.01 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> Quit;
Bye
pi@rpints ~ $

======================================================================================
- check these files against their original versions:
/var/www/admin/includes/managers/keg_manager.php
/var/www/admin/includes/models/keg.php
/var/www/admin/keg_form.php
/var/www/admin/keg_list.php
/var/www/admin/left_bar.php
/var/www/admin/personalize.php
/var/www/admin/tap_form.php
/var/www/includes/config_names.php

No changes from originals found

- copy these files:

/var/www/admin/includes/managers/keg_manager.php
/var/www/admin/includes/models/keg.php
/var/www/admin/keg_form.php
/var/www/admin/keg_list.php
/var/www/admin/left_bar.php
/var/www/admin/personalize.php
/var/www/admin/tap_form.php
/var/www/admin/update_altitude.php
/var/www/admin/update_pressure.php
/var/www/admin/update_temperature.php
/var/www/includes/config_names.php


- After copying the files set access rights:
$ sudo chmod -R 777 /var/www  (didn't do this - properties look correct already)


- Edit index.php

Find this line and comment it out:
$sql = "SELECT `kegTypes`.`maxAmount` as kVolume FROM  `kegs`,`kegTypes` where  kegs.kegTypeId = kegTypes.id and kegs.id =".$kegID[0]."";

Insert this line directly after the above:
$sql = "SELECT `kegs`.`maxVolume` as kVolume FROM `kegs` where kegs.id =".$kegID[0]."";

- Restart and it works!

Cheers!
 
Hah! BUSTED! :D

Code:
======================================================================================
January 07, 2019  Add Keg Weight Calculator to RaspberryPints

- Log into system and fire up Mysql:

sudo mysql -u root -p

- Copy and paste the following into the terminal session:

use raspberrypints;
INSERT INTO config ( configName, configValue, displayName, showOnPanel, createdDate, modifiedDate ) VALUES
( 'altitude', '0', 'Altitude', '0', NOW(), NOW() ),
( 'temperature', '0', 'Temperature', '0', NOW(), NOW() ),
( 'pressure', '0', 'Pressure', '0', NOW(), NOW() );
ALTER TABLE kegs
ADD COLUMN maxVolume decimal(6,3) NOT NULL AFTER weight;
UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '1';
UPDATE kegs SET maxVolume = '2.5' WHERE kegTypeId = '2';
UPDATE kegs SET maxVolume = '3' WHERE kegTypeId = '3';
UPDATE kegs SET maxVolume = '10' WHERE kegTypeId = '4';
UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '5';
UPDATE kegs SET maxVolume = '5.16' WHERE kegTypeId = '6';
UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '7';
UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '8';
UPDATE kegs SET maxVolume = '15.5' WHERE kegTypeId = '9';
UPDATE kegs SET maxVolume = '13.2' WHERE kegTypeId = '10';
UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '11';
UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '12';
UPDATE kegs SET maxVolume = '21.62' WHERE kegTypeId = '13';
UPDATE kegs SET maxVolume = '43.23' WHERE kegTypeId = '14';
UPDATE kegs SET maxVolume = '64.85' WHERE kegTypeId = '15';
Quit;

======================================================================================
terminal session:

pi@rpints ~ $ sudo mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 47
Server version: 5.5.41-0+wheezy1 (Debian)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use raspberrypints;
INSERT INTO config ( configName, configValue, displayName, showOnPanel, createdDate, modifiedDate ) VALUES
( 'altitude', '0', 'Altitude', '0', NOW(), NOW() ),
( 'temperature', '0', 'Temperature', '0', NOW(), NOW() ),
( 'pressure', '0', 'Pressure', '0', NOW(), NOW() );
ALTER TABLE kegs
ADD COLUMN maxVolume decimal(6,3) NOT NULL AFTER weight;
UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '1';
UPDATE kegs SET maxVolume = '2.5' WHERE kegTypeId = '2';
UPDATE kegs SET maxVolume = '3' WHERE kegTypeId = '3';
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

UPDATE kegs SET maxVolume = '10' WHERE kegTypeId = '4';
UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '5';
UPDATE kegs SET maxVolume = '5.16' WHERE kegTypeId = '6';
UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '7';
UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '8';
UPDATE kegs SET maxVolume = '15.5' WHERE kegTypeId = '9';
UPDATE kegs SET maxVolume = '13.2' WHERE kegTypeId = '10';
UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '11';
UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '12';
UPDATE kegs SET maxVolume = '21.62' WHERE kegTypeId = '13';
UPDATE kegs SET maxVolume = '43.23' WHERE kegTypeId = '14';
UPDATE kegs SET maxVolume = '64.85' WHERE kegTypeId = '15';
Quit;Database changed
mysql> INSERT INTO config ( configName, configValue, displayName, showOnPanel, createdDate, modifiedDate ) VALUES
    -> ( 'altitude', '0', 'Altitude', '0', NOW(), NOW() ),
    -> ( 'temperature', '0', 'Temperature', '0', NOW(), NOW() ),
    -> ( 'pressure', '0', 'Pressure', '0', NOW(), NOW() );
Query OK, 3 rows affected (0.01 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> ALTER TABLE kegs
    -> ADD COLUMN maxVolume decimal(6,3) NOT NULL AFTER weight;
Query OK, 16 rows affected (0.05 sec)
Records: 16  Duplicates: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '1';
Query OK, 16 rows affected (0.01 sec)
Rows matched: 16  Changed: 16  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '2.5' WHERE kegTypeId = '2';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '3' WHERE kegTypeId = '3';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '10' WHERE kegTypeId = '4';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '5';
Query OK, 0 rows affected (0.01 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '5.16' WHERE kegTypeId = '6';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '7';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '8';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '15.5' WHERE kegTypeId = '9';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '13.2' WHERE kegTypeId = '10';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '11';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '12';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '21.62' WHERE kegTypeId = '13';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '43.23' WHERE kegTypeId = '14';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '64.85' WHERE kegTypeId = '15';
Query OK, 0 rows affected (0.01 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> Quit;
Bye
pi@rpints ~ $

======================================================================================
- check these files against their original versions:
/var/www/admin/includes/managers/keg_manager.php
/var/www/admin/includes/models/keg.php
/var/www/admin/keg_form.php
/var/www/admin/keg_list.php
/var/www/admin/left_bar.php
/var/www/admin/personalize.php
/var/www/admin/tap_form.php
/var/www/includes/config_names.php

No changes from originals found

- copy these files:

/var/www/admin/includes/managers/keg_manager.php
/var/www/admin/includes/models/keg.php
/var/www/admin/keg_form.php
/var/www/admin/keg_list.php
/var/www/admin/left_bar.php
/var/www/admin/personalize.php
/var/www/admin/tap_form.php
/var/www/admin/update_altitude.php
/var/www/admin/update_pressure.php
/var/www/admin/update_temperature.php
/var/www/includes/config_names.php


- After copying the files set access rights:
$ sudo chmod -R 777 /var/www  (didn't do this - properties look correct already)


- Edit index.php

Find this line and comment it out:
$sql = "SELECT `kegTypes`.`maxAmount` as kVolume FROM  `kegs`,`kegTypes` where  kegs.kegTypeId = kegTypes.id and kegs.id =".$kegID[0]."";

Insert this line directly after the above:
$sql = "SELECT `kegs`.`maxVolume` as kVolume FROM `kegs` where kegs.id =".$kegID[0]."";

- Restart and it works!

Cheers!
Thanks! As always, you rock.
 
Hah! BUSTED! :D

Code:
======================================================================================
January 07, 2019  Add Keg Weight Calculator to RaspberryPints

- Log into system and fire up Mysql:

sudo mysql -u root -p

- Copy and paste the following into the terminal session:

use raspberrypints;
INSERT INTO config ( configName, configValue, displayName, showOnPanel, createdDate, modifiedDate ) VALUES
( 'altitude', '0', 'Altitude', '0', NOW(), NOW() ),
( 'temperature', '0', 'Temperature', '0', NOW(), NOW() ),
( 'pressure', '0', 'Pressure', '0', NOW(), NOW() );
ALTER TABLE kegs
ADD COLUMN maxVolume decimal(6,3) NOT NULL AFTER weight;
UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '1';
UPDATE kegs SET maxVolume = '2.5' WHERE kegTypeId = '2';
UPDATE kegs SET maxVolume = '3' WHERE kegTypeId = '3';
UPDATE kegs SET maxVolume = '10' WHERE kegTypeId = '4';
UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '5';
UPDATE kegs SET maxVolume = '5.16' WHERE kegTypeId = '6';
UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '7';
UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '8';
UPDATE kegs SET maxVolume = '15.5' WHERE kegTypeId = '9';
UPDATE kegs SET maxVolume = '13.2' WHERE kegTypeId = '10';
UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '11';
UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '12';
UPDATE kegs SET maxVolume = '21.62' WHERE kegTypeId = '13';
UPDATE kegs SET maxVolume = '43.23' WHERE kegTypeId = '14';
UPDATE kegs SET maxVolume = '64.85' WHERE kegTypeId = '15';
Quit;

======================================================================================
terminal session:

pi@rpints ~ $ sudo mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 47
Server version: 5.5.41-0+wheezy1 (Debian)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use raspberrypints;
INSERT INTO config ( configName, configValue, displayName, showOnPanel, createdDate, modifiedDate ) VALUES
( 'altitude', '0', 'Altitude', '0', NOW(), NOW() ),
( 'temperature', '0', 'Temperature', '0', NOW(), NOW() ),
( 'pressure', '0', 'Pressure', '0', NOW(), NOW() );
ALTER TABLE kegs
ADD COLUMN maxVolume decimal(6,3) NOT NULL AFTER weight;
UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '1';
UPDATE kegs SET maxVolume = '2.5' WHERE kegTypeId = '2';
UPDATE kegs SET maxVolume = '3' WHERE kegTypeId = '3';
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

UPDATE kegs SET maxVolume = '10' WHERE kegTypeId = '4';
UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '5';
UPDATE kegs SET maxVolume = '5.16' WHERE kegTypeId = '6';
UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '7';
UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '8';
UPDATE kegs SET maxVolume = '15.5' WHERE kegTypeId = '9';
UPDATE kegs SET maxVolume = '13.2' WHERE kegTypeId = '10';
UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '11';
UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '12';
UPDATE kegs SET maxVolume = '21.62' WHERE kegTypeId = '13';
UPDATE kegs SET maxVolume = '43.23' WHERE kegTypeId = '14';
UPDATE kegs SET maxVolume = '64.85' WHERE kegTypeId = '15';
Quit;Database changed
mysql> INSERT INTO config ( configName, configValue, displayName, showOnPanel, createdDate, modifiedDate ) VALUES
    -> ( 'altitude', '0', 'Altitude', '0', NOW(), NOW() ),
    -> ( 'temperature', '0', 'Temperature', '0', NOW(), NOW() ),
    -> ( 'pressure', '0', 'Pressure', '0', NOW(), NOW() );
Query OK, 3 rows affected (0.01 sec)
Records: 3  Duplicates: 0  Warnings: 0

mysql> ALTER TABLE kegs
    -> ADD COLUMN maxVolume decimal(6,3) NOT NULL AFTER weight;
Query OK, 16 rows affected (0.05 sec)
Records: 16  Duplicates: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '1';
Query OK, 16 rows affected (0.01 sec)
Rows matched: 16  Changed: 16  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '2.5' WHERE kegTypeId = '2';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '3' WHERE kegTypeId = '3';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '10' WHERE kegTypeId = '4';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '5' WHERE kegTypeId = '5';
Query OK, 0 rows affected (0.01 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '5.16' WHERE kegTypeId = '6';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '7';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '7.75' WHERE kegTypeId = '8';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '15.5' WHERE kegTypeId = '9';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '13.2' WHERE kegTypeId = '10';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '11';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '10.81' WHERE kegTypeId = '12';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '21.62' WHERE kegTypeId = '13';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '43.23' WHERE kegTypeId = '14';
Query OK, 0 rows affected (0.00 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> UPDATE kegs SET maxVolume = '64.85' WHERE kegTypeId = '15';
Query OK, 0 rows affected (0.01 sec)
Rows matched: 0  Changed: 0  Warnings: 0

mysql> Quit;
Bye
pi@rpints ~ $

======================================================================================
- check these files against their original versions:
/var/www/admin/includes/managers/keg_manager.php
/var/www/admin/includes/models/keg.php
/var/www/admin/keg_form.php
/var/www/admin/keg_list.php
/var/www/admin/left_bar.php
/var/www/admin/personalize.php
/var/www/admin/tap_form.php
/var/www/includes/config_names.php

No changes from originals found

- copy these files:

/var/www/admin/includes/managers/keg_manager.php
/var/www/admin/includes/models/keg.php
/var/www/admin/keg_form.php
/var/www/admin/keg_list.php
/var/www/admin/left_bar.php
/var/www/admin/personalize.php
/var/www/admin/tap_form.php
/var/www/admin/update_altitude.php
/var/www/admin/update_pressure.php
/var/www/admin/update_temperature.php
/var/www/includes/config_names.php


- After copying the files set access rights:
$ sudo chmod -R 777 /var/www  (didn't do this - properties look correct already)


- Edit index.php

Find this line and comment it out:
$sql = "SELECT `kegTypes`.`maxAmount` as kVolume FROM  `kegs`,`kegTypes` where  kegs.kegTypeId = kegTypes.id and kegs.id =".$kegID[0]."";

Insert this line directly after the above:
$sql = "SELECT `kegs`.`maxVolume` as kVolume FROM `kegs` where kegs.id =".$kegID[0]."";

- Restart and it works!

Cheers!
16 kegs! Living the dream... ;)
 
Thanks! I saw when you added the placeholders but I never looked back at the posts.
Yeah, I wanted to keep them all together for for sanity purposes, but sadly the last two are already locked for editing after only a week. I'll try reaching out to an admin to see if they'll make an exception for me.
 
It's less than a week - it may be only a couple of days now.
Total pita for technical threads, it's been mentioned to Management but no joy.
Used to be a month in The Before Times...
 
It's less than a week - it may be only a couple of days now.
Total pita for technical threads, it's been mentioned to Management but no joy.
Used to be a month in The Before Times...
Yeah, it's a bit extreme, oh well looks like once installed it can never be removed ;)
 
I did some testing with this flow meter,
https://www.amazon.com/gp/product/B07JWD4C46/?tag=skimlinks_replacement-20

Using water I got a fairly consistent pulse count, most pint pours came within 2% of each other but some where like 5%. Looks like it gives 1000 pulse per pint. I pushed it at 10 to 15psi and got roughly the same results. It was seeming quite long to pour a pint so I timed it and it was taking about 25sec for a normal 10sec pint pour.

When I tried beer it turned it into pure foam. You could clear beer going in and foam going out.

Looking like no hope for this one unless anyone has any suggestions.

edit: foam my have been caused my john guest adapter being too restrictive
 
Last edited:
At which end did you install the meter? I highly recommend as close to the keg out post as physically possible (tough to do with stiff lines like Ultra 235).

I'm pretty sure the classic Kegbot used meters similar to the Adafruit model (which you can find rebadged all over the place). Somehow they got them to work...

Cheers!
 
At which end did you install the meter? I highly recommend as close to the keg out post as physically possible (tough to do with stiff lines like Ultra 235).

I'm pretty sure the classic Kegbot used meters similar to the Adafruit model (which you can find rebadged all over the place). Somehow they got them to work...

Cheers!

I had the meter about 12in from disconnect and about 10ft of line to a picnic tap. I tried it right next to the disconnect later and still had troubles. I then tried a different keg and that worked better but still foamy. I tried the first keg again without the meter and it poring foamy, not sure what happened it was pouring OK the day before.

I was using a John Guess to 3/16 barb for the flow meter and I think that was restricting the flow too much. I made an adapter with a small piece of stainless 1/4 tubing and that improve the flow and the amount of foam. Looks like to might be OK after all, will need to do some more testing.
 
Back
Top