tasmota dht11 sensor, same graph colors, legend outside
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 13 Aug 2019 10:11:28 +0000 (12:11 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 13 Aug 2019 10:12:31 +0000 (12:12 +0200)
temp3.gnuplot
temp3.sh

index 89e2609..e973912 100644 (file)
@@ -20,6 +20,9 @@ set output '/dev/shm/temp3.png'
 
 unset border
 
 
 unset border
 
+#set key outside
+#set key top left horizontal
+
 set multiplot
 
 
 set multiplot
 
 
@@ -54,29 +57,33 @@ set ytics nomirror
 unset y2tics
 set y2range [0:50]
 
 unset y2tics
 set y2range [0:50]
 
+set key horizontal outside top right
+
 plot \
 plot \
- "/dev/shm/data.DHT22-t" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DHT22 unutra" lt rgb "#ff00ff" \
-,"/dev/shm/data.DS18B20-t" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DS18B20 unutra" lt rgb "#880088" \
-,"/dev/shm/data.ir-dht22-t-h" using ($1+tz_secs):($2) with dots title "ir unutra" lt rgb "#884400" \
+ "/dev/shm/data.DHT22-t" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DHT22" lt rgb "#ff00ff" \
+,"/dev/shm/data.ir-dht22-t-h" using ($1+tz_secs):($2) with dots title "ir" lt rgb "#884400" \
+,"/dev/shm/data.stol-dht11-t-h" using ($1+tz_secs):($2) with dots title "stol" lt rgb "#cc4400" \
 ,"/dev/shm/data.kuhinja-t-h" using ($1+tz_secs):($2) with dots title "kuhinja" lt rgb "#ff8844" \
 ,"/dev/shm/data.kupaona-t-h"  using ($1+tz_secs):($2) with dots title "kupaona" lt rgb "#00ff80" \
 ,"/dev/shm/data.soba-t-h" using ($1+tz_secs):($2) with dots title "soba" lt rgb "#ffcc00" \
 ,"/dev/shm/data.kuhinja-t-h" using ($1+tz_secs):($2) with dots title "kuhinja" lt rgb "#ff8844" \
 ,"/dev/shm/data.kupaona-t-h"  using ($1+tz_secs):($2) with dots title "kupaona" lt rgb "#00ff80" \
 ,"/dev/shm/data.soba-t-h" using ($1+tz_secs):($2) with dots title "soba" lt rgb "#ffcc00" \
-,"/dev/shm/data.vani-t-h" using ($1+tz_secs):($2) with dots title "vani" lt rgb "#00cc00" \
-,"/dev/shm/data.kutija-t-h" using ($1+tz_secs):($2) with dots title "kutija" lt rgb "#0088cc" \
-,"/dev/shm/data.boiler-d" using ($1+tz_secs):($2 > 0 ? 50 : 0) axes x1y2 with dots title "boiler on/off" lt rgb "#aaaaaa"
+,"/dev/shm/data.vani-t-h" using ($1+tz_secs):($2) with dots title "sunce" lt rgb "#00cc00" \
+,"/dev/shm/data.kutija-t-h" using ($1+tz_secs):($2) with dots title "hlad" lt rgb "#0088cc" \
+,"/dev/shm/data.DS18B20-t" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DS18B20" lt rgb "#880088" \
+,"/dev/shm/data.boiler-d" using ($1+tz_secs):($2 > 0 ? 50 : 0) axes x1y2 with dots title "boiler" lt rgb "#aaaaaa"
 
 
 if ( exists("lines") && lines == 1 ) {
 plot \
 
 
 if ( exists("lines") && lines == 1 ) {
 plot \
- "/dev/shm/data.DHT22-t" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with lines title "DHT22 unutra" lt rgb "#ff00ff" \
-,"/dev/shm/data.DS18B20-t" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with lines title "DS18B20 unutra" lt rgb "#880088" \
-,"/dev/shm/data.ir-dht22-t-h" using ($1+tz_secs):($2) with lines title "ir unutra" lt rgb "#884400" \
+ "/dev/shm/data.DHT22-t" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with lines title "DHT22" lt rgb "#ff00ff" \
+,"/dev/shm/data.ir-dht22-t-h" using ($1+tz_secs):($2) with lines title "ir" lt rgb "#884400" \
+,"/dev/shm/data.stol-dht11-t-h" using ($1+tz_secs):($2) with lines title "stol" lt rgb "#cc4400" \
 ,"/dev/shm/data.kuhinja-t-h" using ($1+tz_secs):($2) with lines title "kuhinja" lt rgb "#ff8844" \
 ,"/dev/shm/data.kupaona-t-h"  using ($1+tz_secs):($2) with lines title "kupaona" lt rgb "#00ff80" \
 ,"/dev/shm/data.soba-t-h" using ($1+tz_secs):($2) with lines title "soba" lt rgb "#ffcc00" \
 ,"/dev/shm/data.kuhinja-t-h" using ($1+tz_secs):($2) with lines title "kuhinja" lt rgb "#ff8844" \
 ,"/dev/shm/data.kupaona-t-h"  using ($1+tz_secs):($2) with lines title "kupaona" lt rgb "#00ff80" \
 ,"/dev/shm/data.soba-t-h" using ($1+tz_secs):($2) with lines title "soba" lt rgb "#ffcc00" \
-,"/dev/shm/data.vani-t-h" using ($1+tz_secs):($2) with lines title "vani" lt rgb "#00cc00" \
-,"/dev/shm/data.kutija-t-h" using ($1+tz_secs):($2) with lines title "kutija" lt rgb "#0088cc"  \
-,"/dev/shm/data.boiler-d" using ($1+tz_secs):($2 > 0 ? 50 : 0) axes x1y2 with dots title "boiler on/off" lt rgb "#aaaaaa"
+,"/dev/shm/data.vani-t-h" using ($1+tz_secs):($2) with lines title "sunce" lt rgb "#00cc00" \
+,"/dev/shm/data.kutija-t-h" using ($1+tz_secs):($2) with lines title "hlad" lt rgb "#0088cc"  \
+,"/dev/shm/data.DS18B20-t" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with lines title "DS18B20" lt rgb "#880088" \
+,"/dev/shm/data.boiler-d" using ($1+tz_secs):($2 > 0 ? 50 : 0) axes x1y2 with dots title "boiler" lt rgb "#aaaaaa"
 }
 
 if ( gray == 1 ) {
 }
 
 if ( gray == 1 ) {
@@ -85,28 +92,32 @@ if ( gray == 1 ) {
        set origin 0.0, 0.0
 }
 
        set origin 0.0, 0.0
 }
 
+set key off
+
 min_h = h_mean - h_spread
 max_h = h_mean + h_spread
 
 plot \
 min_h = h_mean - h_spread
 max_h = h_mean + h_spread
 
 plot \
- "/dev/shm/data.DHT22-h" using ($1+tz_secs):($2 > min_h && $2 < max_h ? $2 : '') with dots title "DHT22 unutra" lt rgb "#ff00ff" \
-,"/dev/shm/data.ir-dht22-t-h" using ($1+tz_secs):($3) with dots title "ir unutra" lt rgb "#884400" \
+ "/dev/shm/data.DHT22-h" using ($1+tz_secs):($2 > min_h && $2 < max_h ? $2 : '') with dots title "DHT22" lt rgb "#ff00ff" \
+,"/dev/shm/data.ir-dht22-t-h" using ($1+tz_secs):($3) with dots title "ir" lt rgb "#884400" \
+,"/dev/shm/data.stol-dht11-t-h" using ($1+tz_secs):($3) with dots title "stol" lt rgb "#cc4400" \
 ,"/dev/shm/data.kuhinja-t-h" using ($1+tz_secs):($3) with dots title "kuhinja" lt rgb "#ff8844" \
 ,"/dev/shm/data.kupaona-t-h"  using ($1+tz_secs):($3) with dots title "kupaona" lt rgb "#00ff80" \
 ,"/dev/shm/data.soba-t-h" using ($1+tz_secs):($3) with dots title "soba" lt rgb "#ffcc00" \
 ,"/dev/shm/data.kuhinja-t-h" using ($1+tz_secs):($3) with dots title "kuhinja" lt rgb "#ff8844" \
 ,"/dev/shm/data.kupaona-t-h"  using ($1+tz_secs):($3) with dots title "kupaona" lt rgb "#00ff80" \
 ,"/dev/shm/data.soba-t-h" using ($1+tz_secs):($3) with dots title "soba" lt rgb "#ffcc00" \
-,"/dev/shm/data.vani-t-h" using ($1+tz_secs):($3) with dots title "vani" lt rgb "#00cc00" \
-,"/dev/shm/data.kutija-t-h" using ($1+tz_secs):($3) with dots title "kutija" lt rgb "#0088cc" \
-,"/dev/shm/data.boiler-d" using ($1+tz_secs):($2 > 0 ? 50 : 0) axes x1y2 with dots title "boiler on/off" lt rgb "#aaaaaa"
+,"/dev/shm/data.vani-t-h" using ($1+tz_secs):($3) with dots title "sunce" lt rgb "#00cc00" \
+,"/dev/shm/data.kutija-t-h" using ($1+tz_secs):($3) with dots title "hlad" lt rgb "#0088cc" \
+,"/dev/shm/data.boiler-d" using ($1+tz_secs):($2 > 0 ? 50 : 0) axes x1y2 with dots title "boiler" lt rgb "#aaaaaa"
 
 if ( exists("lines") && lines == 1 ) {
 plot \
 
 if ( exists("lines") && lines == 1 ) {
 plot \
- "/dev/shm/data.DHT22-h" using ($1+tz_secs):($2 > min_h && $2 < max_h ? $2 : '') with lines title "DHT22 unutra" lt rgb "#ff00ff" \
-,"/dev/shm/data.ir-dht22-t-h" using ($1+tz_secs):($3) with lines title "ir unutra" lt rgb "#884400" \
+ "/dev/shm/data.DHT22-h" using ($1+tz_secs):($2 > min_h && $2 < max_h ? $2 : '') with lines title "DHT22" lt rgb "#ff00ff" \
+,"/dev/shm/data.ir-dht22-t-h" using ($1+tz_secs):($3) with lines title "ir" lt rgb "#884400" \
+,"/dev/shm/data.stol-dht11-t-h" using ($1+tz_secs):($3) with lines title "stol" lt rgb "#cc4400" \
 ,"/dev/shm/data.kuhinja-t-h" using ($1+tz_secs):($3) with lines title "kuhinja" lt rgb "#ff8844" \
 ,"/dev/shm/data.kupaona-t-h"  using ($1+tz_secs):($3) with lines title "kupaona" lt rgb "#00ff80" \
 ,"/dev/shm/data.soba-t-h" using ($1+tz_secs):($3) with lines title "soba" lt rgb "#ffcc00" \
 ,"/dev/shm/data.kuhinja-t-h" using ($1+tz_secs):($3) with lines title "kuhinja" lt rgb "#ff8844" \
 ,"/dev/shm/data.kupaona-t-h"  using ($1+tz_secs):($3) with lines title "kupaona" lt rgb "#00ff80" \
 ,"/dev/shm/data.soba-t-h" using ($1+tz_secs):($3) with lines title "soba" lt rgb "#ffcc00" \
-,"/dev/shm/data.vani-t-h" using ($1+tz_secs):($3) with lines title "vani" lt rgb "#00cc00" \
-,"/dev/shm/data.kutija-t-h" using ($1+tz_secs):($3) with lines title "kutija" lt rgb "#0088cc" \
-,"/dev/shm/data.boiler-d" using ($1+tz_secs):($2 > 0 ? 50 : 0) axes x1y2 with dots title "boiler on/off" lt rgb "#aaaaaa"
+,"/dev/shm/data.vani-t-h" using ($1+tz_secs):($3) with lines title "sunce" lt rgb "#00cc00" \
+,"/dev/shm/data.kutija-t-h" using ($1+tz_secs):($3) with lines title "hlad" lt rgb "#0088cc" \
+,"/dev/shm/data.boiler-d" using ($1+tz_secs):($2 > 0 ? 50 : 0) axes x1y2 with dots title "boiler" lt rgb "#aaaaaa"
 }
 unset multiplot
 }
 unset multiplot
index abf9f32..e171b3a 100755 (executable)
--- a/temp3.sh
+++ b/temp3.sh
@@ -55,6 +55,7 @@ influx_mqtt   'stat/boiler/DHT22/temperature'         'DHT22-t'
 influx_mqtt    'stat/boiler/DHT22/humidity'            'DHT22-h'
 
 influx_tele    'tele/ir/SENSOR' 'AM2301_Temperature' 'AM2301_Humidity' 'ir-dht22-t-h'
 influx_mqtt    'stat/boiler/DHT22/humidity'            'DHT22-h'
 
 influx_tele    'tele/ir/SENSOR' 'AM2301_Temperature' 'AM2301_Humidity' 'ir-dht22-t-h'
+influx_tele    'tele/dht11-ir-hdmi/SENSOR' 'DHT11_Temperature' 'DHT11_Humidity' 'stol-dht11-t-h'
 
 influx_mqtt    'stat/boiler/d'                         'boiler-d'
 
 
 influx_mqtt    'stat/boiler/d'                         'boiler-d'