change kupaona to dark blue
[vaillant-thermostat] / temp3.gnuplot
1 if ( gray == 1 ) {
2 #       set terminal pngcairo mono size 600,800
3         set terminal pngcairo color size 600,800
4 } else {
5         set terminal pngcairo color size 1200,600
6 }
7
8 set xdata time
9 set timefmt "%s"
10
11 if (strlen(interval) > 2) {
12         set xtics format "%H"
13 } else {
14         set xtics format "%H:%M"
15 }
16
17 set pointsize 0.2
18
19 set output '/dev/shm/temp3.png'
20
21 unset border
22
23 #set key outside
24 #set key top left horizontal
25
26 set multiplot
27
28
29 if ( gray == 1 ) {
30         set size 1, 0.5
31         set origin 0.0, 0.5
32 } else {
33         set size 1.0, 0.5
34         set origin 0.0, 0.5
35 }
36
37 #if ( ! exists("t_mean")) {
38 if (1) {
39
40 t_mean=25
41 t_spread=30
42
43 h_mean = 50
44 h_spread = 50
45
46 print "using default mean and spread"
47 }
48
49 min_t = t_mean - ( t_spread / 2 )
50 max_t = t_mean + ( t_spread / 2 )
51
52 if ( ! exists("tz_secs") ) {
53         tz_secs=7200
54 }
55
56 set ytics nomirror
57 unset y2tics
58 set y2range [0:50]
59
60 set key horizontal outside top right
61
62 # re-formated using awk
63 #set datafile separator ","
64
65 plot \
66  "/dev/shm/data.DHT22-t" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DHT22" lt rgb "#ff00ff" \
67 ,"/dev/shm/data.ir-dht22-t-h" using ($1+tz_secs):($2) with dots title "ir" lt rgb "#884400" \
68 ,"/dev/shm/data.stol-dht11-t-h" using ($1+tz_secs):($2) with dots title "stol" lt rgb "#cc4400" \
69 ,"/dev/shm/data.kuhinja-t-h" using ($1+tz_secs):($2) with dots title "kuhinja" lt rgb "#ff8844" \
70 ,"/dev/shm/data.kupaona-t-h"  using ($1+tz_secs):($2) with dots title "kupaona" lt rgb "#000088" \
71 ,"/dev/shm/data.soba-t-h" using ($1+tz_secs):($2) with dots title "soba" lt rgb "#ffcc00" \
72 ,"/dev/shm/data.hodnik-t-h" using ($1+tz_secs):($2) with dots title "hodnik" lt rgb "#80ff80" \
73 ,"/dev/shm/data.vani-t-h" using ($1+tz_secs):($2) with dots title "sunce" lt rgb "#00cc00" \
74 ,"/dev/shm/data.kutija-t-h" using ($1+tz_secs):($2) with dots title "hlad" lt rgb "#0088cc" \
75 ,"/dev/shm/data.DS18B20-t" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DS18B20" lt rgb "#880088" \
76 ,"/dev/shm/data.boiler-d" using ($1+tz_secs):($2 > 0 ? 50 : 0) axes x1y2 with dots title "boiler" lt rgb "#aaaaaa"
77
78
79 if ( exists("lines") && lines == 1 ) {
80 plot \
81  "/dev/shm/data.DHT22-t" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with lines title "DHT22" lt rgb "#ff00ff" \
82 ,"/dev/shm/data.ir-dht22-t-h" using ($1+tz_secs):($2) with lines title "ir" lt rgb "#884400" \
83 ,"/dev/shm/data.stol-dht11-t-h" using ($1+tz_secs):($2) with lines title "stol" lt rgb "#cc4400" \
84 ,"/dev/shm/data.kuhinja-t-h" using ($1+tz_secs):($2) with lines title "kuhinja" lt rgb "#ff8844" \
85 ,"/dev/shm/data.kupaona-t-h"  using ($1+tz_secs):($2) with lines title "kupaona" lt rgb "#000088" \
86 ,"/dev/shm/data.soba-t-h" using ($1+tz_secs):($2) with lines title "soba" lt rgb "#ffcc00" \
87 ,"/dev/shm/data.hodnik-t-h" using ($1+tz_secs):($2) with lines title "hodnik" lt rgb "#80ff80" \
88 ,"/dev/shm/data.vani-t-h" using ($1+tz_secs):($2) with lines title "sunce" lt rgb "#00cc00" \
89 ,"/dev/shm/data.kutija-t-h" using ($1+tz_secs):($2) with lines title "hlad" lt rgb "#0088cc"  \
90 ,"/dev/shm/data.DS18B20-t" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with lines title "DS18B20" lt rgb "#880088" \
91 ,"/dev/shm/data.boiler-d" using ($1+tz_secs):($2 > 0 ? 50 : 0) axes x1y2 with dots title "boiler" lt rgb "#aaaaaa"
92 }
93
94 if ( gray == 1 ) {
95         set origin 0.0, 0.0
96 } else {
97         set origin 0.0, 0.0
98 }
99
100 set key off
101
102 min_h = h_mean - h_spread
103 max_h = h_mean + h_spread
104
105 plot \
106  "/dev/shm/data.DHT22-h" using ($1+tz_secs):($2 > min_h && $2 < max_h ? $2 : '') with dots title "DHT22" lt rgb "#ff00ff" \
107 ,"/dev/shm/data.ir-dht22-t-h" using ($1+tz_secs):($3) with dots title "ir" lt rgb "#884400" \
108 ,"/dev/shm/data.stol-dht11-t-h" using ($1+tz_secs):($3) with dots title "stol" lt rgb "#cc4400" \
109 ,"/dev/shm/data.kuhinja-t-h" using ($1+tz_secs):($3) with dots title "kuhinja" lt rgb "#ff8844" \
110 ,"/dev/shm/data.kupaona-t-h"  using ($1+tz_secs):($3) with dots title "kupaona" lt rgb "#000088" \
111 ,"/dev/shm/data.soba-t-h" using ($1+tz_secs):($3) with dots title "soba" lt rgb "#ffcc00" \
112 ,"/dev/shm/data.hodnik-t-h" using ($1+tz_secs):($3) with dots title "hodnik" lt rgb "#80ff80" \
113 ,"/dev/shm/data.vani-t-h" using ($1+tz_secs):($3) with dots title "sunce" lt rgb "#00cc00" \
114 ,"/dev/shm/data.kutija-t-h" using ($1+tz_secs):($3) with dots title "hlad" lt rgb "#0088cc" \
115 ,"/dev/shm/data.boiler-d" using ($1+tz_secs):($2 > 0 ? 50 : 0) axes x1y2 with dots title "boiler" lt rgb "#aaaaaa"
116
117 if ( exists("lines") && lines == 1 ) {
118 plot \
119  "/dev/shm/data.DHT22-h" using ($1+tz_secs):($2 > min_h && $2 < max_h ? $2 : '') with lines title "DHT22" lt rgb "#ff00ff" \
120 ,"/dev/shm/data.ir-dht22-t-h" using ($1+tz_secs):($3) with lines title "ir" lt rgb "#884400" \
121 ,"/dev/shm/data.stol-dht11-t-h" using ($1+tz_secs):($3) with lines title "stol" lt rgb "#cc4400" \
122 ,"/dev/shm/data.kuhinja-t-h" using ($1+tz_secs):($3) with lines title "kuhinja" lt rgb "#ff8844" \
123 ,"/dev/shm/data.kupaona-t-h"  using ($1+tz_secs):($3) with lines title "kupaona" lt rgb "#000088" \
124 ,"/dev/shm/data.soba-t-h" using ($1+tz_secs):($3) with lines title "soba" lt rgb "#ffcc00" \
125 ,"/dev/shm/data.hodnik-t-h" using ($1+tz_secs):($3) with lines title "hodnik" lt rgb "#80ff80" \
126 ,"/dev/shm/data.vani-t-h" using ($1+tz_secs):($3) with lines title "sunce" lt rgb "#00cc00" \
127 ,"/dev/shm/data.kutija-t-h" using ($1+tz_secs):($3) with lines title "hlad" lt rgb "#0088cc" \
128 ,"/dev/shm/data.boiler-d" using ($1+tz_secs):($2 > 0 ? 50 : 0) axes x1y2 with dots title "boiler" lt rgb "#aaaaaa"
129 }
130 unset multiplot