• 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.
@garzlok asked me how I manage my fork of the code on GitHub, so here's the details. This assumes that you're somewhat familiar with the GitHub Fork and Pull Model and want to make some local stylistic changes to your RPints install. If you want to contribute to the development, you probably already know how to do this so I am not including instructions for that. This also assumes that you have forked the the repository at rtlindne/RaspberryPints (do not fork the original repo as that is defunct) and that your original install was performed using the RandR+ version by the install script.

When you run the install script, it clones the GitHub repository rtlindne/RaspberryPints into /var/www/html/ and this becomes the active code. After you're done with the install, you can inspect this by running the commands
Bash:
cd /var/www/html
git remote -vvv
This should return
Code:
origin    https://github.com/rtlindne/RaspberryPints.git (fetch)
origin    https://github.com/rtlindne/RaspberryPints.git (push)
which says that any git push or pull commands will be run against the RandR+ repository. You can't push to this repo, and updates are done by the install script triggering at git pull to refresh the master branch of the repo you have checked out.

Now you need to point the version on your Pi to your fork of the code. Run the commands below with username replaced by your GitHub username
Bash:
cd /var/www/html
sudo git remote add fork https://github.com/username/RaspberryPints.git
sudo git fetch --all
You can now run the following command to checkout the master branch of your repository
Bash:
cd /var/www/html
sudo git checkout -b fork fork/master
You will see the message
Code:
Branch 'fork' set up to track remote branch 'master' from 'fork'.
Switched to a new branch 'fork'
so your active code is now using your own version of the code. When you do this, you may see messages like
Code:
M    admin/img/logo.png
M    img/logo.png
which indicates that you have locally modified these files.

To update the running version of your code, you can run the command
Code:
cd /var/www/html
sudo git pull
which will update the code against the master branch of your fork.

Note that by adding the remote with https, we have create a read only git repo on the Pi. This is my preference, as I do the actual development work (or style changes) in a repo I have checked out on my desktop machine and then when I'm happy, commit the changes to the master branch on my fork and update the read-only branch on the Pi.

If you want to make your changes in the active code, you can check out your GitHub repo using the SSH protocol, e.g.
[email protected]:RaspberryPints/RaspberryPints.git. You can then push your changes back up to GitHub.
 
Ok got the temp logging updated (again) now it will force each reading iteration to have the same timestamp so I can use my simple query that is fast

Also update the installer two main updates
1. added support for side by side installation with fermentrack.
2. added updating to stash changes before getting latest then after the update is complete, opening a compare so users can see their changes compared to the latest (unfortunately they need to manually apply their changes as the compare happens on temp files)
Mate that is awesome you've made these changes. Updating was a PITA before. So with the compare is it just a matter of copying the changed lines of code from the existing files into the new ones that were made after the update?
 
My Gitkwondo Is not very strong. Followed the directions and still ended up with the commit or stash when trying to pull....leads me to believe, I did something wrong, I am not merged when I thought I was, or I’m doing things backwards.

After I point my Pi to my Git Fork, and then run checkout, can I checkout a specific branch in my fork by changing fork/master to fork/branch_x?

When I run the git pull, does it always pull from Master or does it pull to the branch I specified during checkout?
 
The best way to inspect what is going on is to run git status in the html directory, e.g.
Code:
pi@raspberrypi:/var/www/html $ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   admin/img/logo.png
    modified:   img/logo.png
    modified:   includes/refresh.sh
    modified:   python/Config.py

no changes added to commit (use "git add" and/or "git commit -a")
I have some locally modified but uncommitted files, but other than that I am on the right branch. For me, origin/master is my fork, which I can check with
Code:
pi@raspberrypi:/var/www/html $ git remote -vvv
origin    https://github.com/duncan-brown/RaspberryPints.git (fetch)
origin    https://github.com/duncan-brown/RaspberryPints.git (push)
Note that origin is my repo.

After I point my Pi to my Git Fork, and then run checkout, can I checkout a specific branch in my fork by changing fork/master to fork/branch_x?
Yes, but you need to check it out as a remote tracking branch with
Code:
sudo git checkout -b fork fork/branch_x

When I run the git pull, does it always pull from Master or does it pull to the branch I specified during checkout?
git pull without any arguments does a pull to the currently active branch. You can check this with git status or git branch -vvv
 
So with the compare is it just a matter of copying the changed lines of code from the existing files into the new ones that were made after the update?
Yes, you need to look through the differences for the ones you want to keep (i.e the ones you made) then manually copy and paste them into the same file under your install path (for example you added text to /var/www/html/index.php, the compare will show the difference and you will need to manually copy it back to /var/www/html/index.php)
 
Anyone else getting this when trying to update with the script?

Code:
pi@rpints:~ $ curl -L install.rpints.com | sudo bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   299  100   299    0     0   1738      0 --:--:-- --:--:-- --:--:--  1748
100 54276  100 54276    0     0   115k      0 --:--:-- --:--:-- --:--:--  115k

***Script rpints_install.sh starting.***
RPints Install Detected. Do you wish to Update RPints? [Y/n]:
Stopping Rpints...
No local changes to save
Already up to date.

This message is displayed because 'diff.tool' is not configured.
See 'git difftool --tool-help' or 'git help config' for more details.
'git difftool' will now attempt to use one of the following tools:
kompare emerge vimdiff
Vim: Warning: Output is not to a terminal
Vim: Warning: Input is not from a terminal
" ======================================|" =====================================
" Netrw Directory Listing               |" Netrw Directory Listing
"   /tmp/git-difftool.MnZmkp/left       |"   /tmp/git-difftool.MnZmkp/right
"   Sorted by      name                 |"   Sorted by      name
"   Sort sequence: [\/]$,\<core\%(\.\d\+|"   Sort sequence: [\/]$,\<core\%(\.\d\
"   Quick Help: <F1>:help  -:go up dir  |"   Quick Help: <F1>:help  -:go up dir
" ======================================|" =====================================
../                                     |../
./                                      |./
admin/                                  |admin/
img/                                    |img/
includes/                               |includes/
maintenance_scripts/                    |maintenance_scripts/
python/                                 |python/
util/                                   |util/
bootstrap.sh*                           |LICENSE.md@                       --> /
style.css*                              |README.md@                        --> /
LICENSE.md                              |bootstrap.sh@                     --> /
README.md                               |style.css@                        --> /
~                                       |~
~                                       |~
~                                       |~
<ool.MnZmkp/left [RO] 8,1            All <l.MnZmkp/right [RO] 8,1            All
"/tmp/git-difftool.MnZmkp/right/" Illegal file name
 
Anyone else getting this when trying to update with the script?
That's now normal, you can just close the diff (control+c) if you don't have any manual changes you made locally.

you can install kompare (sudo apt-get install kompare) it will display the differences graphically making it easier to see
 
That's now normal, you can just close the diff (control+c) if you don't have any manual changes you made locally.

you can install kompare (sudo apt-get install kompare) it will display the differences graphically making it easier to see
That works better. Thanks!
 
Ok well back to the drawing board, pours not working again.. Tried stopping flowmon uploading the sketch and starting flow mon again but no luck.

Not the cable issue this time.. So what the hell else can it be???

2020-07-16 17:48:02 RPINTS: valve update: RPU:VALVE:0=0
2020-07-16 17:48:02 RPINTS: valve update: RPU:VALVE:1=0
2020-07-16 17:48:02 RPINTS: valve update: RPU:VALVE:2=0
2020-07-16 17:48:02 RPINTS: valve update: RPU:VALVE:3=0
2020-07-16 17:48:02 RPINTS: Could not import RFID Reader, RFID disabled. Assuming SPI not installed/configured
2020-07-16 17:48:04 RPINTS: starting setup...
2020-07-16 17:48:04 RPINTS: Ino newer than Hex. manual upload assumed
2020-07-16 17:48:04 RPINTS: starting WS server
2020-07-16 17:48:04 RPINTS: starting device monitors...
2020-07-16 17:48:04 RPINTS: starting command server
2020-07-16 17:48:04 RPINTS: resetting Arduino
2020-07-16 17:48:04 RPINTS: starting fan control
2020-07-16 17:48:04 RPINTS: Fan Control fanControl1 is Running
2020-07-16 17:48:04 RPINTS: Not Configured to run Fan
2020-07-16 17:48:05 RPINTS: 1Wire Temperature Thread 1 is Running
2020-07-16 17:48:05 RPINTS: waiting for Arduino to come alive

EDIT:- Got it working..hd to go into config.py and uncomment this line..
config['flowmon.port' ] = '/dev/ttyACM0'

Ive never had to do this before though. Is the update changing this perhaps?? @RandR+

Also since the update Im only seeing readings from 1 temp probe even though Ive got 2 setup in config.

Screen Shot 2020-07-16 at 6.03.01 pm.png
Screen Shot 2020-07-16 at 6.03.30 pm.png
 
Last edited:
Is the update changing this perhaps??
No the update has not touched communication between the pi and Arduino.

1 temp probe even though Ive got 2 setup in config.
The display gets the temperature from the tempLog not the tempProbe table so to see both on the home screen they have to be reading.
Check /sys/bus/w1/devices/ and see how many directories start with 28 then check those directories for a file called w1_slave each directory should have 1 of those files.

You can also do a database check from the terminal (assuming your database is raspberrypints
sudo mysql
use raspberrypints;
select probe, takenDate from tempLog order by takenDate desc LIMIT 10

post the output here an I will review
 
@garzlok asked me how I manage my fork of the code on GitHub, so here's the details. This assumes that you're somewhat familiar with the GitHub Fork and Pull Model and want to make some local stylistic changes to your RPints install. If you want to contribute to the development, you probably already know how to do this so I am not including instructions for that. This also assumes that you have forked the the repository at rtlindne/RaspberryPints (do not fork the original repo as that is defunct) and that your original install was performed using the RandR+ version by the install script.

Thank you for these directions and your help getting this set-up. I always had this damned internal debate To Update or Not To Update my RPints. Over the last 6 months, I've seen the power of GitHub and started to become more familiar with it. To be able to utilize the functionality a little more...well, your help is greatly appreciated.

I know GitHub is not for everyone, but man....I like it!
 
No the update has not touched communication between the pi and Arduino.


The display gets the temperature from the tempLog not the tempProbe table so to see both on the home screen they have to be reading.
Check /sys/bus/w1/devices/ and see how many directories start with 28 then check those directories for a file called w1_slave each directory should have 1 of those files.

You can also do a database check from the terminal (assuming your database is raspberrypints
sudo mysql
use raspberrypints;
select probe, takenDate from tempLog order by takenDate desc LIMIT 10

post the output here an I will review

Only 1 directory starting wth 28 and only 1 file in it called w1_slave

When trying to run sudo mysql use raspberry pints;
then

select probe, takenDate from tempLog order by takenDate desc LIMIT 10. I get this..

pi@rpints:~ $ select probe, takenDate from tempLog order by takenDate desc LIMIT 10
bash: syntax error near unexpected token `takenDate'
 
You’re running the second sql query in the shell. Run
Code:
sudo mysql
and then you’ll get a mariadb prompt where you can run the use and select commands. exit; will get you back to the shell.
 
You’re running the second sql query in the shell. Run
Code:
sudo mysql
and then you’ll get a mariadb prompt where you can run the use and select commands. exit; will get you back to the shell.

Ok I tried that and I don't get anything

pi@rpints:~ $ sudo mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 105354
Server version: 10.3.22-MariaDB-0+deb10u1 Raspbian 10

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

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

MariaDB [(none)]> use raspberrypints;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [raspberrypints]> select probe, takenDate from tempLog order by takenDate desc LIMIT 10
->
 
You need a semicolon after the LIMIT 10. Mariadb is expecting you to continue that command. If you still have that window open, you can just type a semicolon and hit return.
Ahh haa. That did it.... cheers mate.

Heres the output @RandR+

probe | takenDate |
+-----------------+---------------------+
| 28-011929e4f50c | 2020-07-17 19:12:29 |
| 28-011929e4f50c | 2020-07-17 19:11:48 |
| 28-011929e4f50c | 2020-07-17 19:11:08 |
| 28-011929e4f50c | 2020-07-17 19:10:34 |
| 28-011929e4f50c | 2020-07-17 19:09:56 |
| 28-011929e4f50c | 2020-07-17 19:09:15 |
| 28-011929e4f50c | 2020-07-17 19:08:38 |
| 28-011929e4f50c | 2020-07-17 19:08:04 |
| 28-011929e4f50c | 2020-07-17 19:07:30 |
| 28-011929e4f50c | 2020-07-17 19:06:56 |
+-----------------+---------------------+
10 rows in set (0.090 sec)

MariaDB [raspberrypints]>
 
Your RPints database only contains data from one probe. It looks like the problem is that your OS is only seeing one temperature probe, as each probe should create a separate directory that starts with 28 in /sys/bus/w1/devices

I’d start checking the probe connections and/or wiring. Do they have the right pull-up resistors and are the data lines connected to the same GPIO pin?
 
Last edited:
Hello, New to Raspberry Pints.
I recently installed RPints on a Raspberry Pi and I'm looking to make a few adjustments to the layout and database. I'd like to add a location option for my bottled beer. I have a few refrigerators scattered throughout the house (basement, garage, kitchen) and I'd like to point my friends in the right direction. I'm trying to access the database to add a few columns for just this, where should I start? I'm familiar with SQL code, HTML, working knowledge of PHP and MySql Workbench on a Mac and I also installed SQuirreL on the raspberry PI.

Questions:
1. Is there a post that points me to how to access the database? I tried a quick search for a few keywords in the hundreds of post but I wasn't able to find what I was looking for.
2. Should I use SQuirreL or remote connect via my Mac/MySQL workbench? (This is on a local home network)
2a. If so should I connect via SSH or another method?
Thanks!
 
Questions:
1. Is there a post that points me to how to access the database? I tried a quick search for a few keywords in the hundreds of post but I wasn't able to find what I was looking for.
2. Should I use SQuirreL or remote connect via my Mac/MySQL workbench? (This is on a local home network)
2a. If so should I connect via SSH or another method?
most people use phpmyadmin, I find it slow so I enabled port 3306 on MySQL so I can remote into it using MySQL workbench. you can also do sudo mysql from the terminal (or ssh) to access the command line, which is useful for quick queries

The login information for the database and the database name are what you entered during installation
 
most people use phpmyadmin, I find it slow so I enabled port 3306 on MySQL so I can remote into it using MySQL workbench. you can also do sudo mysql from the terminal (or ssh) to access the command line, which is useful for quick queries

The login information for the database and the database name are what you entered during installation
Thank you. I had an issue connecting to the DB, but I found out I had to grant privileges in MySQL to my Mac's IP. Thanks for the reply. It helped steer me in the right direction. Have a great weekend.
Cheers,
Tikki
 
Your RPints database only contains data from one probe. It looks like the problem is that your OS is only seeing one temperature probe, as each probe should create a separate directory that starts with 28 in /sys/bus/w1/devices

I’d start checking the probe connections and/or wiring. Do they have the right pull-up resistors and are the data lines connected to the same GPIO pin?
Everything is wired correctly and Im using the correct pull up resistor. (4.7K) Ive got both probes wired with Gnds together, Sensor wires together going to 1 GPIO. And 3v3 supplying both probes. Pull up is wired between the sensor wires and 3v3. Both probes worked fine for a week until I did the recent update after having the issues that others were.

EDIT:- Disconnected the freezer probe which is the one that was showing and now the fridge probe works, so its not a hardware issues. Any ideas @RandR+
 
Last edited:
Try just one probe or the other alone. If one works but the other doesn't you have an obvious suspect.

Cheers!
The freezer probe was the one working. I disconnected it and now the fridge probe works. So they are both functioning just not together. They both worked fine no problem at all until I did the latest update.

This is the fridge probe with a different address to the freezer probe shown a few posts back

probe | takenDate |
+-----------------+---------------------+
| 28-0114532943aa | 2020-07-18 08:35:35 |
| 28-0114532943aa | 2020-07-18 08:35:04 |
| 28-0114532943aa | 2020-07-18 08:34:33 |
| 28-0114532943aa | 2020-07-18 08:34:02 |
| 28-0114532943aa | 2020-07-18 08:33:31 |
| 28-0114532943aa | 2020-07-18 08:33:00 |
| 28-0114532943aa | 2020-07-18 08:32:29 |
| 28-0114532943aa | 2020-07-18 08:31:59 |
| 28-0114532943aa | 2020-07-18 08:31:28 |
| 28-0114532943aa | 2020-07-18 08:30:57 |
+-----------------+---------------------+
 
Re connected the freezer probe again and now everything is working. I have 2 x 28- folders in sys/bus/w1/devices and the log says this (Showing two probes)

probe | takenDate |
+-----------------+---------------------+
| 28-011929e4f50c | 2020-07-18 08:50:07 |
| 28-011929e4f50c | 2020-07-18 08:49:34 |
| 28-011929e4f50c | 2020-07-18 08:49:01 |
| 28-011929e4f50c | 2020-07-18 08:48:29 |
| 28-011929e4f50c | 2020-07-18 08:47:56 |
| 28-011929e4f50c | 2020-07-18 08:47:23 |
| 28-011929e4f50c | 2020-07-18 08:46:50 |
| 28-011929e4f50c | 2020-07-18 08:46:18 |
| 28-011929e4f50c | 2020-07-18 08:45:45 |
| 28-0114532943aa | 2020-07-18 08:37:44 |
+-----------------+---------------------+
 
Back
Top