OLD TEMP


do1.sh
#!/bin/bash
cd /data3/jaanus/public_html/cam
wget --timeout=1 -o /dev/null http://192.168.1.244/pic.jpg
rm -f temp.txt
wget --timeout=1 -o /dev/null http://192.168.1.244/temp.txt
cp pic.jpg 1.jpg
D=`date +'%Y%m%d%H%M'`; mv pic.jpg $D-1.jpg
make update >/dev/null
make graph >/dev/null
Makefile
#COLOR=-c BACK\#404040 -c SHADEA\#606060 \
# -c SHADEB\#303030 -c FONT\#ffffff \
# -c CANVAS\#000000 \
# -c ARROW\#00FF00 -c GRID\#404040 \
# -c MGRID\#808080 -c FRAME\#202020 \
# -c AXIS\#E0E0ff \
# --end now --start end-1d
PAR=-A -Y
FILE=temp.rrd
SIZE=-w 800 -h 250
all: graph

create:
	rrdtool create $(FILE) \
	DS:t:GAUGE:600:U:U \
	DS:n:GAUGE:600:U:U \
 	RRA:AVERAGE:0.5:1:1200 \
	RRA:MIN:0.5:12:2400 \
	RRA:MAX:0.5:12:2400 \
	RRA:AVERAGE:0.5:12:2400

update:
	rrdtool update $(FILE) `/data3/jaanus/public_html/cam/update.sh`

fetch:
	rrdtool fetch $(FILE) AVERAGE 

graph:  

	rrdtool graph temp.png $(SIZE) \
	$(COLOR) \
	--title="Temperatuur C" $(PAR) \
	--vertical-label "C" \
	 --end now --start end-1d \
	DEF:t=$(FILE):t:AVERAGE \
	AREA:t#AF8F2D:"Temperatuur C"

	rrdtool graph tempw.png $(SIZE) \
	$(COLOR) \
	--title="Temperatuur C" $(PAR) \
	--vertical-label "C" \
	 --end now --start end-1w \
	DEF:t=$(FILE):t:AVERAGE \
	AREA:t#AF8F2D:"Temperatuur ?C"



	rrdtool graph tempm.png $(SIZE) \
	$(COLOR) \
	--title="Temperatuur C" $(PAR) \
	--vertical-label "C" \
	 --end now --start end-1m \
	DEF:t=$(FILE):t:AVERAGE \
	AREA:t#AF8F2D:"Temperatuur ?C"


	rrdtool graph temph.png $(SIZE) \
	$(COLOR) \
	--title="Temperatuur C" $(PAR) \
	--vertical-label "C" \
	 --end now --start end-180d \
	DEF:t=$(FILE):t:AVERAGE \
	AREA:t#AF8F2D:"Temperatuur ?C"

	rrdtool graph tempy.png $(SIZE) \
	$(COLOR) \
	--title="Temperatuur C" $(PAR) \
	--vertical-label "C" \
	 --end now --start end-1y \
	DEF:t=$(FILE):t:AVERAGE \
	AREA:t#AF8F2D:"Temperatuur ?C"


do2.sh
#!/bin/bash
cd /data3/jaanus/public_html/cam
find . -size 0  -exec rm -f {} \;
ffmpeg  -threads 0 -loglevel quiet -f image2 -r 25 -pattern_type glob -i '*.jpg' -b:v 1024k  1-n.mp4
mv 1-n.mp4 1.mp4

do3.sh
#!/bin/bash
cd /data3/jaanus/public_html/cam
D=`date +'%Y%m%d'`
#mv 1.webm old/$D.webm
#mv 1.ogv old/$D.ogv
mv 1.mp4 old/$D.mp4
rm *.jpg