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

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

Temperatur enklavE

  • Property mode set to 100755
File size: 11.4 KB
RevLine 
[af9afaf]1#!/bin/bash
2
[a605f5ba]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" \
[8fc8871]7DEF:temp1=../mqtttemp/mqtttemp.rrd:temp1:AVERAGE LINE2:temp1#6666ff:"Temperatur enklavE\n" \
[2827513]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"
[a605f5ba]9
[7735729]10rrdtool graph web/temperatur_6stunden.png --title "Temperaturen 6h" --font TITLE:12 --vertical-label="° Celsius" -s 'now - 6 hour' -e 'now' \
[a605f5ba]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" \
[15a09ee]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"
[a605f5ba]16
[7735729]17rrdtool graph web/temperatur_12stunden.png --title "Temperaturen 12h" --font TITLE:12 --vertical-label="° Celsius" -s 'now - 12 hour' -e 'now' \
[a605f5ba]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" \
[15a09ee]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"
[a605f5ba]23
[7735729]24rrdtool graph web/temperatur_1tag.png --title "Temperaturen 14" --font TITLE:12 --vertical-label="° Celsius" -s 'now - 1 day' -e 'now' \
[a605f5ba]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" \
[15a09ee]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"
[a605f5ba]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" \
[15a09ee]34DEF:temp1=../mqtttemp/mqtttemp.rrd:temp1:AVERAGE LINE2:temp1#6666ff:"Temperatur enklavE" \
[a605f5ba]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" \
[15a09ee]41DEF:temp1=../mqtttemp/mqtttemp.rrd:temp1:AVERAGE LINE2:temp1#6666ff:"Temperatur enklavE" \
[a605f5ba]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" \
[15a09ee]47DEF:temp1=../mqtttemp/mqtttemp.rrd:temp1:AVERAGE LINE2:temp1#6666ff:"Temperatur enklavE" \
[a605f5ba]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" \
[15a09ee]53DEF:temp1=../mqtttemp/mqtttemp.rrd:temp1:AVERAGE LINE2:temp1#6666ff:"Temperatur enklavE" \
[a605f5ba]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" \
[5adf567]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"
[a605f5ba]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" \
68GPRINT:hums1:LAST:"Letzte Messung unten\: %3.2lf" GPRINT:hums2:LAST:"oben\: %3.2lf" GPRINT:hums9:LAST:"aussen\: %3.2lf"
69
70rrdtool graph web/luftfeuchtigkeit_12stunden.png --title "Luftfeuchtigkeit 12h" --font TITLE:12 --vertical-label="%" -s 'now - 12 hour' -e 'now' \
71DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
72DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
73DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" \
74GPRINT:hums1:LAST:"Letzte Messung unten\: %3.2lf" GPRINT:hums2:LAST:"oben\: %3.2lf" GPRINT:hums9:LAST:"aussen\: %3.2lf"
75
76rrdtool graph web/luftfeuchtigkeit_1tag.png --title "Luftfeuchtigkeit im Tagesverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 1 day' -e 'now' \
77DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
78DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
79DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" \
80GPRINT:hums1:LAST:"Letzte Messung unten\: %3.2lf" GPRINT:hums2:LAST:"oben\: %3.2lf" GPRINT:hums9:LAST:"aussen\: %3.2lf"
81
82rrdtool graph web/luftfeuchtigkeit_1woche.png --title "Luftfeuchtigkeit im Wochenverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 1 week' -e 'now' \
83DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
84DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
85DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n"
86
87rrdtool graph web/luftfeuchtigkeit_1monat.png --title "Luftfeuchtigkeit im Monatsverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 1 month' -e 'now' \
88DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
89DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
90DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n"
91
92rrdtool graph web/luftfeuchtigkeit_1jahr.png --title "Luftfeuchtigkeit im Jahresverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 1 year' -e 'now' \
93DEF:hums1=weather.rrd:hums1:AVERAGE LINE2:hums1#204a87:"Luftfeuchtigkeit unten" \
94DEF:hums2=weather.rrd:hums2:AVERAGE LINE2:hums2#f57900:"Luftfeuchtigkeit oben" \
95DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n"
96
97rrdtool graph web/luftfeuchtigkeit_5jahr.png --title "Luftfeuchtigkeit im Jahresverlauf" --font TITLE:12 --vertical-label="%" -s 'now - 5 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"
[7fbafc7]101
[af9afaf]102
[53aed1c]103rrdtool graph web/regen_1tag.png \
104--title "Regen im Tagesverlauf" \
[8cc14b9]105--font TITLE:12 \
[53aed1c]106-s 'now - 1 day' -e 'now' \
107-v mm/Stunde \
108DEF:rains9=weather.rrd:rains9:AVERAGE \
109CDEF:rainph=rains9,3600,*,1,*,0.295,* \
110CDEF:rainpd=rainph,24,* \
111VDEF:totalrain=rainpd,AVERAGE \
112GPRINT:totalrain:"Total %6.0lf mm/Tag" \
113LINE2:rainph#729fcf
[daaef3e]114
[53aed1c]115rrdtool graph web/regen_1woche.png \
116--title "Regen im Wochenverlauf" \
[8cc14b9]117--font TITLE:12 \
[53aed1c]118-s 'now - 1 week' -e 'now' \
119-v mm/Stunde \
120DEF:rains9=weather.rrd:rains9:AVERAGE \
121CDEF:rainph=rains9,3600,*,1,*,0.295,* \
122CDEF:rainpw=rainph,168,* \
123VDEF:totalrain=rainpw,AVERAGE \
124GPRINT:totalrain:"Total %6.0lf mm/Woche" \
125LINE2:rainph#729fcf
[daaef3e]126
[53aed1c]127rrdtool graph web/regen_1monat.png \
128--title "Regen im Monatsverlauf" \
[8cc14b9]129--font TITLE:12 \
[53aed1c]130-s 'now - 1 month' -e 'now' \
131-v mm/Tag \
132DEF:rains9=weather.rrd:rains9:AVERAGE \
133CDEF:rainpd=rains9,3600,*,24,*,0.295,* \
134CDEF:rainpm=rainpd,30,* \
135VDEF:totalrain=rainpm,AVERAGE \
136GPRINT:totalrain:"Total %6.0lf mm/Monat" \
137LINE2:rainpd#729fcf
[daaef3e]138
[c22952c]139rrdtool graph web/regen_1jahr.png \
140--title "Regen im Jahresverlauf" \
[8cc14b9]141--font TITLE:12 \
[c22952c]142-s 'now - 1 year' -e 'now' \
143-v mm/Tag \
144DEF:rains9=weather.rrd:rains9:AVERAGE \
145CDEF:rainpd=rains9,3600,*,24,*,0.295,* \
146CDEF:rainpm=rainpd,30,* \
147VDEF:totalrain=rainpm,AVERAGE \
148GPRINT:totalrain:"Total %6.0lf mm/Jahr" \
149LINE2:rainpd#729fcf
[daaef3e]150
[7fbafc7]151rrdtool graph web/regen_5jahr.png \
152--title "Regen im Jahresverlauf" \
153--font TITLE:12 \
154-s 'now - 5 year' -e 'now' \
155-v mm/Tag \
156DEF:rains9=weather.rrd:rains9:AVERAGE \
157CDEF:rainpd=rains9,3600,*,24,*,0.295,* \
158CDEF:rainpm=rainpd,30,* \
159VDEF:totalrain=rainpm,AVERAGE \
160GPRINT:totalrain:"Total %6.0lf mm/Jahr" \
161LINE2:rainpd#729fcf
162
163
[8cc14b9]164rrdtool 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"
[daaef3e]165
[8cc14b9]166rrdtool 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"
[daaef3e]167
[8cc14b9]168rrdtool 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"
[c22952c]169
[8cc14b9]170rrdtool 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"
[7fbafc7]171
172rrdtool 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.