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'
34 #if ( ! exists("t_mean")) {
43 print "using default mean and spread"
46 min_t = t_mean - ( t_spread / 2 )
47 max_t = t_mean + ( t_spread / 2 )
49 if ( ! exists("tz_secs") ) {
58 "/dev/shm/data.DHT22-t" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DHT22 unutra" lt rgb "#ff00ff" \
59 ,"/dev/shm/data.DS18B20-t" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DS18B20 unutra" lt rgb "#880088" \
60 ,"/dev/shm/data.kuhinja-t-h" using ($1+tz_secs):($2) with dots title "kuhinja" lt rgb "#ff8844" \
61 ,"/dev/shm/data.kupaona-t-h" using ($1+tz_secs):($2) with dots title "kupaona" lt rgb "#ccaa00" \
62 ,"/dev/shm/data.soba-t-h" using ($1+tz_secs):($2) with dots title "soba" lt rgb "#ffcc00" \
63 ,"/dev/shm/data.vani-t-h" using ($1+tz_secs):($2) with dots title "vani" lt rgb "#00cc00" \
64 ,"/dev/shm/data.kutija-t-h" using ($1+tz_secs):($2) with dots title "kutija" lt rgb "#0088cc" \
65 ,"/dev/shm/data.boiler-d" using ($1+tz_secs):($2 > 0 ? 50 : 0) axes x1y2 with dots title "boiler on/off" lt rgb "#aaaaaa"
68 if ( exists("lines") && lines == 1 ) {
70 "/dev/shm/data.DHT22-t" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with lines title "DHT22 unutra" lt rgb "#ff00ff" \
71 ,"/dev/shm/data.DS18B20-t" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with lines title "DS18B20 unutra" lt rgb "#880088" \
72 ,"/dev/shm/data.kuhinja-t-h" using ($1+tz_secs):($2) with lines title "kuhinja" lt rgb "#ff8844" \
73 ,"/dev/shm/data.kupaona-t-h" using ($1+tz_secs):($2) with lines title "kupaona" lt rgb "#ccaa00" \
74 ,"/dev/shm/data.soba-t-h" using ($1+tz_secs):($2) with lines title "soba" lt rgb "#ffcc00" \
75 ,"/dev/shm/data.vani-t-h" using ($1+tz_secs):($2) with lines title "vani" lt rgb "#00cc00" \
76 ,"/dev/shm/data.kutija-t-h" using ($1+tz_secs):($2) with lines title "kutija" lt rgb "#0088cc" \
77 ,"/dev/shm/data.boiler-d" using ($1+tz_secs):($2 > 0 ? 50 : 0) axes x1y2 with dots title "boiler on/off" lt rgb "#aaaaaa"
86 min_h = h_mean - h_spread
87 max_h = h_mean + h_spread
90 "/dev/shm/data.DHT22-h" using ($1+tz_secs):($2 > min_h && $2 < max_h ? $2 : '') with dots title "DHT22 unutra" lt rgb "#ff00ff" \
91 ,"/dev/shm/data.kuhinja-t-h" using ($1+tz_secs):($3) with dots title "kuhinja" lt rgb "#ff8844" \
92 ,"/dev/shm/data.kupaona-t-h" using ($1+tz_secs):($3) with dots title "kupaona" lt rgb "#ccaa00" \
93 ,"/dev/shm/data.soba-t-h" using ($1+tz_secs):($3) with dots title "soba" lt rgb "#ffcc00" \
94 ,"/dev/shm/data.vani-t-h" using ($1+tz_secs):($3) with dots title "vani" lt rgb "#00cc00" \
95 ,"/dev/shm/data.kutija-t-h" using ($1+tz_secs):($3) with dots title "kutija" lt rgb "#0088cc" \
96 ,"/dev/shm/data.boiler-d" using ($1+tz_secs):($2 > 0 ? 50 : 0) axes x1y2 with dots title "boiler on/off" lt rgb "#aaaaaa"
98 if ( exists("lines") && lines == 1 ) {
100 "/dev/shm/data.DHT22-h" using ($1+tz_secs):($2 > min_h && $2 < max_h ? $2 : '') with lines title "DHT22 unutra" lt rgb "#ff00ff" \
101 ,"/dev/shm/data.kuhinja-t-h" using ($1+tz_secs):($3) with lines title "kuhinja" lt rgb "#ff8844" \
102 ,"/dev/shm/data.kupaona-t-h" using ($1+tz_secs):($3) with lines title "kupaona" lt rgb "#ccaa00" \
103 ,"/dev/shm/data.soba-t-h" using ($1+tz_secs):($3) with lines title "soba" lt rgb "#ffcc00" \
104 ,"/dev/shm/data.vani-t-h" using ($1+tz_secs):($3) with lines title "vani" lt rgb "#00cc00" \
105 ,"/dev/shm/data.kutija-t-h" using ($1+tz_secs):($3) with lines title "kutija" lt rgb "#0088cc" \
106 ,"/dev/shm/data.boiler-d" using ($1+tz_secs):($2 > 0 ? 50 : 0) axes x1y2 with dots title "boiler on/off" lt rgb "#aaaaaa"