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:
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
sudo apt-get install gnuplot
Then I created the files:
All of the code is available at my github directory
I then added a cron entry:
* * * * * /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.