source: de.wigbels.ruby/hotcoldrain/draw_graphs.sh @ f63674a

Last change on this file since f63674a was f63674a, checked in by Norbert Wigbels <norbert.wigbels@…>, 6 years ago

Temperatur enklavE

  • Property mode set to 100755
File size: 12.2 KB
Line 
1#!/bin/bash
2
3rrdtool graph web/temperatur_3stunden.png --title "Temperaturen 3h" --font TITLE:12 --vertical-label="° Celsius" -s 'now - 3 hour' -e 'now' \
4DEF:temps1=weather.rrd:temps1:AVERAGE LINE2:temps1#204a87:"Temperatur unten" \
5DEF:temps2=weather.rrd:temps2:AVERAGE LINE2:temps2#f57900:"Temperatur oben" \
6DEF:temps9=weather.rrd:temps9:AVERAGE LINE2:temps9#4e9a06:"Temperatur aussen\n" \
7DEF:temp1=../mqtttemp/mqtttemp.rrd:temp1:AVERAGE LINE2:temp1#6666ff:"Temperatur enklavE\n" \
8GPRINT:temps1:LAST:"Letzte Messung unten\: %2.2lf" GPRINT:temps2:LAST:"oben\: %2.2lf" GPRINT:temps9:LAST:"aussen\: %2.2lf" GPRINT:temp1:LAST:"Letzte Messung enklavE\: %2.2lf"
9
10rrdtool graph web/temperatur_6stunden.png --title "Temperaturen 6h" --font TITLE:12 --vertical-label="° Celsius" -s 'now - 6 hour' -e 'now' \
11DEF:temps1=weather.rrd:temps1:AVERAGE LINE2:temps1#204a87:"Temperatur unten" \
12DEF:temps2=weather.rrd:temps2:AVERAGE LINE2:temps2#f57900:"Temperatur oben" \
13DEF:temps9=weather.rrd:temps9:AVERAGE LINE2:temps9#4e9a06:"Temperatur aussen\n" \
14DEF:temp1=../mqtttemp/mqtttemp.rrd:temp1:AVERAGE LINE2:temp1#6666ff:"Temperatur enklavE\n" \
15GPRINT:temps1:LAST:"Letzte Messung unten\: %2.2lf" GPRINT:temps2:LAST:"oben\: %2.2lf" GPRINT:temps9:LAST:"aussen\: %2.2lf" GPRINT:temp1:LAST:"Letzte Messung enklavE\: %2.2lf"
16
17rrdtool graph web/temperatur_12stunden.png --title "Temperaturen 12h" --font TITLE:12 --vertical-label="° Celsius" -s 'now - 12 hour' -e 'now' \
18DEF:temps1=weather.rrd:temps1:AVERAGE LINE2:temps1#204a87:"Temperatur unten" \
19DEF:temps2=weather.rrd:temps2:AVERAGE LINE2:temps2#f57900:"Temperatur oben" \
20DEF:temps9=weather.rrd:temps9:AVERAGE LINE2:temps9#4e9a06:"Temperatur aussen\n" \
21DEF:temp1=../mqtttemp/mqtttemp.rrd:temp1:AVERAGE LINE2:temp1#6666ff:"Temperatur enklavE\n" \
22GPRINT:temps1:LAST:"Letzte Messung unten\: %2.2lf" GPRINT:temps2:LAST:"oben\: %2.2lf" GPRINT:temps9:LAST:"aussen\: %2.2lf" GPRINT:temp1:LAST:"Letzte Messung enklavE\: %2.2lf"
23
24rrdtool graph web/temperatur_1tag.png --title "Temperaturen 14" --font TITLE:12 --vertical-label="° Celsius" -s 'now - 1 day' -e 'now' \
25DEF:temps1=weather.rrd:temps1:AVERAGE LINE2:temps1#204a87:"Temperatur unten" \
26DEF:temps2=weather.rrd:temps2:AVERAGE LINE2:temps2#f57900:"Temperatur oben" \
27DEF:temps9=weather.rrd:temps9:AVERAGE LINE2:temps9#4e9a06:"Temperatur aussen\n" \
28DEF:temp1=../mqtttemp/mqtttemp.rrd:temp1:AVERAGE LINE2:temp1#6666ff:"Temperatur enklavE\n" \
29GPRINT:temps1:LAST:"Letzte Messung unten\: %2.2lf" GPRINT:temps2:LAST:"oben\: %2.2lf" GPRINT:temps9:LAST:"aussen\: %2.2lf" GPRINT:temp1:LAST:"Letzte Messung enklavE\: %2.2lf"
30
31rrdtool graph web/temperatur_1woche.png --title "Temperaturen im Wochenverlauf" --font TITLE:12 --vertical-label="° Celsius" -s 'now - 1 week' -e 'now' \
32DEF:temps1=weather.rrd:temps1:AVERAGE LINE2:temps1#204a87:"Temperatur unten" \
33DEF:temps2=weather.rrd:temps2:AVERAGE LINE2:temps2#f57900:"Temperatur oben" \
34DEF:temp1=../mqtttemp/mqtttemp.rrd:temp1:AVERAGE LINE2:temp1#6666ff:"Temperatur enklavE" \
35DEF:tempmins9=weather.rrd:temps9:MIN DEF:tempmaxs9=weather.rrd:temps9:MAX \
36DEF:temps9=weather.rrd:temps9:AVERAGE CDEF:tempranges9=tempmaxs9,tempmins9,- LINE1:tempmins9#4e9a06 AREA:tempranges9#8ae234::STACK LINE1:tempmaxs9#4e9a06 LINE2:temps9#4e9a06:"Temperatur aussen\n"
37
38rrdtool graph web/temperatur_1monat.png --title "Temperaturen im Monatsverlauf" --font TITLE:12 --vertical-label="° Celsius" -s 'now - 1 month' -e 'now' \
39DEF:temps1=weather.rrd:temps1:AVERAGE LINE2:temps1#204a87:"Temperatur unten" \
40DEF:temps2=weather.rrd:temps2:AVERAGE LINE2:temps2#f57900:"Temperatur oben" \
41DEF:temp1=../mqtttemp/mqtttemp.rrd:temp1:AVERAGE LINE2:temp1#6666ff:"Temperatur enklavE" \
42DEF:tempmins9=weather.rrd:temps9:MIN DEF:tempmaxs9=weather.rrd:temps9:MAX DEF:temps9=weather.rrd:temps9:AVERAGE CDEF:tempranges9=tempmaxs9,tempmins9,- LINE1:tempmins9#4e9a06 AREA:tempranges9#8ae234::STACK LINE1:tempmaxs9#4e9a06 LINE2:temps9#4e9a06:"Temperatur aussen\n"
43
44rrdtool graph web/temperatur_1jahr.png --title "Temperaturen im Jahresverlauf" --font TITLE:12 --vertical-label="° Celsius" -s 'now - 1 year' -e 'now' \
45DEF:temps1=weather.rrd:temps1:AVERAGE LINE2:temps1#204a87:"Temperatur unten" \
46DEF:temps2=weather.rrd:temps2:AVERAGE LINE2:temps2#f57900:"Temperatur oben" \
47DEF:temp1=../mqtttemp/mqtttemp.rrd:temp1:AVERAGE LINE2:temp1#6666ff:"Temperatur enklavE" \
48DEF:tempmins9=weather.rrd:temps9:MIN DEF:tempmaxs9=weather.rrd:temps9:MAX DEF:temps9=weather.rrd:temps9:AVERAGE CDEF:tempranges9=tempmaxs9,tempmins9,- LINE1:tempmins9#4e9a06 AREA:tempranges9#8ae234::STACK LINE1:tempmaxs9#4e9a06 LINE2:temps9#4e9a06:"Temperatur aussen\n"
49
50rrdtool graph web/temperatur_5jahr.png --title "Temperaturen im Jahresverlauf" --font TITLE:12 --vertical-label="° Celsius" -s 'now - 5 year' -e 'now' \
51DEF:temps1=weather.rrd:temps1:AVERAGE LINE2:temps1#204a87:"Temperatur unten" \
52DEF:temps2=weather.rrd:temps2:AVERAGE LINE2:temps2#f57900:"Temperatur oben" \
53DEF:temp1=../mqtttemp/mqtttemp.rrd:temp1:AVERAGE LINE2:temp1#6666ff:"Temperatur enklavE" \
54DEF:tempmins9=weather.rrd:temps9:MIN DEF:tempmaxs9=weather.rrd:temps9:MAX DEF:temps9=weather.rrd:temps9:AVERAGE CDEF:tempranges9=tempmaxs9,tempmins9,- LINE1:tempmins9#4e9a06 AREA:tempranges9#8ae234::STACK LINE1:tempmaxs9#4e9a06 LINE2:temps9#4e9a06:"Temperatur aussen\n"
55
56
57rrdtool graph web/luftfeuchtigkeit_3stunden.png --title "Luftfeuchtigkeit 3h" --font TITLE:12 --vertical-label="%" -s 'now - 3 hour' -e 'now' \
58DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
59DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
60DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" \
61DEF:hum1=../mqtttemp/mqtttemp.rrd:hum1:AVERAGE LINE2:hum1#6666ff:"Luftfeuchtigkeit enklavE\n" \
62GPRINT:hums1:LAST:"Letzte Messung unten\: %3.2lf" GPRINT:hums2:LAST:"oben\: %3.2lf" GPRINT:hums9:LAST:"aussen\: %3.2lf" GPRINT:hum1:LAST:"enklavE\: %3.2lf"
63
64rrdtool graph web/luftfeuchtigkeit_6stunden.png --title "Luftfeuchtigkeit 6h" --font TITLE:12 --vertical-label="%" -s 'now - 6 hour' -e 'now' \
65DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
66DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
67DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" \
68DEF:hum1=../mqtttemp/mqtttemp.rrd:hum1:AVERAGE LINE2:hum1#6666ff:"Luftfeuchtigkeit enklavE\n" \
69GPRINT:hums1:LAST:"Letzte Messung unten\: %3.2lf" GPRINT:hums2:LAST:"oben\: %3.2lf" GPRINT:hums9:LAST:"aussen\: %3.2lf" GPRINT:hum1:LAST:"enklavE\: %3.2lf"
70
71rrdtool graph web/luftfeuchtigkeit_12stunden.png --title "Luftfeuchtigkeit 12h" --font TITLE:12 --vertical-label="%" -s 'now - 12 hour' -e 'now' \
72DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
73DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
74DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" \
75DEF:hum1=../mqtttemp/mqtttemp.rrd:hum1:AVERAGE LINE2:hum1#6666ff:"Luftfeuchtigkeit enklavE\n" \
76GPRINT:hums1:LAST:"Letzte Messung unten\: %3.2lf" GPRINT:hums2:LAST:"oben\: %3.2lf" GPRINT:hums9:LAST:"aussen\: %3.2lf" GPRINT:hum1:LAST:"enklavE\: %3.2lf"
77
78rrdtool graph web/luftfeuchtigkeit_1tag.png --title "Luftfeuchtigkeit im Tagesverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 1 day' -e 'now' \
79DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
80DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
81DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" \
82DEF:hum1=../mqtttemp/mqtttemp.rrd:hum1:AVERAGE LINE2:hum1#6666ff:"Luftfeuchtigkeit enklavE\n" \
83GPRINT:hums1:LAST:"Letzte Messung unten\: %3.2lf" GPRINT:hums2:LAST:"oben\: %3.2lf" GPRINT:hums9:LAST:"aussen\: %3.2lf" GPRINT:hum1:LAST:"enklavE\: %3.2lf"
84
85rrdtool graph web/luftfeuchtigkeit_1woche.png --title "Luftfeuchtigkeit im Wochenverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 1 week' -e 'now' \
86DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
87DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
88DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" \
89DEF:hum1=../mqtttemp/mqtttemp.rrd:hum1:AVERAGE LINE2:hum1#6666ff:"Luftfeuchtigkeit enklavE"
90
91rrdtool graph web/luftfeuchtigkeit_1monat.png --title "Luftfeuchtigkeit im Monatsverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 1 month' -e 'now' \
92DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
93DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
94DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" \
95DEF:hum1=../mqtttemp/mqtttemp.rrd:hum1:AVERAGE LINE2:hum1#6666ff:"Luftfeuchtigkeit enklavE"
96
97rrdtool graph web/luftfeuchtigkeit_1jahr.png --title "Luftfeuchtigkeit im Jahresverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 1 year' -e 'now' \
98DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
99DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
100DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" \
101DEF:hum1=../mqtttemp/mqtttemp.rrd:hum1:AVERAGE LINE2:hum1#6666ff:"Luftfeuchtigkeit enklavE"
102
103rrdtool graph web/luftfeuchtigkeit_5jahr.png --title "Luftfeuchtigkeit im Jahresverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 5 year' -e 'now' \
104DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
105DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
106DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" \
107DEF:hum1=../mqtttemp/mqtttemp.rrd:hum1:AVERAGE LINE2:hum1#6666ff:"Luftfeuchtigkeit enklavE"
108
109
110rrdtool graph web/regen_1tag.png \
111--title "Regen im Tagesverlauf" \
112--font TITLE:12 \
113-s 'now - 1 day' -e 'now' \
114-v mm/Stunde \
115DEF:rains9=weather.rrd:rains9:AVERAGE \
116CDEF:rainph=rains9,3600,*,1,*,0.295,* \
117CDEF:rainpd=rainph,24,* \
118VDEF:totalrain=rainpd,AVERAGE \
119GPRINT:totalrain:"Total %6.0lf mm/Tag" \
120LINE2:rainph#729fcf
121
122rrdtool graph web/regen_1woche.png \
123--title "Regen im Wochenverlauf" \
124--font TITLE:12 \
125-s 'now - 1 week' -e 'now' \
126-v mm/Stunde \
127DEF:rains9=weather.rrd:rains9:AVERAGE \
128CDEF:rainph=rains9,3600,*,1,*,0.295,* \
129CDEF:rainpw=rainph,168,* \
130VDEF:totalrain=rainpw,AVERAGE \
131GPRINT:totalrain:"Total %6.0lf mm/Woche" \
132LINE2:rainph#729fcf
133
134rrdtool graph web/regen_1monat.png \
135--title "Regen im Monatsverlauf" \
136--font TITLE:12 \
137-s 'now - 1 month' -e 'now' \
138-v mm/Tag \
139DEF:rains9=weather.rrd:rains9:AVERAGE \
140CDEF:rainpd=rains9,3600,*,24,*,0.295,* \
141CDEF:rainpm=rainpd,30,* \
142VDEF:totalrain=rainpm,AVERAGE \
143GPRINT:totalrain:"Total %6.0lf mm/Monat" \
144LINE2:rainpd#729fcf
145
146rrdtool graph web/regen_1jahr.png \
147--title "Regen im Jahresverlauf" \
148--font TITLE:12 \
149-s 'now - 1 year' -e 'now' \
150-v mm/Tag \
151DEF:rains9=weather.rrd:rains9:AVERAGE \
152CDEF:rainpd=rains9,3600,*,24,*,0.295,* \
153CDEF:rainpm=rainpd,30,* \
154VDEF:totalrain=rainpm,AVERAGE \
155GPRINT:totalrain:"Total %6.0lf mm/Jahr" \
156LINE2:rainpd#729fcf
157
158rrdtool graph web/regen_5jahr.png \
159--title "Regen im Jahresverlauf" \
160--font TITLE:12 \
161-s 'now - 5 year' -e 'now' \
162-v mm/Tag \
163DEF:rains9=weather.rrd:rains9:AVERAGE \
164CDEF:rainpd=rains9,3600,*,24,*,0.295,* \
165CDEF:rainpm=rainpd,30,* \
166VDEF:totalrain=rainpm,AVERAGE \
167GPRINT:totalrain:"Total %6.0lf mm/Jahr" \
168LINE2:rainpd#729fcf
169
170
171rrdtool graph web/wind_1tag.png --title "Wind im Tagesverlauf" --font TITLE:12 -s 'now - 1 day' -e 'now' -v km/h DEF:winds9=weather.rrd:winds9:AVERAGE LINE2:winds9#2e3436:"Wind km/h"
172
173rrdtool graph web/wind_1woche.png --title "Wind im Wochenverlauf" --font TITLE:12 -s 'now - 1 week' -e 'now' -v km/h DEF:winds9=weather.rrd:winds9:AVERAGE LINE2:winds9#2e3436:"Wind km/h"
174
175rrdtool graph web/wind_1monat.png --title "Wind im Monatsverlauf" --font TITLE:12 -s 'now - 1 month' -e 'now' -v km/h DEF:winds9=weather.rrd:winds9:AVERAGE LINE2:winds9#2e3436:"Wind km/h"
176
177rrdtool graph web/wind_1jahr.png --title "Wind im Jahresverlauf" --font TITLE:12 -s 'now - 1 year' -e 'now' -v km/h DEF:winds9=weather.rrd:winds9:AVERAGE LINE2:winds9#2e3436:"Wind km/h"
178
179rrdtool graph web/wind_5jahr.png --title "Wind im Jahresverlauf" --font TITLE:12 -s 'now - 5 year' -e 'now' -v km/h DEF:winds9=weather.rrd:winds9:AVERAGE LINE2:winds9#2e3436:"Wind km/h"
Note: See TracBrowser for help on using the repository browser.