Kegconnection Complete Starter Kit and More Giveaway!


Home Brew Forums > Home Brewing Beer > Brewing Software > Python/XML Beginner

Reply
 
LinkBack Thread Tools
Old 07-14-2011, 09:51 PM   #1
lmerg
Feedback Score: 0 reviews
Recipes 
 
Join Date: May 2010
Location: Southern Maryland
Posts: 58
Default Python/XML Beginner

Hi,

I am playing around with Python and naturally I am using brewing to inspire projects. I am not a programmer. I'm hoping the forum can help in two ways.

First, the BeerXML standard look woebegone. How useful is this standard? I thought all the major recipe apps supported it. Specifically, I'm wondering if there is a standard for recording temperature data over time, sort of like a "FermXML". It might include outside temp, inside temp, a gravity reading. My semi-ambitious goal is to graph the temperature changes for inside and outside against the SG of several beer batches. I am hoping this is a useful way to visualize how the ambient temperature effects fermentation, which is a concern when I use swamp coolers. IF there's a standard way to represent this data, I'd prefer to start off that way.

Second, I need data of the type described above. I can fake some of it. But ideally, I'd like some actual SG readings over time with fermenation temp (and hydrometer deflection if applicable) in .CSV format. I am hoping that I can get the ambient, outdoor temp from the Internet.

To reinforce, I have no idea what I'm doing. I'm doing it wrong. I'm only trying to learn. In fact, I'm trained as a political scientist, which makes me an outlier among brewers much less brewing programmers. So any advice is helpful.

Thanks,
Luke

__________________
Brewing Pictures.
lmerg is offline
 
Reply With Quote Quick reply to this message
Old 08-06-2011, 03:44 AM   #2
bertmurphy
Feedback Score: 0 reviews
Recipes 
 
Join Date: Sep 2010
Location: Atlanta
Posts: 78
Default

If you're really interested in measuring temperatures over fermentation then that would be simple to do with an Arduino board and a couple of temperature probes. You'd just need to write a small program to take temperature samples at a given interval and record them to a file.

What this boils down to though is how much energy (heat) is expended by the yeast during active fermentation. You can take a top down approach like you're suggesting and try to find trends a better approach would be bottom up. How much energy does is expended with a yeast cell consumes a unit of sugar. You may get some decent data by just measuring temperatures, but how accurately can you measure your pitching rate? How scalable will this trend be? Is it the same for a 1 barrel batch as it is for a 5.5 gallon batch?

__________________
bertmurphy is offline
 
Reply With Quote Quick reply to this message
Old 08-22-2011, 11:32 PM   #3
lmerg
Feedback Score: 0 reviews
Recipes 
 
Join Date: May 2010
Location: Southern Maryland
Posts: 58
Default

Welp, I thought of the project to learn python first, and brewing stuff second. But your suggestions are good ones. I'd like to get an arduino but that will have to wait until I find a job, etc.

__________________
Brewing Pictures.
lmerg is offline
 
Reply With Quote Quick reply to this message
Old 08-23-2011, 02:49 PM   #4
DarkBrood
Feedback Score: 0 reviews
Recipes 
 
Join Date: Aug 2010
Location: Manchester, NH
Posts: 364
Liked 12 Times on 11 Posts
Likes Given: 12

Default

Nothing like jumping into several completely new and complicated things at once to confuse ya!

#1 - BeerXML is in use - widely in use. It is used by both BeerSmith and ProMash amongst others and is used by many as part of their own custom in-house programming. However, I too find it woefully inadequate. After past experience helping to develop the OilXML standard for the heating oil industry, I've embarked on codifying up a BrewingXML standard (essentially a BeerXML 2.0 or a BeerExtendedXML). My intent is to include far more information that can currently be encoded. I am currently working with ingredient suppliers' data to include all worthwhile variables for hops, grains, yeasts, etc. (when the standard is released, my plan is to include up-to-date ingredient specs from all of the major manufacturers/suppliers to provide a base data standard as well as a base format standard). It is being designed with the current BeerXML as a base, so all currently existing data fields will continue to exist in the new standard. The new standard is meant to incorporate entries to log not just recipe data, but full process notations as well. (Please note that due to the sheer scope of this endeavor, it is still a considerable amount of time from reaching a "viewable for public comment state".)

#2 - The closest existing fermentation logs are those created by digital control systems such as those based on the BCS and Arduino boards. Forums on these topics will yield many people willing to share their data logs. There is no standard for fermentation logs - each brewery ends up developing their own in-house system. Setting yourself up to match either BeerXML, a BCS log, or something of the sort will ease format conversion later on when you want to import to something else.

Honestly (and I am a programmer), I would put your data into an Excel/OpenOffice spreadsheet with initial columns to match BeerXML (hide the ones you don't need) and extras added to cover whatever your needs are - and save it as a CSV file. Then use Python to write scripts to read from and write to the spreadsheet as needed.

__________________
*** Bryan Gibson *** http://brewsandstews.wordpress.com *** Dark Brood Homebrewery *** @DarkBroodBrews ***
SERVING: Gryffon's Talon, Tavernacle
CONDITIONING: Ancient Queen Elderberry Mead
FERMENTING: Black Imp
SOUR PROGRAM: Misterioux Ayahel, Ommedubbel, Pucker Knight, Lambicus Minimus
DarkBrood is offline
 
Reply With Quote Quick reply to this message
Old 08-28-2011, 02:21 AM   #5
bertmurphy
Feedback Score: 0 reviews
Recipes 
 
Join Date: Sep 2010
Location: Atlanta
Posts: 78
Default

Beerxml is very much alive. Using that schema for you needs might be overkill. It ends up being about 20 or so tables. I second the csv, but just store what u need and don't worry about beerxml as you aren't really doing any recipe management.

If you are interested in the beerxml schema it is an open format that you can download from the beerxml forums. I have a mysql schema definition that I could share as well. I'm working on a python api for the mysql db if you'd like to help out with it as a learning experience. It would be a much needed contribution to the python community.

__________________
bertmurphy is offline
 
Reply With Quote Quick reply to this message
Reply


Quick Reply
Message:
Options
Thread Tools