Customize Raspberry Pints

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.

apscherz

Active Member
Joined
Dec 17, 2015
Messages
32
Reaction score
2
Hey guys, I'm looking to do two things in my pints setups at home. I currently run two RPints, with up to 16 beers on tap. Both run their individual database that I copied from one to the other. Obviously this means anytime I create a new beer I have to do it twice. Pain in the butt... but not a deal breaker. I want to be able to share one database between the two (and eventually maybe third), but not sure how to do that. I've tried pointing the mysql from one to the other but never seem to get it to work right (permissions errors). any help?

Other thing I'd like to do is to add an "accolades" tab on the display. Nothing fancy but like a medal counter for what that beer has won in competitions. Any pointers on where to start for this? Cheers!
 
Do you have both RPints displaying exactly the same thing, or are the first 8 taps displayed on one RPints, and the second 8 on the other?

If you want identical information displayed, @day_trippr's solution would work. You'd need to have both RPints talk to the same database (pick one of the machines to serve it) and configure the second machine to make a remote connection to the database.

If the first RPints displays e.g. taps 1-8 and the second displays taps 9-16, then this won't work. The easiest thing to do is pick one of the Pis as your RPints server and have the second just display a web page from the first machine.

Create all 16 taps in the first Pi and maintain everything in one RPints install and database. Then make a copy of index.php named index2.php and hack these so index.php displays taps 1-8 and index2.php displays taps 9-16. Look around line 269 for the code:

https://github.com/rtlindne/RaspberryPints/blob/master/index.php#L269
Use the php array_slice() function to display the subset of $taps you want on each display, and set $numberOfTaps appropriately before the call to printBeerList()

Then on your second Pi, you'd just have it run chrome pointing to the IP address of the first machine that's doing all the work. The first machine would look at http://ip.of.rpints/index.php and the second at http://ip.of.rpints/index2.php
 
No idea if this is germane, but fwiw, if flow meters are involved, we never came up with a working solution for 16 flow meters on a single RaspberryPints instance. The original intent was to stack a Centipede shield atop an Uno - which would service up to 64 faucets - but that effort never reached fruition.

That said, I believe it could be possible to run two instances of the port listener service but tuned to different ports to enable using a pair of Unos each handling eight flow meters. Some massaging would be necessary to establish which Uno handles which tapids, but I'm pretty sure that's a simple tweak of the messaging protocol...

Cheers!
 
Were you successful? Tobor_8thMan did something similar and apparently got it working, I know there were at least a couple of HBTers that had it running.
If I end up having to pull my feet out of the cement they're in ;) I'd likely get behind @RandR+'s branch at this point.

Cheers! (until that time it's SD Card Clone City here :D)
 
Yeah, the two setups are in different rooms with different taps. I was hoping to either host the DB on one of the pints or stand up an Ubuntu server that both could access. just trying to avoid having to duplicate work on both or constantly having to backup/restore from one system to the other :/
 
Good - should simplify things. But now I'm curious, is there really a need to see all 16 tap entries from either console?
Operationally, I'm not getting it, if I'm looking at a list but half the entries are served somewhere else...

Cheers!
 
Good - should simplify things. But now I'm curious, is there really a need to see all 16 tap entries from either console?
Operationally, I'm not getting it, if I'm looking at a list but half the entries are served somewhere else...

Cheers!
Ideally, it's so when I create/ modify a beer in the database, I don't then have to do the same thing on the other pi.
 
Right, you said as much earlier, but I thought there had to be more to it :)
If you currently display all sixteen beers on both consoles, then it really is just a matter of making one RPi the database server and have the other RPi pull its data from that host. Otoh, if you split the tap list across the two machines, you can still share the database, but I'm pretty sure you're gonna need to tweak the index.htm files on both to do that. Might not be a big edit...

Cheers!
 
Right, you said as much earlier, but I thought there had to be more to it :)
If you currently display all sixteen beers on both consoles, then it really is just a matter of making one RPi the database server and have the other RPi pull its data from that host. Otoh, if you split the tap list across the two machines, you can still share the database, but I'm pretty sure you're gonna need to tweak the index.htm files on both to do that. Might not be a big edit...

Cheers!
Yeah, I couldn't seem to get it working when I was trying earlier, wasn't sure if anyone had either a: documented making the change or b: running a dedicated MySQL server that both are accessing, not hosting
 
As one of the first R'Pints users I can say I've not read of this effort prior, so right now you're on an island :)
There's really no need for a separate server though. I suspect whatever issues you might have sharing between your two nodes would exist with three...

Cheers!
 
Ok, I'll try to figure out something. Didn't want to recreate the wheel if I didn't need to. What about the other part though, adding a different field? Is this easily doable or is it a full stack change?
 
Well, it ain't gonna be bean bag if you have to touch the database structure.
Could you describe how you'd like this "accolades" feature to appear?
Would it be an added column with some kind of rating value? Or would there be some underlying function in addition?

Cheers!
 
Well, it ain't gonna be bean bag if you have to touch the database structure.
Could you describe how you'd like this "accolades" feature to appear?
Would it be an added column with some kind of rating value? Or would there be some underlying function in addition?

Cheers!
I think it would be cool to have a column, to the right of the ABV where you could have the icons for how many medals that beer has one. Like a bronze medal with a 3 under it or a gold with 5, etc.
 
Ok, got it. So that would be an added field in the "My Beers" table, which would be pulled into an added column in the tap list display.
Here's a question: which branch/fork are you running now?
Unless you're up to massaging the kit yourself, your best bet might be to install the @RandR+ version, then see if you can cajole him to add your feature :)

Cheers!
 
Ok, got it. So that would be an added field in the "My Beers" table, which would be pulled into an added column in the tap list display.
Here's a question: which branch/fork are you running now?
Unless you're up to massaging the kit yourself, your best bet might be to install the @RandR+ version, then see if you can cajole him to add your feature :)

Cheers!
Looks like the one from @LBussy in 2019. How do I go about getting the install script from @RandyR+
 
The hotlink I've shared previously points to @RandR+'s install script. That script is a modified version of my original script (which I encouraged to happen). The new script gives a choice to install the RandR+ version or the @Tobor_8thMan version. This is the easy to remember link we should likely consistently give to people:
Code:
curl -L install.rpints.com | sudo bash

The rpints.com website is one I registered to serve as a jumping-off point for everyone. I do not maintain or host any code. The https://install.rpints.com is a redirect to RandR+'s github repo-hosted install script.
 
The hotlink I've shared previously points to @RandR+'s install script. That script is a modified version of my original script (which I encouraged to happen). The new script gives a choice to install the RandR+ version or the @Tobor_8thMan version. This is the easy to remember link we should likely consistently give to people:
Code:
curl -L install.rpints.com | sudo bash

The rpints.com website is one I registered to serve as a jumping-off point for everyone. I do not maintain or host any code. The https://install.rpints.com is a redirect to RandR+'s github repo-hosted install script.
Yep, I used this installer and it saved my bacon. I was messing with it for several days trying to get older versions to install before stumbling across this build. You guys are awesome.
 
The hotlink I've shared previously points to @RandR+'s install script. That script is a modified version of my original script (which I encouraged to happen). The new script gives a choice to install the RandR+ version or the @Tobor_8thMan version. This is the easy to remember link we should likely consistently give to people:
Code:
curl -L install.rpints.com | sudo bash

The rpints.com website is one I registered to serve as a jumping-off point for everyone. I do not maintain or host any code. The https://install.rpints.com is a redirect to RandR+'s github repo-hosted install script.
Any guidance on how to get the added field I'm looking for? I can pay in beer!
 
Sorry I'm late to this party, either didn't get or didn't see the email saying Ive been tagged.

1. I think the 2 best ways to solve 2 displays and different taps is to
a. add start tap and end tap parameters to the URL (i.e. 127.0.01/index.html?start=1&end=2), upside quick to add in php, downside each display needs to specify the taps and if someone forgets how then work to figure it out
b. create 2 different pages for the different displays, (i.e. 127.0.01/display1.html) upside easy to figure out the URL to go to, downside a little more effort to setup the in a configurable way (for others to use)

2. I'll respond to the main thread also, but its probably not too hard in my branch, day of work
 
Back
Top