Step 6Software setup - graphing
1)
Make a place to put the scripts, a place to store the images, and a place to store the data.
`mkdir /etc/tempsensor`
`mkdir /var/www/temperature`
`mkdir /var/log/digitemp_rrd`
2)
Install software:
You will need, PHP and RRDtool.
`apt-get install rrdtool`
`apt-get install php` (there are many php packages, install one with a console executable)
3)
Download and install the scripts responsible for makin the graphs:
Download tempsensor-0.1.tar.gz to your linux machine.
`tar xvzf tempsensor-0.1.tar.gz`
`cp -v tempsensor/* /etc/tempsensor`
4)
Configure the scripts
Open /etc/tempsensor/config.php and follow the comments in this file.
Change the script to read input data from "/var/www/digitemp.txt" if you followed the example in the previous step.
5)
Automate.
Add a crontab entry the same way as in the previous step. The script should run every 5th minute.
The lines should look like this:
`*/5 * * * * php /etc/tempsensor/logdata.php`
`*/5 * * * * php /etc/tempsensor/graphdata.php`
6)
Run the scripts manually to check if it works.
php /etc/tempsensor/logdata.php
php /etc/tempsensor/graphdata.php
7)
Visit http://your.ip.or.hostname/temperature or whatever you specified in the config file.
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|


















































