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
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" \
[f15e2ac]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"
[a605f5ba]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" \
[f15e2ac]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"
[a605f5ba]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" \
[f15e2ac]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"
[a605f5ba]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" \
[f63674a]88DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" \
89DEF:hum1=../mqtttemp/mqtttemp.rrd:hum1:AVERAGE LINE2:hum1#6666ff:"Luftfeuchtigkeit enklavE"
[a605f5ba]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" \
[f63674a]94DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" \
95DEF:hum1=../mqtttemp/mqtttemp.rrd:hum1:AVERAGE LINE2:hum1#6666ff:"Luftfeuchtigkeit enklavE"
[a605f5ba]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" \
[f63674a]100DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" \
101DEF:hum1=../mqtttemp/mqtttemp.rrd:hum1:AVERAGE LINE2:hum1#6666ff:"Luftfeuchtigkeit enklavE"
[a605f5ba]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" \
[f63674a]106DEF:hums9=weather.rrd:hums9:AVERAGE LINE2:hums9#4e9a06:"Luftfeuchtigkeit aussen\n" \
107DEF:hum1=../mqtttemp/mqtttemp.rrd:hum1:AVERAGE LINE2:hum1#6666ff:"Luftfeuchtigkeit enklavE"
[7fbafc7]108
[af9afaf]109
[53aed1c]110rrdtool graph web/regen_1tag.png \
111--title "Regen im Tagesverlauf" \
[8cc14b9]112--font TITLE:12 \
[53aed1c]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
[daaef3e]121
[53aed1c]122rrdtool graph web/regen_1woche.png \
123--title "Regen im Wochenverlauf" \
[8cc14b9]124--font TITLE:12 \
[53aed1c]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
[daaef3e]133
[53aed1c]134rrdtool graph web/regen_1monat.png \
135--title "Regen im Monatsverlauf" \
[8cc14b9]136--font TITLE:12 \
[53aed1c]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
[daaef3e]145
[c22952c]146rrdtool graph web/regen_1jahr.png \
147--title "Regen im Jahresverlauf" \
[8cc14b9]148--font TITLE:12 \
[c22952c]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
[daaef3e]157
[7fbafc7]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
[8cc14b9]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"
[daaef3e]172
[8cc14b9]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"
[daaef3e]174
[8cc14b9]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"
[c22952c]176
[8cc14b9]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"
[7fbafc7]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.