by jrkalf » Wed Jan 05, 2011 10:01 am
- Code: Select all
############################
# Display the on and off values off an FS20 device
# Corresponding FileLog definition:
# define fs20log FileLog /var/log/fhem/fs20dev-%Y-%U.log fs20dev
set terminal png transparent size <SIZE> crop
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set title '<TL>'
set ytics ("Off" 0, "On" 1)
set y2tics ("Off" 0, "On" 1)
set yrange [-0.1:1.1]
set y2range [-0.1:1.1]
set ylabel "Position"
set y2label "Position"
#FileLog 3::0:$fld[2]eq"on"?1:0
plot "< awk '{print $1, $3==\"on\"? 1 : 0; }' <IN>"\
using 1:2 notitle with steps
This is a simple paste from a gnuplot from the fs20.gplot file from the FHEM directory. From every example I see you can't use variables like that in the xrange or yrange.
Another thing that I noticed:
- Code: Select all
#!/usr/bin/gnuplot
datey="`date +%Y-%m-%d --date='1 days ago'`"
tijd="`date +%H:%M:%S`"
daten="`date +%Y-%m-%d`"
set terminal png transparent small size 950,400 crop
set output '/var/www/temp/testje.png'
set xdata time
set timefmt '%Y-%m-%d_%H:%M:%S'
set xrange ["$datey"_"$tijd":"$daten"_"$tijd"]
Shouldn't this be:
- Code: Select all
#!/usr/bin/gnuplot
set datey="`date +%Y-%m-%d --date='1 days ago'`"
set tijd="`date +%H:%M:%S`"
set daten="`date +%Y-%m-%d`"
set terminal png transparent small size 950,400 crop
set output '/var/www/temp/testje.png'
set xdata time
set timefmt '%Y-%m-%d_%H:%M:%S'
set xrange ["$datey"_"$tijd":"$daten"_"$tijd"]
you forgot to put "set " infront of the key variables you're trying to use.
If you can't fix it with a hammer, you've got an electrical problem!
Fibaro HC2, various z-wave switching, alerting, detection modules.
ELV FHT80b heating system.