Home Brew Forums > Home Brewing Beer > DIY Projects > TeensyPi Networked Temperature Controller




Reply
 
LinkBack Thread Tools Display Modes
Old 02-01-2013, 01:21 AM   #111
Feedback Score: 0 reviews
 
helibrewer's Avatar
Recipes 
 
Join Date: Nov 2011
Location: Santa Rosa, CA
Posts: 2,577
Liked 92 Times on 89 Posts
Likes Given: 32

Default

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: Empty
Brite Tank/Lagering: AHA Summer Ale
Kegged: Sonoma County Organic Cider, Wise One Wit v1.2.1, Helles Bock, Ommegang Abbey Ale Clone, Derangement (Belgian Dark Strong), Sarcastic (ESB), Kranky (Kolsch v1.1)
Bottled: Alt Lang Syne (Dusseldorf Alt), 99% (Calif Common), Contentment (Trappist), Kranky (Kolsch v1.0),
On Deck: Need to bottle, out of kegs!
My Site: www.restlesscellars.com
helibrewer is offline
 
Reply With Quote Quick reply to this message
Old 02-01-2013, 01:40 AM   #112
Feedback Score: 0 reviews
Recipes 
 
Join Date: Dec 2009
Location: Chicago
Posts: 131
Liked 2 Times on 2 Posts

Default

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.


redbenn is offline
 
Reply With Quote Quick reply to this message
Old 02-01-2013, 01:54 AM   #113
Feedback Score: 0 reviews
 
helibrewer's Avatar
Recipes 
 
Join Date: Nov 2011
Location: Santa Rosa, CA
Posts: 2,577
Liked 92 Times on 89 Posts
Likes Given: 32

Default

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: Empty
Brite Tank/Lagering: AHA Summer Ale
Kegged: Sonoma County Organic Cider, Wise One Wit v1.2.1, Helles Bock, Ommegang Abbey Ale Clone, Derangement (Belgian Dark Strong), Sarcastic (ESB), Kranky (Kolsch v1.1)
Bottled: Alt Lang Syne (Dusseldorf Alt), 99% (Calif Common), Contentment (Trappist), Kranky (Kolsch v1.0),
On Deck: Need to bottle, out of kegs!
My Site: www.restlesscellars.com
helibrewer is offline
 
Reply With Quote Quick reply to this message
Old 02-01-2013, 04:00 AM   #114
Turgid Member
Feedback Score: 0 reviews
 
jimmayhugh's Avatar
Recipes 
 
Join Date: Feb 2011
Location: Las Vegas, NV
Posts: 459
Liked 26 Times on 24 Posts
Likes Given: 2

Default

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.
jimmayhugh is offline
 
Reply With Quote Quick reply to this message
Old 02-01-2013, 08:00 PM   #115
Feedback Score: 0 reviews
Recipes 
 
Join Date: Dec 2009
Location: Chicago
Posts: 131
Liked 2 Times on 2 Posts

Default

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)?
redbenn is offline
 
Reply With Quote Quick reply to this message
Old 02-02-2013, 01:16 AM   #116
Turgid Member
Feedback Score: 0 reviews
 
jimmayhugh's Avatar
Recipes 
 
Join Date: Feb 2011
Location: Las Vegas, NV
Posts: 459
Liked 26 Times on 24 Posts
Likes Given: 2

Default

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.
jimmayhugh is offline
 
Reply With Quote Quick reply to this message
Old 02-02-2013, 09:23 PM   #117
Turgid Member
Feedback Score: 0 reviews
 
jimmayhugh's Avatar
Recipes 
 
Join Date: Feb 2011
Location: Las Vegas, NV
Posts: 459
Liked 26 Times on 24 Posts
Likes Given: 2

Default Did my own local graphing using GnuPlot

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.
jimmayhugh is offline
 
Reply With Quote Quick reply to this message
Old 02-03-2013, 09:25 PM   #118
Turgid Member
Feedback Score: 0 reviews
 
jimmayhugh's Avatar
Recipes 
 
Join Date: Feb 2011
Location: Las Vegas, NV
Posts: 459
Liked 26 Times on 24 Posts
Likes Given: 2

Default

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.
jimmayhugh is offline
 
Reply With Quote Quick reply to this message
Old 02-04-2013, 03:58 AM   #119
Feedback Score: 0 reviews
 
helibrewer's Avatar
Recipes 
 
Join Date: Nov 2011
Location: Santa Rosa, CA
Posts: 2,577
Liked 92 Times on 89 Posts
Likes Given: 32

Default

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: Empty
Brite Tank/Lagering: AHA Summer Ale
Kegged: Sonoma County Organic Cider, Wise One Wit v1.2.1, Helles Bock, Ommegang Abbey Ale Clone, Derangement (Belgian Dark Strong), Sarcastic (ESB), Kranky (Kolsch v1.1)
Bottled: Alt Lang Syne (Dusseldorf Alt), 99% (Calif Common), Contentment (Trappist), Kranky (Kolsch v1.0),
On Deck: Need to bottle, out of kegs!
My Site: www.restlesscellars.com
helibrewer is offline
 
Reply With Quote Quick reply to this message
Old 02-04-2013, 10:45 AM   #120
Turgid Member
Feedback Score: 0 reviews
 
jimmayhugh's Avatar
Recipes 
 
Join Date: Feb 2011
Location: Las Vegas, NV
Posts: 459
Liked 26 Times on 24 Posts
Likes Given: 2

Default

If you insist...


jimmayhugh is offline
 
Reply With Quote Quick reply to this message
Reply

Quick Reply
Message:
Options
Thread Tools
Display Modes


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



FOLLOW US ON