[Initial Release] RaspberryPints - Digital Taplist Solution

HomeBrewTalk.com - Beer, Wine, Mead, & Cider Brewing Discussion Community.

Help Support Homebrew Talk:

buercky

Member
Joined
Sep 8, 2014
Messages
20
Reaction score
3
<script>
$(function() {
var beerList = {
7: {id: 7, name: 'All Day Ale', beerStyleId: 19, notes: '', srm: '3.5', og: '1.048', fg: '1.009', ibu: '29', active: '1', createdDate: new Date('2015-04-20 16:08:18'), modifiedDate: new Date('2015-05-11 19:57:35') }, 2: {id: 2, name: 'Centennial Blonde Ale', beerStyleId: 19, notes: 'Gold color, fluffy white head, smells bready, fruity, yeasty (all fairly faint). Tastes light and crisp with an enjoyable sweet bready-ness. A quality blonde ale. 4% ', srm: '3.6', og: '1.042', fg: '1.010', ibu: '20', active: '1', createdDate: new Date('2014-11-07 00:31:12'), modifiedDate: new Date('2014-11-07 08:17:49') }, 9: {id: 9, name: 'Ditzy Blonde', beerStyleId: 19, notes: 'All Day Ale', srm: '3.8', og: '1.053', fg: '1.002', ibu: '26', active: '1', createdDate: new Date('2015-07-20 13:21:50'), modifiedDate: new Date('2015-08-04 19:24:59') }, 6: {id: 6, name: 'Hard Lemonade', beerStyleId: 83, notes: 'Just like Mikes', srm: '10.0', og: '1.170', fg: '1.040', ibu: '2', active: '1', createdDate: new Date('2015-04-10 23:34:00'), modifiedDate: new Date('2015-05-01 10:35:37') }, 5: {id: 5, name: 'Hibernation', beerStyleId: 50, notes: '', srm: '37.4', og: '1.068', fg: '1.017', ibu: '77', active: '1', createdDate: new Date('2015-04-10 23:27:00'), modifiedDate: new Date('2015-07-20 13:22:42') }, 10: {id: 10, name: 'Kitchen Sink', beerStyleId: 33, notes: 'Easy Drinking Ale', srm: '12.9', og: '1.068', fg: '1.010', ibu: '52', active: '1', createdDate: new Date('2015-09-17 18:26:14'), modifiedDate: new Date('2015-09-17 18:26:14') }, 8: {id: 8, name: 'Raspberry Tea', beerStyleId: 102, notes: '', srm: '0.0', og: '0.000', fg: '0.000', ibu: '0', active: '1', createdDate: new Date('2015-05-01 10:27:00'), modifiedDate: new Date('2015-05-01 10:32:12') }, 3: {id: 3, name: 'Ridge Runner Red Ale', beerStyleId: 31, notes: '&amp;quot;Robust, Dark and Smooth, hold on to your hat cause you&amp;rsquo;ll lose your feet on this one!&amp;quot; Brewed with pale, dark crystal, Munich, flaked barley, black and chocolate malts. Hops include Cascade, Crystal, Challenger and Perle.
', srm: '10.8', og: '1.051', fg: '1.014', ibu: '23', active: '1', createdDate: new Date('2014-11-07 00:38:52'), modifiedDate: new Date('2014-11-07 08:16:50') }, 4: {id: 4, name: 'Summer Fun', beerStyleId: 33, notes: '', srm: '11.8', og: '1.046', fg: '1.010', ibu: '25', active: '1', createdDate: new Date('2015-04-10 23:20:21'), modifiedDate: new Date('2015-04-10 23:20:21') }, 1: {id: 1, name: 'Surly Furious Clone', beerStyleId: 49, notes: 'A tempest on the tongue, or a moment of pure hop bliss? Brewed with a dazzling blend of American hops and Scottish malt, this crimson-hued ale delivers waves of citrus, pine and carmel-toffee. For those who favor flavor, Furious has the hop-fire your taste buds have been screaming for.
', srm: '9.0', og: '1.070', fg: '1.012', ibu: '124', active: '1', createdDate: new Date('2014-11-06 23:18:27'), modifiedDate: new Date('2014-11-07 08:15:50') }, };
 

CaptnDelta

Well-Known Member
Joined
May 7, 2014
Messages
164
Reaction score
26
<script>
$(function() {
var beerList = { ...
Please copy and paste that again, this time making sure you put it into code tags (the little '#' sign up there when editing a post). Otherwise the forum eats the characters that I'm looking for.

Alternatively, if you know your way around the RpI, you can try the following patch:

In your Pi's /var/www/admin/includes/, look for the file 'functions.php'
Code:
cd /var/www/admin/includes/
make a backup via
Code:
sudo cp functions.php functions.php.001
Edit the original with nano (or any other editor)
Code:
sudo nano functions.php
In the file, replace the following single line:
Code:
	return htmlentities ($string, ENT_QUOTES);
with the following two lines:
Code:
       $string = str_replace(array("\n", "\r"), '', $string);
       return json_encode ($string, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP | JSON_UNESCAPED_UNICODE);
Make sure you get both lines in full.
exit by saving with ctrl-o, <enter>, then ctrl-x.

See if that works, that's how I fixed mine. If something breaks, you can always copy the backup over the original.

Cheers,
-Th
 

CaptnDelta

Well-Known Member
Joined
May 7, 2014
Messages
164
Reaction score
26
I think I have it figured out. I noticed a few hard returns at the end of some of the beer descriptions as well as a few inside the descriptions themselves. I edited out all the hard returns and as if by magic all of the fields actually fill themselves out when I select a beer to put on tap.

Thank you for pointing me in the right direction to figure this out.

Hopefully later this week I will have time to install your system on a new SD card.
Yep, the \r or \n control characters are the problem. You can also try the patch in my last post, and it should remove that stuff before generating the JS that drives the list.

Cheers,
-Th
 

CaptnDelta

Well-Known Member
Joined
May 7, 2014
Messages
164
Reaction score
26
--> and chocolate malts. Hops include Cascade, Crystal, Challenger and Perle.
Just took another look, it looks as if you have a return control character after 'Perle'. Try to delete the last character in that description (even tho it looks as if nothing is there). It may work again, unless I overlooked another one (It's alot easier to spot this when the code is quoted with code tags)

Cheers,
-Th
 

CaptnDelta

Well-Known Member
Joined
May 7, 2014
Messages
164
Reaction score
26
Just took another look, it looks as if you have a return control character after 'Perle'. Try to delete the last character in that description (even tho it looks as if nothing is there). It may work again, unless I overlooked another one (It's alot easier to spot this when the code is quoted with code tags)

Cheers,
-Th
Code:
 carmel-toffee. For those who favor flavor, Furious has the hop-fire your taste buds have been screaming for.
',
... and another one after 'for.'

Cheers,
-Th
 

buercky

Member
Joined
Sep 8, 2014
Messages
20
Reaction score
3
Code:
<script>
	$(function() {
		var beerList = { 
			7: {id: 7, name: 'All Day Ale', beerStyleId: 19, notes: '', srm: '3.5', og: '1.048', fg: '1.009', ibu: '29', active: '1', createdDate: new Date('2015-04-20 16:08:18'), modifiedDate: new Date('2015-05-11 19:57:35') }, 2: {id: 2, name: 'Centennial Blonde Ale', beerStyleId: 19, notes: 'Gold color, fluffy white head, smells bready, fruity, yeasty (all fairly faint). Tastes light and crisp with an enjoyable sweet bready-ness. A quality blonde ale. 4% ', srm: '3.6', og: '1.042', fg: '1.010', ibu: '20', active: '1', createdDate: new Date('2014-11-07 00:31:12'), modifiedDate: new Date('2014-11-07 08:17:49') }, 9: {id: 9, name: 'Ditzy Blonde', beerStyleId: 19, notes: 'All Day Ale', srm: '3.8', og: '1.053', fg: '1.002', ibu: '26', active: '1', createdDate: new Date('2015-07-20 13:21:50'), modifiedDate: new Date('2015-08-04 19:24:59') }, 6: {id: 6, name: 'Hard Lemonade', beerStyleId: 83, notes: 'Just like Mikes', srm: '10.0', og: '1.170', fg: '1.040', ibu: '2', active: '1', createdDate: new Date('2015-04-10 23:34:00'), modifiedDate: new Date('2015-05-01 10:35:37') }, 5: {id: 5, name: 'Hibernation', beerStyleId: 50, notes: '', srm: '37.4', og: '1.068', fg: '1.017', ibu: '77', active: '1', createdDate: new Date('2015-04-10 23:27:00'), modifiedDate: new Date('2015-07-20 13:22:42') }, 10: {id: 10, name: 'Kitchen Sink', beerStyleId: 33, notes: 'Easy Drinking Ale', srm: '12.9', og: '1.068', fg: '1.010', ibu: '52', active: '1', createdDate: new Date('2015-09-17 18:26:14'), modifiedDate: new Date('2015-09-17 18:26:14') }, 8: {id: 8, name: 'Raspberry Tea', beerStyleId: 102, notes: '', srm: '0.0', og: '0.000', fg: '0.000', ibu: '0', active: '1', createdDate: new Date('2015-05-01 10:27:00'), modifiedDate: new Date('2015-05-01 10:32:12') }, 3: {id: 3, name: 'Ridge Runner Red Ale', beerStyleId: 31, notes: '&amp;quot;Robust, Dark and Smooth, hold on to your hat cause you&amp;rsquo;ll lose your feet on this one!&amp;quot; Brewed with pale, dark crystal, Munich, flaked barley, black and chocolate malts. Hops include Cascade, Crystal, Challenger and Perle.
', srm: '10.8', og: '1.051', fg: '1.014', ibu: '23', active: '1', createdDate: new Date('2014-11-07 00:38:52'), modifiedDate: new Date('2014-11-07 08:16:50') }, 4: {id: 4, name: 'Summer Fun', beerStyleId: 33, notes: '', srm: '11.8', og: '1.046', fg: '1.010', ibu: '25', active: '1', createdDate: new Date('2015-04-10 23:20:21'), modifiedDate: new Date('2015-04-10 23:20:21') }, 1: {id: 1, name: 'Surly Furious Clone', beerStyleId: 49, notes: 'A tempest on the tongue, or a moment of pure hop bliss? Brewed with a dazzling blend of American hops and Scottish malt, this crimson-hued ale delivers waves of citrus, pine and carmel-toffee. For those who favor flavor, Furious has the hop-fire your taste buds have been screaming for.
', srm: '9.0', og: '1.070', fg: '1.012', ibu: '124', active: '1', createdDate: new Date('2014-11-06 23:18:27'), modifiedDate: new Date('2014-11-07 08:15:50') }, 		};
		
		var kegList = {
 

CaptnDelta

Well-Known Member
Joined
May 7, 2014
Messages
164
Reaction score
26
CaptnDelta your awesome! Thanks for the help:mug:
Glad it worked for you :mug:

Code:
<script>
	$(function() {
		var beerList = { 
			7: {id: 7, name: 'All Day Ale', beerStyleId: 19, notes: '', srm: '3.5', og: '1.048', fg: '1.009', ibu: '29', active: '1', createdDate: new Date('2015-04-20 16:08:18'), modifiedDate: new Date('2015-05-11 19:57:35') }, 2: {id: 2, name: 'Centennial Blonde Ale', beerStyleId: 19, notes: 'Gold color, fluffy white head, smells bready, fruity, yeasty (all fairly faint). Tastes light and crisp with an enjoyable sweet bready-ness. A quality blonde ale. 4% ', srm: '3.6', og: '1.042', fg: '1.010', ibu: '20', active: '1', createdDate: new Date('2014-11-07 00:31:12'), modifiedDate: new Date('2014-11-07 08:17:49') }, 9: {id: 9, name: 'Ditzy Blonde', beerStyleId: 19, notes: 'All Day Ale', srm: '3.8', og: '1.053', fg: '1.002', ibu: '26', active: '1', createdDate: new Date('2015-07-20 13:21:50'), modifiedDate: new Date('2015-08-04 19:24:59') }, 6: {id: 6, name: 'Hard Lemonade', beerStyleId: 83, notes: 'Just like Mikes', srm: '10.0', og: '1.170', fg: '1.040', ibu: '2', active: '1', createdDate: new Date('2015-04-10 23:34:00'), modifiedDate: new Date('2015-05-01 10:35:37') }, 5: {id: 5, name: 'Hibernation', beerStyleId: 50, notes: '', srm: '37.4', og: '1.068', fg: '1.017', ibu: '77', active: '1', createdDate: new Date('2015-04-10 23:27:00'), modifiedDate: new Date('2015-07-20 13:22:42') }, 10: {id: 10, name: 'Kitchen Sink', beerStyleId: 33, notes: 'Easy Drinking Ale', srm: '12.9', og: '1.068', fg: '1.010', ibu: '52', active: '1', createdDate: new Date('2015-09-17 18:26:14'), modifiedDate: new Date('2015-09-17 18:26:14') }, 8: {id: 8, name: 'Raspberry Tea', beerStyleId: 102, notes: '', srm: '0.0', og: '0.000', fg: '0.000', ibu: '0', active: '1', createdDate: new Date('2015-05-01 10:27:00'), modifiedDate: new Date('2015-05-01 10:32:12') }, 3: {id: 3, name: 'Ridge Runner Red Ale', beerStyleId: 31, notes: '&amp;quot;Robust, Dark and Smooth, hold on to your hat cause you&amp;rsquo;ll lose your feet on this one!&amp;quot; Brewed with pale, dark crystal, Munich, flaked barley, black and chocolate malts. Hops include Cascade, Crystal, Challenger and Perle.
', srm: '10.8', og: '1.051', fg: '1.014', ibu: '23', active: '1', createdDate: new Date('2014-11-07 00:38:52'), modifiedDate: new Date('2014-11-07 08:16:50') }, 4: {id: 4, name: 'Summer Fun', beerStyleId: 33, notes: '', srm: '11.8', og: '1.046', fg: '1.010', ibu: '25', active: '1', createdDate: new Date('2015-04-10 23:20:21'), modifiedDate: new Date('2015-04-10 23:20:21') }, 1: {id: 1, name: 'Surly Furious Clone', beerStyleId: 49, notes: 'A tempest on the tongue, or a moment of pure hop bliss? Brewed with a dazzling blend of American hops and Scottish malt, this crimson-hued ale delivers waves of citrus, pine and carmel-toffee. For those who favor flavor, Furious has the hop-fire your taste buds have been screaming for.
', srm: '9.0', og: '1.070', fg: '1.012', ibu: '124', active: '1', createdDate: new Date('2014-11-06 23:18:27'), modifiedDate: new Date('2014-11-07 08:15:50') }, 		};
		
		var kegList = {
I guess you figured why the code tags help :)

BTW, this is fixed as a bug in the other RPints thread. If you wanna help me test it, check it out...

Cheers,
-Th
 

droptyne

Member
Joined
Jan 7, 2014
Messages
8
Reaction score
0
Is there anyway to change the color of the text, I want to use a certain background, and you cannot see clearly the text of the beer names
 

day_trippr

Moderna Or Bust! :D
Joined
May 31, 2011
Messages
35,944
Reaction score
18,381
Location
Stow, MA
Sure. The things you can play with are in /var/www/style.css and /var/www/index.php. I did all kinds of size tweaking to tune the tap list for the (4:3) display I use on my keezer, change the font colors, and added some functionality. Just be sure to back up good files before playing with them...

Cheers!
 

shawnmason01

Active Member
Joined
Jun 7, 2012
Messages
26
Reaction score
4
Location
Fort Worth
Has anyone gotten the flow controls working using an arduino connected via USB to the Raspberry Pi.

I am currently using the GPIO port for a TFT display
 

wbarber69

Well-Known Member
Joined
Oct 13, 2013
Messages
2,191
Reaction score
263
I've got mine working over bt. but I had to use usb to program.
 

day_trippr

Moderna Or Bust! :D
Joined
May 31, 2011
Messages
35,944
Reaction score
18,381
Location
Stow, MA
I'm thinking this should be a trivial change - the flow_monitor listener probably just needs to be told to listen to a USB port instead of the serial port we use with the AlaMode (which is basically an UNO configured as an RPi shield).

Like, maybe swap these lines in flow_monitor.py?

#The following line is for serial over GPIO
port = '/dev/ttyS0'
#The following line is for serial over USB
#port = '/dev/ttyACM0'

Cheers!
 

shawnmason01

Active Member
Joined
Jun 7, 2012
Messages
26
Reaction score
4
Location
Fort Worth
thanks for the input guys!

Now i just have to find a good and cheaper source for the flow controls and I will try this out. I like the thought of using BT for it.

My task for today is to get my TFT working as my main display for the pi
 

wbarber69

Well-Known Member
Joined
Oct 13, 2013
Messages
2,191
Reaction score
263
I'm using the 1/4" ones, but I don't see why you couldn't use the 1/2" ones. I'd actually recommend you use the half inch ones because I had to drill out the 1/4" ones to get it to work without foaming. and 1/2" npt and 1/2" bsp are much better at kinda threading together than the 1/4" which needed quite a bit of Teflon to seal up.
 

day_trippr

Moderna Or Bust! :D
Joined
May 31, 2011
Messages
35,944
Reaction score
18,381
Location
Stow, MA
The ISP handling the site definitely had shut 'em down - I saw an "account suspended" page when I checked last night.

Someone put another quarter in the slot - for which I say "Thanks guys!"

Cheers!
 

kaljade

Well-Known Member
Joined
Aug 14, 2015
Messages
351
Reaction score
69
Location
Bathurst
The ISP handling the site definitely had shut 'em down - I saw an "account suspended" page when I checked last night.

Someone put another quarter in the slot - for which I say "Thanks guys!"

Cheers!
Yep, definitely back up now :)
 

gtmaus

Well-Known Member
Joined
May 12, 2012
Messages
187
Reaction score
32
Location
St. Louis
I started my install today. Everything was rolling along until I tried to install the chromium browser. This is what I got. Any help would be appreciated

'Chromium-Browser' has no installation canidate
 

CaptnDelta

Well-Known Member
Joined
May 7, 2014
Messages
164
Reaction score
26
ok so I'm downloading the Raspbian Wheezy zip and not the Noobs zip as per step 2 of the build you own instructions???
Yes, and follow the instructions here to install the OS: https://www.raspberrypi.org/documentation/installation/installing-images/README.md

Then jump back to the RPints instructions.

The web site is out of date, and hasn't been maintained in awhile.
There is also a newer thread over on this link: https://www.homebrewtalk.com/showthread.php?t=487694
where this has been answered a few times already.

Cheers,
-Th
 

gtmaus

Well-Known Member
Joined
May 12, 2012
Messages
187
Reaction score
32
Location
St. Louis
Alright bout ready to throw in the towel on this one.
Redid the whole process with the other OS. Everything appeared to be rolling smoothly. I got all the way past installing chromium when the instructions required a reboot. It shut down started to reboot then went to a black screen. Nothing will pull it out. Anyone have any ideas?
Should I just wipe the card clean and start again?
 

CaptnDelta

Well-Known Member
Joined
May 7, 2014
Messages
164
Reaction score
26
Alright bout ready to throw in the towel on this one.
Redid the whole process with the other OS. Everything appeared to be rolling smoothly. I got all the way past installing chromium when the instructions required a reboot. It shut down started to reboot then went to a black screen. Nothing will pull it out. Anyone have any ideas?
Should I just wipe the card clean and start again?
Marginal power supply?
Bad HDMI cable?
Cheap SD card?

Could be any of those. If you try again, use a different card for now (to eliminate one of the problems). What are you using as power supply?

Cheers,
-Th
 

gtmaus

Well-Known Member
Joined
May 12, 2012
Messages
187
Reaction score
32
Location
St. Louis
Everything was purchased off of Amazon through the links on raspberry pints for wo flow meters.
I'll give it a another shot tomorrow with a different card.
What's the minimum size card I'd need? The last one was a 16g
 

CaptnDelta

Well-Known Member
Joined
May 7, 2014
Messages
164
Reaction score
26
16gig is plenty, it'll run on a 4gig card.

If you got an iPhone, the little square chargers work well as power supply.

Cheers
-Th
 

Snicklefritz

Well-Known Member
Joined
Nov 8, 2013
Messages
469
Reaction score
90
Location
Pittsburgh
Since I run my rpints on a tablet and I don't use the flow meters I wanted a cheap and dirty way to track pours. I think I may have mentioned in this thread before that I was working on some touch controls. Here is the first thing I've implemented:

http://brewingintheburgh.com/raspberrypints/

Tap (or click) on any row and a popup will appear allowing you to select how much you are pouring with a slider. Hit Pour and the amount you entered will be subtracted from the amount remaining in the keg. Simple and should at least give you a general idea how much you have left in the kegs.

If anyone is interested I will share the code.
 

DrunkleJon

Objects in mirror are closer than they appear
Lifetime Supporter
Joined
Jan 18, 2011
Messages
8,187
Reaction score
2,567
Location
Alexandria
Nice. Before the flow meters were an option (and I bought them) that was something I was wanting. Would still be nice for those times that for one reason or another the flow meters are out of commission (ahem... they come unplugged due to shoddy redneck rigged wiring. I really need to fix this)
 
Joined
Feb 17, 2010
Messages
14,614
Reaction score
3,599

day_trippr

Moderna Or Bust! :D
Joined
May 31, 2011
Messages
35,944
Reaction score
18,381
Location
Stow, MA
Very nice! :mug:

Any chance you could write up a "How To" for the gui changes?
There've been a couple of similar layouts buried in the bowels of one of the R'Pints threads, it'd be great to have one more current...

Cheers!
 
Joined
Feb 17, 2010
Messages
14,614
Reaction score
3,599
Very nice! :mug:

Any chance you could write up a "How To" for the gui changes?
There've been a couple of similar layouts buried in the bowels of one of the R'Pints threads, it'd be great to have one more current...

Cheers!
Thanks. I plan to post the code when I have it finished, and I'll see if I can put together a quick "How To".

Nice job KCBrewer! Ditto on request for code. I like my dual column layout, but I like yours too! I'd like to try it out. :)
Thanks. Your version was one I liked a lot when searching through here. It basically requires changing it from one loop that fills from each row of the database to a separate loop for each field of the database, plus some CSS changes.
 

ishcor2000

Well-Known Member
Joined
Aug 7, 2011
Messages
58
Reaction score
1
Location
Waterloo
I know I inquired about this a little while ago, but I was still wondering if anyone was able to split the display vertically to basically have two different keezers on display.
Ex. I have 2 different keezers so I would like to put "basement keezer" after tap #4 to show that these taps are in the basement vs. upstairs keezer.

I attached a picture of what JonW has, but was hoping to edit the index.php to do this vertically instead of horizontally.

Thank you for any input.

beerboard1.jpg
 
Top