added lines for additional sensor
[vaillant-thermostat] / temp2.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/temp2.png'
20
21 unset border
22
23 set multiplot
24
25
26 if ( gray == 1 ) {
27         set size 1, 0.5
28         set origin 0.0, 0.5
29 } else {
30         set size 1.0, 0.5
31         set origin 0.0, 0.5
32 }
33
34 #if ( ! exists("t_mean")) {
35 if (1) {
36
37 t_mean=25
38 t_spread=25
39
40 h_mean = 50
41 h_spread = 50
42
43 print "using default mean and spread"
44 }
45
46 min_t = t_mean - ( t_spread / 2 )
47 max_t = t_mean + ( t_spread / 2 )
48
49 set ytics nomirror
50 set y2tics
51
52 plot \
53  "/dev/shm/DHT22-temperature" using ($1+7200):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DHT22 unutra" \
54 ,"/dev/shm/rtl_433-9-172-temperature" using ($1+7200):($2) with dots title "vani" \
55 ,"/dev/shm/rtl_433-9-75-temperature"  using ($1+7200):($2) with dots title "kupaona" \
56 ,"/dev/shm/rtl_433-9-141-temperature" using ($1+7200):($2) with dots title "kuhinja" \
57 ,"/dev/shm/DS18B20-temperature" using ($1+7200):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DS18B20 unutra" \
58 ,"/dev/shm/rtl_433-183-temperature" using ($1+7200):($2) with dots title "soba" lt rgb "#808000"
59
60
61 if ( exists("lines") && lines == 1 ) {
62 plot \
63  "/dev/shm/DHT22-temperature" using ($1+7200):($2 > min_t && $2 < max_t ? $2 : '') with lines title "DHT22 unutra" \
64 ,"/dev/shm/rtl_433-9-172-temperature" using ($1+7200):($2) with lines title "vani" \
65 ,"/dev/shm/rtl_433-9-75-temperature"  using ($1+7200):($2) with lines title "kupaona" \
66 ,"/dev/shm/rtl_433-9-141-temperature" using ($1+7200):($2) with lines title "kuhinja" \
67 ,"/dev/shm/DS18B20-temperature" using ($1+7200):($2 > min_t && $2 < max_t ? $2 : '') with lines title "DS18B20 unutra" \
68 ,"/dev/shm/rtl_433-183-temperature" using ($1+7200):($2) with lines title "soba" lt rgb "#808000"
69 }
70
71 if ( gray == 1 ) {
72         set origin 0.0, 0.0
73 } else {
74         set origin 0.0, 0.0
75 }
76
77 min_h = h_mean - h_spread
78 max_h = h_mean + h_spread
79
80 plot \
81  "/dev/shm/DHT22-humidity" using ($1+7200):($2 > min_h && $2 < max_h ? $2 : '') with dots title "DHT22 unutra" \
82 ,"/dev/shm/rtl_433-9-172-humidity" using ($1+7200):($2) with lines title "vani" \
83 ,"/dev/shm/rtl_433-9-75-humidity"  using ($1+7200):($2) with lines title "kupaona" \
84 ,"/dev/shm/rtl_433-9-141-humidity" using ($1+7200):($2) with lines title "kuhunja"
85
86 unset multiplot