[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.
Pretty much everything that runs apache2 requires root privileges to edit. Also you probably want to stop the server process when editing any of its files then start it back up when done...

Cheers!
 
in the install script did you choose to use nginx over apache? if you have Fermentrack then its best to use nginx when installing to prevent conflicts
I tried it both ways. I am new at using python and raspberry pi so originally I thought that installing it using apache. When I could not get that to work, I tried it with the nginx script and received the same result. Both tests failed. I’m running Fermentrack on port 8080, so I don’t think that this is the issue. I do not have any preferences toward apache or nginx but just would like to run these side by side if possible. Thanks for your help so far!
 
nginx script and received the same result
I recommend using nginx if running with fementrack

did you see a prompt like:
Fermentrack detected, do you want to place 'Rpints' Under it

when modifying the nginx configuration make sure to use sudo to launch the text editor (from terminal) otherwise just opening the text editor from the window will not have permissions.
 
I recommend using nginx if running with fementrack

did you see a prompt like:
Fermentrack detected, do you want to place 'Rpints' Under it

when modifying the nginx configuration make sure to use sudo to launch the text editor (from terminal) otherwise just opening the text editor from the window will not have permissions.
Thank you for this information! Yes, I did see that prompt, and on my last attempt I selected 'yes'. However, I did not know to launch text editor from the terminal. Since my Fermentrack is utilizing port 8080, what file(s) do you suspect I will have to modify with the text editor in order for the install to complete?
 
Since my Fermentrack is utilizing port 8080, what file(s) do you suspect I will have to modify with the text editor in order for the install to complete?
what files do you have in: /etc/nginx/sites-available/
im guessing default-fermentrack and maybe default-rpints

the installer will add the configuration for Rpints and if it detects fermentrack is installed switch the port to 81

Maybe try port 81 and see what error you get?
 
what files do you have in: /etc/nginx/sites-available/
im guessing default-fermentrack and maybe default-rpints

the installer will add the configuration for Rpints and if it detects fermentrack is installed switch the port to 81

Maybe try port 81 and see what error you get?
So I edited the default-rpints file to reflect installing rpints in /var/www through the terminal and after directing the install away from going inside Fermentrack, I received this error:

Updating Packages which may require it - Complete.
Fermentrack detected, do you want to place 'Rpints' Under it (i.e. http://fermtrack.ip/RPints) [y/N]:
sed: can't read /usr/share/phpmyadmin/libraries/sql.lib.php: No such file or directory

Searching for default web location.
Where do you want to install RaspberryPints? : /var/www
Installing to: /var/www
URL's Sub Folder: :81
sed: -e expression #1, char 39: unterminated `s' command

Updated /etc/nginx/sites-available/default-rpints

Testing nginx.

ERROR: nginx test failed.


I am still puzzled. Any ideas?
 
Watching closely and pleased to get first post on page 200 of this great thread and program. Keep up the good work.

It is indeed one of the all time long running threads.
And congrats on bagging your white whale :mug: though it's more fun to bag a "thousandth" post, imo.
We have one within sight 😁

Cheers!
 
Testing nginx.

ERROR: nginx test failed.
how did you install fermentrack? The default is now to install it with docker which leaves you free to install any other web server on your pi.

The error is caused because the installer found 2 different php and that caused the replace to fail but then you would have this error
ERROR: PHP test failed.
not the nginx failed.

I did install fermentrack using the old method that installed nginx, then installed Rpints and it work up to that php error. I manually changed default-rpints
replaced #PHPSOCKET# and ngix still worked.
But on my installation i got the gateway error for fermentrack so it seems like it could be fermentrack nginx configuration is old and doesnt work anymore
 
how did you install fermentrack? The default is now to install it with docker which leaves you free to install any other web server on your pi.

The error is caused because the installer found 2 different php and that caused the replace to fail but then you would have this error
ERROR: PHP test failed.
not the nginx failed.

I did install fermentrack using the old method that installed nginx, then installed Rpints and it work up to that php error. I manually changed default-rpints
replaced #PHPSOCKET# and ngix still worked.
But on my installation i got the gateway error for fermentrack so it seems like it could be fermentrack nginx configuration is old and doesnt work anymore
I believe I did use the docker approach, but I could be wrong. I used the script:

(cd fermentrack-tools && sudo ./install.sh)

so that I could alter the port utilized during the process. Do you suggest I reinstall Fermentrack using the docker approach and deal with the port issue later when trying to install rpints?

Thanks for your help!
 
I believe I did use the docker approach, but I could be wrong. I used the script:

(cd fermentrack-tools && sudo ./install.sh)

For the past two years, that would result - by default - in you receiving the "docker" version. Fermentrack doesn't use or install anything PHP related (and, even if it did, as @RandR+ noted it would be segregated into its own container).

Did you happen to install (or try installing) BrewPi Remix at some point?
 
For the past two years, that would result - by default - in you receiving the "docker" version. Fermentrack doesn't use or install anything PHP related (and, even if it did, as @RandR+ noted it would be segregated into its own container).

Did you happen to install (or try installing) BrewPi Remix at some point?
I see. So I need to have rpints point to a new install of php? I’m sorry I’m just very new to understanding the raspberry pi system and programming. I did not install brewpi-remix. The Fermentrack install was on a fresh install of Raspbian. Should I format the card and try this again using the docker approach formally?
 
So I need to have rpints point to a new install of php? I’m sorry I’m just very new to understanding the raspberry pi system and programming. I did not install brewpi-remix. The Fermentrack install was on a fresh install of Raspbian. Should I format the card and try this again using the docker approach formally?
what i would do is install Fermentrack using the docker approach.
Setup to use port 8080 and verify it is working. if not working try again.

Then you should be able to run the installer for Rpints and install normally following the basic prompts. You can use any web server.
the installer should correctly install php for you and Rpints will be your default when you go to your pi ip in a browser.
 
what i would do is install Fermentrack using the docker approach.
Setup to use port 8080 and verify it is working. if not working try again.

Then you should be able to run the installer for Rpints and install normally following the basic prompts. You can use any web server.
the installer should correctly install php for you and Rpints will be your default when you go to your pi ip in a browser.
Thanks for your help! I followed this pipeline and got both to work! Now just waiting on my d32 pro and tft to arrive to flash and finish building my BrewPi-ESP setup. Thanks @Thorrak !
 
Sorry posted this in the wrong thread first, I've deleted it there.

Quick questions about the flowmeter wiring.

I've got the UNO R3 and have also got a Base shield

core-electronics.com.au

Base Shield V2 (Seeed Studio)

As an expansion board, Base Shield v2 has many Grove connectors, making it convenient for you to use Grove products together. And It is compatible with...
core-electronics.com.au
core-electronics.com.au

If I understand correctly I power the rasp pi 4 from the correct 3 A power supply.

Separate power supply to the UNO R3 all connected to the Pi via USB.
Do I set the shield to 5 volts to supply the arduino flow meters?

The shield fits on the top of the R3 and I run VCC, GND and Data from each grove digital connector to each individual flow meter.
I've noted that some people using ribbon connectors or CAT 6 cables to simplify multiple wires out of the keg fridge.

I should be having the flow meters at what distance from each keg? Most of my lines are about 5 foot as evabarrier 4mm internal 8mm external.

Do I need to cover the connections inside the fridge with silicone to protect against condensation?

What type of temperature sensor should I use for the fridge? DSB1820 or an NTC 10k sensor?

The 10K pull up resistor, do I put one for each sensor? and does it goes in parallel to the sensor ie attached to the VCC and GND for each sensor?

I've tested the Raspberry Pi 4 and it's far superior to the Pi 3 I had before, glad finally to get my hands on one.
 
Yes, an RPi4B will be the snappiest 'Pi for this job, though even a 2B works pretty well. But I always recommend avoiding the single core Zero.

Provide the RPi4B with a dedicated 5VDC @ 3A supply, and the UNO R3 a dedicated 9VDC @1A supply via its barrel connector, and tie them together via their USB ports. The shield sits atop the UNO which is a 5V platform, so set the shield accordingly.

Each flow meter should receive 5VDC via the shield. It is also recommended to provide each flow meter data circuit with a 2.2Kohm pull-up resistor to 5VDC, but there have been folks that never used a pull-up and just relied on the programmable pull-ups on the AVR, apparently without problem. It is possible - the bandwidth needed for the meters is sub one kilohertz :)

Otherwise, wiring should not be critical, I have my flow meters original 100cm ribbon cables then connected via twisted pair approximately another 5 feet in total length to the controller complex and traversing at least 4 connector interfaces along the way with no issues.

I have six SF800 flow meters, six ds18b20 temperature sensors, and three fan power leads, all terminated with Tiny XLR connectors plugged into receptacles located in tightly sealed enclosures attached to my custom keezer lid, which puts them fairly out of the way of condensation which if it happens usually is well below the lid level. But I also have a pair of Eva Dry 500 desiccators inside to help keep condensation at bay, and my lid is tighter than any oem lid I've had the pleasure of using.

1693187065498.png


Cheers!
 
@day_trippr
Thank you very helpful as always.

"It is also recommended to provide each flow meter data circuit with a 2.2Kohm pull-up resistor to 5VDC,"

So yellow data wire I attach the resistor to and then other side of resistor goes to a clean 5V DC or the same wire as the 5V DC powering the flow meter?
The yellow data wire also splits to continue back to the shield?

Close as possible to kegs for the flow meter I'm guessing from your picture.
 
Yes, the yellow signal lead connects to a digital pin on the UNO and to one side of the pull-up resistor, with the other side of the resistor connected in some way to 5VDC. The location is non-critical but the voltage must be the same that the Uno uses (ie: don't use 5VDC from the RPi).

I found putting the meters as close to the keg Out posts provides the best quality pours. I think others have found locating the meters at the other end of the beer lines becomes problematic, probably due to temperature difference (warmer) than the keg...

Cheers!
 
Thank you think I've finally understood this pull up resistor thing.
One sensor per digital input on the shield ? and I don't use the I2C connections for any sensors?
You have a lot of inputs to your setup so I'm assuming digital sensors can be distinguished from each other.
 
Yup, one meter data lead per digital pin, no I2C involved.
When you set up R'Pints you'll assign the meters by their digital pin connection, then you can either set the ticks per gallon or use the Calibrate function.

I have six meters using digital IO pins 2 and 5 through 9 as this is an Alamode and IOs 0, 1, 3 and 4 are shared with on-Alamode functions. With an UNO you won't have that problem...

1693258608612.png


Cheers!
 
Last edited:
I was pouring a hazy today when I realized what day it is and why it was significant, and as I'm running the same R'Pints database since Day 1, I dug into the Pours table, found the first entry which provided the tapID, pinID, amountPoured, etc, then vectored to the Taps table to figure out which Beer entry was used, then inspected the Beers table to determine which style was in the keg.

Back when the consumption rate was higher than it is today and I actually felt the need to "plan" on what I was brewing to keep everyone happy I used the database to produce graphs of Keg Volume vs Time of various beers to find which styles were consumed the fastest (IPAs. Duh). So the data is all there, and theoretically I could pull all of the amountPoured values from every single Pours entry into a CSV file then bang it into Excel to calculate a total.

Or, I can just use the value of the last entry in the Taps table - 272 - and multiply that by 5 gallons, for a running total of 1360 gallons since September 1, 2014 (when this set of kegs kicks). It would be a bit less accurate - not all kegs were filled to exactly 5 gallons - but it wouldn't be off by a lot as my habit actually is to put 5.0 gallons in every keg...

Cheers!
 
So the data is all there, and theoretically I could pull all of the amountPoured values from every single Pours entry into a CSV file then bang it into Excel to calculate a total.
sudo mysql
SELECT sum(amountPoured) FROM pours;

i believe that will give you ounces but this will give you gallons
SELECT sum(amountPoured)/128 FROM pours;
 
Thanks!
The classic R'Pints registers pours in gallons so the first command is proper (after logging in and actually connecting to the database).
To wit:

root@bpints:~# sudo mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.

mysql> connect raspberrypints
Current database: raspberrypints

mysql> SELECT sum(amountPoured) FROM pours;
+-------------------+
| sum(amountPoured) |
+-------------------+
| 1342.939 |
+-------------------+
1 row in set (0.00 sec)

mysql>

That's a lot o' pours! :rock:

Cheers!
 
Okay finally starting my go at an installation with flow meters.
Pi4 8Gb, Uno R3 and seeed base shield V2, arduino flowmeter yfs201.
All assembled and updated and rpints installed. Selected flowmeters but no sign of the meter or any idea where to look for it.
I have it plugged into D2 on the shield also tried on D3. But no joy.
Realised that the resistor I attached is 220 K ohm which could be the issue.

So will change that but what is and where is the calibration procedure?

What does the motion detector do?

Do I connect temp sensors to the pi or the base shield I2C connections? I saw earlier that it said pi but that was for @day_trippr who uses / used an alamode.

Thank you
 
Temperature sensors: the ds18b20 data lead(s) all connect to an RPi GPIO. I use GPIO4 (GPIO header pin 7) with a pull-up to 3.3VDC, I use 4.7K. Settings are found under Advanced Hardware - Temperature Probes

The Motion Sensor "unblanks" a directly attached display and can also execute system commands. I have mine play a short mp3 when the screen unblanks. The sensor I use is an inexpensive PIR (passive infrared sensor) associated with Arduino and RPi projects. It's connected to GPIO22 (RPi pin 15) and should not need a pullup. Settings are found under Advanced Hardware - Motion Detectors

Flow meter data leads connect to the Arduino, your UNO in this case, using digital IO pins. You can use digital IO 2 on up to at least 11 (IO 0 and 1 are used for RX/TX comms either using serial or USB or a Bluetooth adapter). On my Alamode I use digital IO pins 2 and 5 through 9 for my six flow meters to avoid on-Alamode features that use some of the IOs I'm avoiding. Flow meter data leads should have pull-ups to 5V, I use 2.2K. Settings are found under Basic Setup - Taps.

Note many functions also require enabling via the Personalization - Configuration table. And the flow meter ticks per volume will have to be set in Basic Settings - Taps (hint: enable "Show Pin Settings"). I use 21888 ticks per gallon based on my SwissFlow SF800 meters.

Cheers!
 
@day_trippr
Thank you.
I've got the Shield set for 5v, changed to 2.2K resistor.
So in basic settings taps do I assign a new tap and tell it to look at pin D2?
I found the bit that has calibrate on it to enter the ticks but is there somewhere that I pour a known volume and can see the ticks generated by that to input the numbers?
I'll track down a pir and get a couple of ds18b20 for the future.
Think I need to go through the settings sans a beer in hand.
 
Thank you.
I've put that pin on for Darth Vader.
Not getting any changes to keg contents.
Should I see flow meter as an option in advanced hardware?
Using a Uno R3 am I meant to be adjusting or entering anything in alamode parts?
There isn't an equivalent menu for the R3, should there be?
I wonder if the R3 is detected or loaded, it has 9V psu, green light on and orange light flashing.
 
i reckon this is the problem

2023-10-05 10:48:44 RPINTS: No such device - Sleeping to try again
2023-10-05 10:48:50 RPINTS: No such device - Sleeping to try again
2023-10-05 10:48:55 RPINTS: Could not import RFID Reader, RFID disabled. Assuming SPI not installed/configured
RPINTS: reflashing Arduino failed, moving on anyways, error was: Command '/usr/share/arduino/hardware/tools/avrdude -C/usr/share/arduino/hardware/tools/avrdude.conf
-patmega328p -calamode -P/dev/ttyACM0 -b115200 -D -Uflash:w:/var/www/html//arduino/raspberrypints/raspberrypints.cpp.hex:i' returned non-zero exit status 127.
2023-10-05 10:49:00 RPINTS: starting WS server
2023-10-05 10:49:00 RPINTS: starting device monitors...
2023-10-05 10:49:00 RPINTS: starting command server
2023-10-05 10:49:00 RPINTS: starting fan control
2023-10-05 10:49:00 RPINTS: Fan Control fanControl1 is Running
2023-10-05 10:49:00 RPINTS: Not Configured to run Fan



not sure from here, i selected usb connection.

will try another usb cable
 
[edit - as I didn't see the above first]

It seems it's looking for an Alamode instead of an UNO.

[end edit - original post follows]

Check the big list of enables under Personalization - Configuration. You need to enable Use Flow Monitoring, for one. You'll find that setting near the bottom.

There are other settings you probably need to set and others you probably want to set.
For what it's worth, here is my configuration table...

rpints_configuration_pages.jpg


Cheers!
 
I checked my build log and there is a point in the installation where you specify USB or Serial communications.
The former applies to an UNO while the latter applies to an Alamode.
So, it appears you have to repeat the installation to change Arduino modes...

Cheers!
 
Actually, you may be able to change the Arduino configuration by editing /var/www/html/rpints/python/Config.py and change the value of
config['flowmon.port'] =

from '/dev/ttyS0'
to '/dev/ttyACM0'

as implied by a familiar looking list found near the top of the file :)

That would preclude the need to rerun the whole installation, I believe.

Once you get the Arduino loaded you will noticed the "blink" LED will pulse at roughly 1 hz...

Cheers!
 
I checked my build log and there is a point in the installation where you specify USB or Serial communications.
The former applies to an UNO while the latter applies to an Alamode.
So, it appears you have to repeat the installation to change Arduino modes...

Cheers!
ive redone the install this am and confirmed that i did select usb. the log sent is after that was done but it was the same before i did reinstall as well.
 
Back
Top