Modernizing Raspberry Pints
Raspberry Pints was one of the first projects I remember being inspired by when I got my first Raspberry Pi (RPi) in 2013.
Got reinspired in 2018 when I started home brewing regularly and using my kegerator. Purchased some flow meters(uxcell 0.1-3L/min 1.2Mpa 7mm Water Flow Hall Sensor Meter for Coffer Maker). I purchased these mainly for the 1/4″ ish hose barb connections, which would fit easily inline with standard 3/16″ beer line. But didn’t make time for the project.
Quarantine 2020, finally it made it to my working projects. I decided I would use an ESP8266 to monitor the flow meters then send the updates directly to the web server via a PHP script to update the database (instead of via a serial line to a python script on the RPi) This way I wasn’t forced to have the RPi inside close to the kegerator. I would use a terrible Windows 10 tablet computer (Celeron processor) as the “screen” at the kegerator. I could run a browser and connect to the web server and see the current keg levels. The tablet was capable of this simple task.
Raspberry Pints is built in a powerful way. It is basically just a PHP interface between a web browser and a MySQL database. Which means it can be installed on any PHP/MySQL server and viewed by any web browser that has access to that server. You don’t actually need a Raspberry Pi, especially if you use the ESP8266 to update the database. This is noted in one of the User Add-ons on the Rasberry Pints page. Running RaspberryPints without a Raspberry Pi
I got a new Raspberry Pi 4 4GB model CanaKit Raspberry Pi 4 4GB Basic Starter Kit with Fan (4GB RAM) by CanaKit and Raspberry Pints was a good first test.
Installed Raspbian 2020-02-13 directly. Had some kind of problem with NOOBS and the RPi 4.
I followed the instructions for build your own w/ Flow Meters. I skipped the display setup stuff because I wouldn’t be displaying from the RPi.
Configuration for the rest is significantly easier with the new Raspbian configuration app.
I have a Google Mesh WiFi system, so setting up a fixed IP from the router was EASY!
Installing Packages for Raspberry Pints is where things diverged from the instruction. In the instruction states one long command to install the whole LAMP stack at once, with old versions.
PHP5 is deprecated.
MySQL is now replaced with MariaDB.
The command doesn’t work.
I used the recommended software menu selection to install each item.
I installed Apache first, Apache2 is still current so that command worked.
Since PHP5 is deprecated I had to update some of the PHP code to work with my PHP7 webserver on the Raspberry Pi.
I used a tool called MySQLConverterTool from Github.
My notes indicate I had to further edit 2 files (I’m not sure what I had to do):
includes/config.php
admin/includes/conn.php
I edited index.php to add a refresh page button so that it was easier to update the browser view.
I wrote a custom sketch in Arduino IDE for the ESP8266 that counts the pulses from the flow meters, then sends the update, via WiFi, to a PHP script that I wrote on the web server (in my case a RPi 4).
The flow meters that I listed above are not good at all for beer. So I purchased Titan 300 meters from brewskey.com. They make their own kegerator monitor system, which may be a good solution for you.
Here is the zipped files from my RPi4, which is currently working.