2 # set terminal pngcairo mono size 600,800
3 set terminal pngcairo color size 600,800
5 set terminal pngcairo color size 1200,600
11 if (strlen(interval) > 2) {
14 set xtics format "%H:%M"
19 set output '/dev/shm/temp3.png'
24 #set key top left horizontal
37 #if ( ! exists("t_mean")) {
46 print "using default mean and spread"
49 min_t = t_mean - ( t_spread / 2 )
50 max_t = t_mean + ( t_spread / 2 )
52 if ( ! exists("tz_secs") ) {
60 set key horizontal outside top right
62 # re-formated using awk
63 #set datafile separator ","
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 "#0080ff" \
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"
79 if ( exists("lines") && lines == 1 ) {
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 "#0080ff" \
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"
102 min_h = h_mean - h_spread
103 max_h = h_mean + h_spread
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 "#0080ff" \
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"
117 if ( exists("lines") && lines == 1 ) {
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 "#0080ff" \
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"