Linux/Coldfusion DIY Tap Display Project

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.
Making progress! Try running this command at the mysql prompt:

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |

You may want to create a specific database.

mysql> create database brew;

then grant all:

mysql> grant all on brew.* TO 'doghair'@'%' IDENTIFIED BY 'doghair';

That creates a global user doghair, password doghair

Back at the shell command:

mysql -u doghair -pdoghair

mysql> use brew;
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
mysql> show tables;
+------------------------+
| Tables_in_brew |


From there create your table structure that the webpage will query.
 
AWESOME help man... I appreciate it. We're getting there!

(created as 'cftaplist' not 'brew')

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.01 sec)

mysql> create database cftaplist;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on cftaplist.* TO 'doghair'@'%' IDENTIFIED BY 'doghair';
Query OK, 0 rows affected (0.00 sec)

mysql> use cftaplist
Database changed
mysql> show tables;
Empty set (0.00 sec)

mysql>
 
how do i create tables from here? I can populate them with a page, but I'm not sure how to create actual tables...

This is my very first experience with "command line sql" (or at least sql from a linux terminal).
 
Google "create table SQL syntax" for an overload of information. You can probably use char for all your data types. I can try to give an example later when I'm not on the iPad.
 
Aw, you picked the "other" database system ;)

If you were using sqlite3, you'd do something like this:

$ sqlite3 temp_data.db
BEGIN;
CREATE TABLE temps (timestamp DATETIME, temp0 NUMERIC, temp1 NUMERIC, temp2 NUMERIC);
COMMIT;
.quit

I'm betting mysql won't be way different...

Cheers!
 
It's the DIY forum so not against doing your own thing but have you seen the "Raspberry Pints" project on here?

There is also a commercial product called "Digital Pour" that has similar features.
 
You can use standard SQL syntax with mysql - here's an example based off one of your screen shots:

mysql> create database brew;
Query OK, 1 row affected (0.00 sec)

mysql> use brew;
Database changed
mysql> create table taplist (tapnumber int, beername char (100), beerstyle char(50), abv int, srm int, ibu int, brewed char (20), kegged char (20));
Query OK, 0 rows affected (0.06 sec)

mysql> insert into taplist values (1, "Old Mad Heifer", "Saison", 5.0, 8.5, 10,
"March 15 2014", "April 15 2014");
Query OK, 1 row affected (0.01 sec)

mysql> select * from taplist;
+-----------+----------------+-----------+------+------+------+---------------+---------------+
| tapnumber | beername | beerstyle | abv | srm | ibu | brewed | kegged |
+-----------+----------------+-----------+------+------+------+---------------+---------------+
| 1 | Old Mad Heifer | Saison | 5 | 9 | 10 | March 15 2014 | April 15 2014 |
+-----------+----------------+-----------+------+------+------+---------------+---------------+
1 row in set (0.00 sec)

That's about all I'm good for - you have a number of ways to get *to* a mysql database, but I don't know what the best way to query it from your webpage.
 
It's the DIY forum so not against doing your own thing but have you seen the "Raspberry Pints" project on here?

There is also a commercial product called "Digital Pour" that has similar features.

Ya I thought about going the Raspberry Pi route, but it just seemed like it could be a PITA to constantly update... I'm sure someone has a cool system for it (and I'll definitely have to check it out), but this is just something unique I wanted to try.

The MySQL module within Webmin will allow you to create databases, tables etc.

http://ubuntuhandbook.org/index.php/2013/12/install-webmin-official-repository-ubuntu/

Awesome, thanks for the link!

OK, created an empty database in MySQL using the Webmin MySQL module, added it as a data source to Coldfusion.

I'm ready for the next instalment :D

Stay tuned, we'll be right back after this!
 
Anyone have any suggestions for designs? Anything you'd like to see, or functionality that would be cool?
 
Anyone have any suggestions for designs? Anything you'd like to see, or functionality that would be cool?

Might be good time to skim through the RaspberryPints thread. The group had a robust stream of feature requests going for weeks if not months, and as it's a taplist vs taplist situation (at least until R'Pints V2.0 comes out with an expanded capabilities set) there are plenty of ideas that could be interesting to you...

Cheers!
 
Anyone have any suggestions for designs? Anything you'd like to see, or functionality that would be cool?

Personally I much prefer the layout you have in mind over the "Raspberry Pints" or the "Digital Pour" layouts. I have 6 taps on my bar and the side by side vertical layout makes more sense in my mind.

This, for me, is about as much information as is needed otherwise it can look a bit too busy. I would look to lose the SRM as this is to be shown in the 'pint' animation and replaced with the date it was tapped.
sample.jpg
 
Cool start of a project! Why not go responsive design than a fixed? Your mockup looks similar to theses guys which is vertical tap display which is how I like also.

ImageUploadedByHome Brew1407536186.403496.jpg
 
Personally I much prefer the layout you have in mind over the "Raspberry Pints" or the "Digital Pour" layouts. I have 6 taps on my bar and the side by side vertical layout makes more sense in my mind.

This, for me, is about as much information as is needed otherwise it can look a bit too busy. I would look to lose the SRM as this is to be shown in the 'pint' animation and replaced with the date it was tapped.

Thanks, I like the horizontal too, though I had planned on also having an option for vertical - for those who want it that way. The whole idea is that you can totally customize it the way you want it, without having to know code or anything.

Cool start of a project! Why not go responsive design than a fixed? Your mockup looks similar to theses guys which is vertical tap display which is how I like also.

Thanks! What do you mean about responsive? The idea here is to be able to click 'edit', and change the number of taps, the title at the top, the background image, the beer names and info, etc...
 
Dude this is freggin' AWESOME!!! :mug:

I would love to see something like that in my tap room. Right now I am just running an interactive TV (PC monitor) using an installed software and its almost like an ongoing PowerPoint. I LOVE the animations and all the different features you put into this.

Have a homebrew on me!
 
Sadly, nothing. Work picked up, I've been driving back and forth from MA to NJ every week, plus i have a couple other new web clients. I imagine after the holidays I'll have some more time to drop back into this.

The worst part is, it's at like 90%. Just need to polish it up and get it done.

Looking for ColdFusion volunteers...
 
Project is back on the front burner. I had a super busy October, spent the month out-of-state for work, then the holidays are our busy season, so that was crazy. I also just finished an (epic) brew panel. I should have started a thread on that. Maybe I'll do that now.

Anyways, I'm going to jump back in and see if I can figure out the bugs.
 
Just FYI, you are aware that Adobe isn't supporting Flash on Linux any longer, right? If you want Flash, you pretty much have to go with the Chrome browser or Chromium browser (open source version of Chrome.)
 
Just FYI, you are aware that Adobe isn't supporting Flash on Linux any longer, right? If you want Flash, you pretty much have to go with the Chrome browser or Chromium browser (open source version of Chrome.)

I was not, but I'm not worried about supporting an open-source version of an OS or browser... Those Linux guys are pretty crafty and can probably figure it out.
 
ColdFusion volunteer here, hope this isn't spaghetti code lol

So... I need to get back "in the zone" so to speak, and figure out where I left off. I think I was having an issue with accounts, though I don't remember it as major.

I'm definitely still wondering how I can make ABV translate itself to the color in the flash video... Unless I just make all different color videos, but that doesn't allow me to make different variations for berry color, etc.
 
Ok, calling all CF/SQL guys here.

I'm stuck at one part in the code. When a new user signs up, they set up their preferences. Part of that is choosing how many taps your bar has (call it X). The code takes this and then passes you to another page where you enter X number of beer details. I have a CFOUTPUT repeating X times, but i need #tapnumber# variable to be inserted into each item. If that makes sense.

Here's some code:

Code:
<tr height="500">
     <td valign="top">
    	<center>
  		<cfform method="post" action="act_BeerOptions.cfm">

    	<cfoutput query="getBeers">
        <!---	
		THIS IS BROKEN BECAUSE #TAPNUMBER# BELOW IS NOT DEFINED.
		
		--->
        
			<br>
            <br>
		<font face="Arial Narrow" color="ffffff" size="3">Tap 

#tapnumber# - Full?</font>
			<cfinput type="checkbox" name="beer#tapnumber#isfull" 

value="IsFull" checked  onClick="Display('IsFull');"> 
			<div ID="IsFull" style="display:block">
		<font face="Arial Narrow" color="ffffff" size="3">Tap 

#tapnumber# Name</font>
            <br>
			<cfinput id="beer#tapnumber#name" 

name="beer#tapnumber#name" type="text" maxlength="255" value=""/> 
            <br>
            <br>
		<font face="Arial Narrow" color="ffffff" size="3">Tap 

#tapnumber# Style</font>
            <br>
			<cfinput id="beer#tapnumber#style" 

name="beer#tapnumber#style" type="text" maxlength="255" value=""/> 
            <br>
            <br>
		<font face="Arial Narrow" color="ffffff" size="3">Tap 

#tapnumber# ABV</font>
            <br>
			<cfinput id="beer#tapnumber#ABV" 

name="beer#tapnumber#ABV" type="text" maxlength="255" value=""/> 
            <br>
            <br>
		<font face="Arial Narrow" color="ffffff" size="3">Tap 

#tapnumber# SRM</font>
            <br>
			<cfinput id="beer#tapnumber#SRM" 

name="beer#tapnumber#SRM" type="text" maxlength="255" value=""/> 
            <br>
            <br>
		<font face="Arial Narrow" color="ffffff" size="3">Tap 

#tapnumber# IBU</font>
            <br>
			<cfinput id="beer#tapnumber#IBU" 

name="beer#tapnumber#IBU" type="text" maxlength="255" value=""/> 
            <br>
            <br>
		<font face="Arial Narrow" color="ffffff" size="3">Tap 

#tapnumber# Tap Date</font>
            <br>
			<cfinput id="beer#tapnumber#tapdate" 

name="beer#tapnumber#tapdate" type="text" maxlength="255" value=""/> 
            <br>
            <br>
		</div>

    	</cfoutput>
		
			<cfinput name="submit" type="submit" value="Submit">
        	<cfinput name="custid" type="hidden" value="#url.custid#">
        	<cfinput name="tapqty" type="hidden" value="#url.tapqty#">
        	<cfinput name="title1" type="hidden" value="#url.title1#">
        	<cfinput name="title2" type="hidden" value="#url.title2#">
        </cfform>

For each beer, there's a number of database entries. I need those to repeat for X number of beers.

For example, if they have 2 beers on tap, then the form passes:
  • beer#tapnumber#isfull
  • beer#tapnumber#name
  • beer#tapnumber#style
  • beer#tapnumber#ABV
  • beer#tapnumber#SRM
  • beer#tapnumber#IBU
  • beer#tapnumber#tapdate

So, it should actually pass:
  • beer1isfull
  • beer1name
  • beer1style
  • beer1ABV
  • beer1SRM
  • beer1IBU
  • beer1tapdate
  • beer2isfull
  • beer2name
  • beer2style
  • beer2ABV
  • beer2SRM
  • beer2IBU
  • beer2tapdate
...and so on, for up to 8 beers on tap (more with later page revisions or multiple screens i'm sure)

So I need to figure out a way to get #tapnumber# to return a number. I'm thinking MOD and RECORDCOUNT or something, but I can't figure it out :(

Any suggestions?
 
This is seriously cool, I have an old PC in my garage I can't bring myself to get rid of and this seems like a good use for it.
What would it take to have the keg levels live as well? There is a growler place close to me that does it, they even have it online. I'm guessing they have some kind of scale below each keg.

http://www.tapsandcaps.com/taps.html

Ya, I could probably do it with USB scales - choose your options on the site for ball vs. pin, and let the code factor tare weight and gross weight, then calculate a percentage. Seems like a lot of extra work for something that most folks won't use, but I have definitely thought about it before. I had also thought about integrating a thermometer and displaying kegerator/keezer temp... Maybe even manifold pressure. Pretty straightforward getting the values into the page - much the same way Stamps.com gets the weight of your letter on your USB scale into its website.
 
Ok, calling all CF/SQL guys here.

// SNIP //

So I need to figure out a way to get #tapnumber# to return a number. I'm thinking MOD and RECORDCOUNT or something, but I can't figure it out :(

Any suggestions?

instead of #tapnumber# use #getBeers.currentRow#
 
instead of #tapnumber# use #getBeers.currentRow#

Ugh. That's perfect... I forgot about that one.

You should see the bandaid workaround code i made to get this to work... Lots of repeated code and "is it bigger than this? than this? than this?" code lol.

Thanks man.
 
Back
Top