TeensyPi Networked Temperature Controller - Page 12 - Home Brew Forums
Home Brew Forums > Home Brewing Beer > DIY Projects > Fermenters > TeensyPi Networked Temperature Controller

Reply
 
Thread Tools
Old 02-01-2013, 02:21 AM   #111
helibrewer
HBT_SUPPORTER.png
 
helibrewer's Avatar
Recipes 
 
Nov 2011
Santa Rosa, CA
Posts: 3,707
Liked 299 Times on 254 Posts


Almost Now I get "Feed ID or some other parameter does not exist." I updated the Feed ID in both files for the new key pair so I'll see if I missed something else

EDIT: I am seeing feeds in the COSM API Debugger. The Response Body contains "I'm sorry we are unable to find the feed you are looking for."


__________________
Something is always fermenting....
"It's Bahl Hornin'"

Primary:
Brite Tank/Lagering:
Kegged: Sour Saison, Pale Ale, Aggie Ale, Firestone DBA, De Koninck Blonde
Bottled: Belgian Quad (Grand Reserve), Derangement (Belgian Dark Strong)
On Deck: Pliny the Younger

 
Reply With Quote
Old 02-01-2013, 02:40 AM   #112
redbenn
Recipes 
 
Dec 2009
Chicago
Posts: 132
Liked 3 Times on 3 Posts


Quote:
Originally Posted by helibrewer View Post
Almost Now I get "Feed ID or some other parameter does not exist." I updated the Feed ID in both files for the new key pair so I'll see if I missed something else

EDIT: I am seeing feeds in the COSM API Debugger. The Response Body contains "I'm sorry we are unable to find the feed you are looking for."
The feed id is just a numerical value, make sure you don't have quotes around it in the code.



 
Reply With Quote
Old 02-01-2013, 02:54 AM   #113
helibrewer
HBT_SUPPORTER.png
 
helibrewer's Avatar
Recipes 
 
Nov 2011
Santa Rosa, CA
Posts: 3,707
Liked 299 Times on 254 Posts


Quote:
Originally Posted by redbenn View Post
The feed id is just a numerical value, make sure you don't have quotes around it in the code.
I think I need to learn more about how this COSM works....
__________________
Something is always fermenting....
"It's Bahl Hornin'"

Primary:
Brite Tank/Lagering:
Kegged: Sour Saison, Pale Ale, Aggie Ale, Firestone DBA, De Koninck Blonde
Bottled: Belgian Quad (Grand Reserve), Derangement (Belgian Dark Strong)
On Deck: Pliny the Younger

 
Reply With Quote
Old 02-01-2013, 05:00 AM   #114
jimmayhugh
Turgid Member
HBT_LIFETIMESUPPORTER.png
 
jimmayhugh's Avatar
Recipes 
 
Feb 2011
Las Vegas, NV
Posts: 767
Liked 107 Times on 81 Posts


Quote:
Originally Posted by helibrewer View Post
I think I need to learn more about how this COSM works....
I had my own issues with cosm on an earlier project, I'm going to look at using GNUPLOT with local data.

This takes nothing away from the good work redbenn has done, it's solid. I just prefer keeping things in-house.
__________________
TeensyNet Networked Controller
ButtCrack Brewery
And This Is Why We Drink...
Cogito, ergo bibere cervisia sum

 
Reply With Quote
Old 02-01-2013, 09:00 PM   #115
redbenn
Recipes 
 
Dec 2009
Chicago
Posts: 132
Liked 3 Times on 3 Posts


If I wanted to test out using the Arduino PID library in place of the actions, would I need to modify void softSerialProcess() and void updateChipStatus(int x)?

 
Reply With Quote
Old 02-02-2013, 02:16 AM   #116
jimmayhugh
Turgid Member
HBT_LIFETIMESUPPORTER.png
 
jimmayhugh's Avatar
Recipes 
 
Feb 2011
Las Vegas, NV
Posts: 767
Liked 107 Times on 81 Posts


Quote:
Originally Posted by redbenn View Post
If I wanted to test out using the Arduino PID library in place of the actions, would I need to modify void softSerialProcess() and void updateChipStatus(int x)?
Depends on how complicated you want to make it. Looking at the Relay Output Example, it seems to me that you could put the code in the loop() into a function that's called in the Teensy 3.0 loop() replacing the
Code:
Input = analogRead(0);
with
Code:
Input = (double) chip[x].status;
and

Code:
if(Output > now - windowStartTime) digitalWrite(RelayPin,HIGH);
  else digitalWrite(RelayPin,LOW);
with

Code:
if(Output > now - windowStartTime) setSwitchState(x,ds2406PIOAoff);
  else setSwitchState(x,ds2406PIOAon);
Just as a test you could hard code the values for the thermometer and switch, put all of the setup in the setup() and let it rip.
__________________
TeensyNet Networked Controller
ButtCrack Brewery
And This Is Why We Drink...
Cogito, ergo bibere cervisia sum

 
Reply With Quote
Old 02-02-2013, 10:23 PM   #117
jimmayhugh
Turgid Member
HBT_LIFETIMESUPPORTER.png
 
jimmayhugh's Avatar
Recipes 
 
Feb 2011
Las Vegas, NV
Posts: 767
Liked 107 Times on 81 Posts


While redbenn's version of graphing software using COSM works just fine, I prefer to keep my info in-house.

To that end, I created a database table to track enabled actions and display the output on a local web page.

First I created a new table in phpmyadmin for the teensypi database:

Code:
CREATE TABLE IF NOT EXISTS `actionGraph` (
  `id` int(11) NOT NULL,
  `time` bigint(20) NOT NULL,
  `temp` int(11) NOT NULL,
  `tcTemp` int(11) NOT NULL,
  `tcSwitch` enum('ON','OFF','NONE') NOT NULL,
  `thTemp` int(11) NOT NULL,
  `thSwitch` enum('ON','OFF','NONE') NOT NULL,
  KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
and installed GnuPlot

Code:
sudo apt-get install gnuplot
Then I created the files:
graphActions.php
plotData.php

updated:
updateActionStatusWithMySQL.php

and downloaded:
PHP_GnuPlot.php

All of the code is available at my github directory

I then added a cron entry:
Code:
* * * * * /usr/bin/php /var/www/htdocs/graphActions.php
To update the action status to the MySQL table once a minute.

Now when I go to my Action Status page:


You will see a "GRAPH" button. Clicking on that will greate a graph:


That will show you the temperature and setpoints. If you change your trigger points, the graph will reflect that. I plan to add some viewing granularity, but I think that's enough for today.
__________________
TeensyNet Networked Controller
ButtCrack Brewery
And This Is Why We Drink...
Cogito, ergo bibere cervisia sum

 
Reply With Quote
Old 02-03-2013, 10:25 PM   #118
jimmayhugh
Turgid Member
HBT_LIFETIMESUPPORTER.png
 
jimmayhugh's Avatar
Recipes 
 
Feb 2011
Las Vegas, NV
Posts: 767
Liked 107 Times on 81 Posts


As I mentioned yesterday, I've added the ability to look at specific sections of a graph. The updated plotData.php file is on my github site.
__________________
TeensyNet Networked Controller
ButtCrack Brewery
And This Is Why We Drink...
Cogito, ergo bibere cervisia sum

 
Reply With Quote
Old 02-04-2013, 04:58 AM   #119
helibrewer
HBT_SUPPORTER.png
 
helibrewer's Avatar
Recipes 
 
Nov 2011
Santa Rosa, CA
Posts: 3,707
Liked 299 Times on 254 Posts


Quote:
Originally Posted by jimmayhugh View Post
As I mentioned yesterday, I've added the ability to look at specific sections of a graph. The updated plotData.php file is on my github site.
Awesome work, I think you need a donate button
__________________
Something is always fermenting....
"It's Bahl Hornin'"

Primary:
Brite Tank/Lagering:
Kegged: Sour Saison, Pale Ale, Aggie Ale, Firestone DBA, De Koninck Blonde
Bottled: Belgian Quad (Grand Reserve), Derangement (Belgian Dark Strong)
On Deck: Pliny the Younger

 
Reply With Quote
Old 02-04-2013, 11:45 AM   #120
jimmayhugh
Turgid Member
HBT_LIFETIMESUPPORTER.png
 
jimmayhugh's Avatar
Recipes 
 
Feb 2011
Las Vegas, NV
Posts: 767
Liked 107 Times on 81 Posts


If you insist...


__________________
TeensyNet Networked Controller
ButtCrack Brewery
And This Is Why We Drink...
Cogito, ergo bibere cervisia sum

 
Reply With Quote
Reply
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Arduino - Networked Temperature Monitor jimmayhugh Kegerators & Keezers 81 01-27-2013 01:22 AM
Temperature Controller sy2088 Equipment/Sanitation 3 10-25-2012 06:28 PM
Lux Temperature Controller scoots Fermenters 9 07-06-2012 01:38 PM
temperature controller from deas fridge - use as external controller on live fridge? BrewingChemist Fermenters 1 05-22-2012 10:21 PM
Johnson Analog Temperature Controller Temperature Profile Coastarine Equipment/Sanitation 4 10-11-2010 03:58 PM


Forum Jump