remove outlier values for temperature
[vaillant-thermostat] / temp2.gnuplot
1 if ( ! exists("mono") ) {
2         set terminal pngcairo color size 600,800
3 } else {
4         set terminal pngcairo mono size 600,800
5 }
6
7 set xdata time
8 set timefmt "%s"
9
10 set xtics format "%H"
11
12 set pointsize 0.2
13
14 set output '/dev/shm/temp2.png'
15
16 unset border
17
18 set multiplot
19 set size 1, 0.5
20
21 set origin 0.0, 0.5
22
23 if ( ! exists("t_mean")) {
24
25 t_mean=25
26 t_spread=25
27
28 h_mean = 50
29 h_spread = 30
30
31 print "using default mean and spread"
32 }
33
34 min_t = t_mean - ( t_spread / 2 )
35 max_t = t_mean + ( t_spread / 2 )
36
37 set ytics nomirror
38 set y2tics
39
40 plot "/dev/shm/DS18B20-temperature" using ($1+7200):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DS18B20 deg. C" \
41 ,"/dev/shm/DHT22-temperature" using ($1+7200):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DHT22 deg. C" \
42 ,"/dev/shm/rtl_433-temperature" using ($1+7200):($2) with dots title "RTL433 deg. C"
43
44 set origin 0.0, 0.0
45
46
47 min_h = h_mean - h_spread
48 max_h = h_mean + h_spread
49
50 plot "/dev/shm/DHT22-humidity" using ($1+7200):($2 > min_h && $2 < max_h ? $2 : '') with dots title "DHT22 % hum" \
51 ,"/dev/shm/rtl_433-humidity" using ($1+7200):($2) with dots title "RTL433 % hum" 
52
53 unset multiplot