source: de.wigbels.ruby/hotcoldrain/draw_graphs.sh @ 5adf567

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

Temperatur enklavE

  • Property mode set to 100755
File size: 10.7 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" \
14GPRINT:temps1:LAST:"Letzte Messung unten\: %2.2lf" GPRINT:temps2:LAST:"oben\: %2.2lf" GPRINT:temps9:LAST:"aussen\: %2.2lf"
15
16rrdtool graph web/temperatur_12stunden.png --title "Temperaturen 12h" --font TITLE:12 --vertical-label="° Celsius" -s 'now - 12 hour' -e 'now' \
17DEF:temps1=weather.rrd:temps1:AVERAGE LINE2:temps1#204a87:"Temperatur unten" \
18DEF:temps2=weather.rrd:temps2:AVERAGE LINE2:temps2#f57900:"Temperatur oben" \
19DEF:temps9=weather.rrd:temps9:AVERAGE LINE2:temps9#4e9a06:"Temperatur aussen\n" \
20GPRINT:temps1:LAST:"Letzte Messung unten\: %2.2lf" GPRINT:temps2:LAST:"oben\: %2.2lf" GPRINT:temps9:LAST:"aussen\: %2.2lf"
21
22rrdtool graph web/temperatur_1tag.png --title "Temperaturen im Tagesverlauf" --font TITLE:12 --vertical-label="° Celsius" -s 'now - 1 day' -e 'now' \
23DEF:temps1=weather.rrd:temps1:AVERAGE LINE2:temps1#204a87:"Temperatur unten" \
24DEF:temps2=weather.rrd:temps2:AVERAGE LINE2:temps2#f57900:"Temperatur oben" \
25DEF:temps9=weather.rrd:temps9:AVERAGE LINE2:temps9#4e9a06:"Temperatur aussen\n" \
26GPRINT:temps1:LAST:"Letzte Messung unten\: %2.2lf" GPRINT:temps2:LAST:"oben\: %2.2lf" GPRINT:temps9:LAST:"aussen\: %2.2lf"
27
28rrdtool graph web/temperatur_1woche.png --title "Temperaturen im Wochenverlauf" --font TITLE:12 --vertical-label="° Celsius" -s 'now - 1 week' -e 'now' \
29DEF:temps1=weather.rrd:temps1:AVERAGE LINE2:temps1#204a87:"Temperatur unten" \
30DEF:temps2=weather.rrd:temps2:AVERAGE LINE2:temps2#f57900:"Temperatur oben" \
31DEF:tempmins9=weather.rrd:temps9:MIN DEF:tempmaxs9=weather.rrd:temps9:MAX \
32DEF: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"
33
34rrdtool graph web/temperatur_1monat.png --title "Temperaturen im Monatsverlauf" --font TITLE:12 --vertical-label="° Celsius" -s 'now - 1 month' -e 'now' \
35DEF:temps1=weather.rrd:temps1:AVERAGE LINE2:temps1#204a87:"Temperatur unten" \
36DEF:temps2=weather.rrd:temps2:AVERAGE LINE2:temps2#f57900:"Temperatur oben" \
37DEF: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"
38
39rrdtool graph web/temperatur_1jahr.png --title "Temperaturen im Jahresverlauf" --font TITLE:12 --vertical-label="° Celsius" -s 'now - 1 year' -e 'now' \
40DEF:temps1=weather.rrd:temps1:AVERAGE LINE2:temps1#204a87:"Temperatur unten" \
41DEF:temps2=weather.rrd:temps2:AVERAGE LINE2:temps2#f57900:"Temperatur oben" \
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_5jahr.png --title "Temperaturen im Jahresverlauf" --font TITLE:12 --vertical-label="° Celsius" -s 'now - 5 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: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"
48
49
50rrdtool graph web/luftfeuchtigkeit_3stunden.png --title "Luftfeuchtigkeit 3h" --font TITLE:12 --vertical-label="%" -s 'now - 3 hour' -e 'now' \
51DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
52DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
53DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" \
54DEF:hum1=../mqtttemp/mqtttemp.rrd:hum1:AVERAGE LINE2:hum1#6666ff:"Luftfeuchtigkeit enklavE\n" \
55GPRINT: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"
56
57rrdtool graph web/luftfeuchtigkeit_6stunden.png --title "Luftfeuchtigkeit 6h" --font TITLE:12 --vertical-label="%" -s 'now - 6 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" \
61GPRINT:hums1:LAST:"Letzte Messung unten\: %3.2lf" GPRINT:hums2:LAST:"oben\: %3.2lf" GPRINT:hums9:LAST:"aussen\: %3.2lf"
62
63rrdtool graph web/luftfeuchtigkeit_12stunden.png --title "Luftfeuchtigkeit 12h" --font TITLE:12 --vertical-label="%" -s 'now - 12 hour' -e 'now' \
64DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
65DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
66DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" \
67GPRINT:hums1:LAST:"Letzte Messung unten\: %3.2lf" GPRINT:hums2:LAST:"oben\: %3.2lf" GPRINT:hums9:LAST:"aussen\: %3.2lf"
68
69rrdtool graph web/luftfeuchtigkeit_1tag.png --title "Luftfeuchtigkeit im Tagesverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 1 day' -e 'now' \
70DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
71DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
72DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" \
73GPRINT:hums1:LAST:"Letzte Messung unten\: %3.2lf" GPRINT:hums2:LAST:"oben\: %3.2lf" GPRINT:hums9:LAST:"aussen\: %3.2lf"
74
75rrdtool graph web/luftfeuchtigkeit_1woche.png --title "Luftfeuchtigkeit im Wochenverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 1 week' -e 'now' \
76DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
77DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
78DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n"
79
80rrdtool graph web/luftfeuchtigkeit_1monat.png --title "Luftfeuchtigkeit im Monatsverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 1 month' -e 'now' \
81DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
82DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
83DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n"
84
85rrdtool graph web/luftfeuchtigkeit_1jahr.png --title "Luftfeuchtigkeit im Jahresverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 1 year' -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"
89
90rrdtool graph web/luftfeuchtigkeit_5jahr.png --title "Luftfeuchtigkeit im Jahresverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 5 year' -e 'now' \
91DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
92DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
93DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n"
94
95
96rrdtool graph web/regen_1tag.png \
97--title "Regen im Tagesverlauf" \
98--font TITLE:12 \
99-s 'now - 1 day' -e 'now' \
100-v mm/Stunde \
101DEF:rains9=weather.rrd:rains9:AVERAGE \
102CDEF:rainph=rains9,3600,*,1,*,0.295,* \
103CDEF:rainpd=rainph,24,* \
104VDEF:totalrain=rainpd,AVERAGE \
105GPRINT:totalrain:"Total %6.0lf mm/Tag" \
106LINE2:rainph#729fcf
107
108rrdtool graph web/regen_1woche.png \
109--title "Regen im Wochenverlauf" \
110--font TITLE:12 \
111-s 'now - 1 week' -e 'now' \
112-v mm/Stunde \
113DEF:rains9=weather.rrd:rains9:AVERAGE \
114CDEF:rainph=rains9,3600,*,1,*,0.295,* \
115CDEF:rainpw=rainph,168,* \
116VDEF:totalrain=rainpw,AVERAGE \
117GPRINT:totalrain:"Total %6.0lf mm/Woche" \
118LINE2:rainph#729fcf
119
120rrdtool graph web/regen_1monat.png \
121--title "Regen im Monatsverlauf" \
122--font TITLE:12 \
123-s 'now - 1 month' -e 'now' \
124-v mm/Tag \
125DEF:rains9=weather.rrd:rains9:AVERAGE \
126CDEF:rainpd=rains9,3600,*,24,*,0.295,* \
127CDEF:rainpm=rainpd,30,* \
128VDEF:totalrain=rainpm,AVERAGE \
129GPRINT:totalrain:"Total %6.0lf mm/Monat" \
130LINE2:rainpd#729fcf
131
132rrdtool graph web/regen_1jahr.png \
133--title "Regen im Jahresverlauf" \
134--font TITLE:12 \
135-s 'now - 1 year' -e 'now' \
136-v mm/Tag \
137DEF:rains9=weather.rrd:rains9:AVERAGE \
138CDEF:rainpd=rains9,3600,*,24,*,0.295,* \
139CDEF:rainpm=rainpd,30,* \
140VDEF:totalrain=rainpm,AVERAGE \
141GPRINT:totalrain:"Total %6.0lf mm/Jahr" \
142LINE2:rainpd#729fcf
143
144rrdtool graph web/regen_5jahr.png \
145--title "Regen im Jahresverlauf" \
146--font TITLE:12 \
147-s 'now - 5 year' -e 'now' \
148-v mm/Tag \
149DEF:rains9=weather.rrd:rains9:AVERAGE \
150CDEF:rainpd=rains9,3600,*,24,*,0.295,* \
151CDEF:rainpm=rainpd,30,* \
152VDEF:totalrain=rainpm,AVERAGE \
153GPRINT:totalrain:"Total %6.0lf mm/Jahr" \
154LINE2:rainpd#729fcf
155
156
157rrdtool 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"
158
159rrdtool 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"
160
161rrdtool 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"
162
163rrdtool 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"
164
165rrdtool 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.