-
How To Automatically Update Your Temperature Graphs
Nov 12 2008
Here’s a bit more explanation on how to run the temperature logging system I described earlier.
The system automatically stores the value of its sensors every five minutes using the crontab function in Linux. crontab is a schedule of recurring things to be done in the form of commands to be run on the system. There’s different crontab’s for different users. In this particular NSLU2 system I’m running crontab commands as root user. As far as I remember it was necessary to do that to have sufficient rights on the system.
To see what is in your crontab at the moment, run this command:crontab -l
where -l is for list only. Use -e for editing your crontab:
crontab -e
This will start a default editor, in my case ‘nano’, so that you can make changes to your list.
crontab -l on this system gives this output:
# m h dom mon dow command
*/5 * * * * /home/thomas/happyfarming/update_temp_2.sh &> /dev/null
*/5 * * * * /home/thomas/happyfarming/upload_temps.shm: Minute. “/5″ means every five minutes.
h: Hour
command: Command to be executed. I run the update_temp_2.sh script every five minutes. “&> /dev/null” takes the output from this command and discards it, so that I don’t get a mail every five minutes.
* means at every value, i.e. minute is 1 through 60 or hour is 1 through 24 etc.The other command or script I run is upload_temps.sh. This will upload the graphs to this website, making them available in posts.
This is what my upload_temps.sh script looks like:
#!/bin/bash
sleep 30
lftp -u USER,PASSWORD SERVER <<EOF
cd /images/
lcd /home/thomas/happyfarming/
put log_h.png
put log_d.png
put log_w.png
put log_m.png
put log_y.png
quit 0
EOFusing FTP to upload the files.
Subscribe in RSS reader
Subscribe to email newsletter
About
-
Are you ready to grow your own food? Take a tour through my archives and learn how I did it!

Recent Articles
- Six Reasons to Harvest Rainwater
- Are Your Tomato Plant Leaves Showing These Symptoms?
- Natural Bean Plant Trellis for Runner Beans
- Aquaponic Tomato Plants
- Aquaponics Tanks
- Raised Bed Designs
- Potato Containers and a Simple Potato Salad
- Aquaponics Plant Germination and Algae Eating Fish
- Guy Clark – Homegrown Tomatoes
- Bamboo Sticks for Tomato Plants
