Fhemweb.pl fixes

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@34 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2007-03-27 14:50:04 +00:00
parent cf8889f66d
commit 44fea995b1
12 changed files with 163 additions and 18 deletions

View File

@@ -1,13 +1,13 @@
See the main doc (fhem.html) for the first documentation and installation.
If you want to show anly a part of your devices on a single screen
If you want to show only a part of your devices on a single screen
(i.e divide them into separate rooms), then assign each device the
room attribute in the config file:
attr ks300 room garden
attr ks300-log room garden
The attribute of the FHZ device will be used as title on the first
The attribute title of the global device will be used as title on the first
screen, which shows the list of all rooms. Devices in the room
"hidden" will not be shown. Devices without a room attribute go
to the room "misc".

View File

@@ -0,0 +1,22 @@
#
# Display the measured temp and the actuator.
# FileLog definition:
# define FileLog fhtlog1 fht1:.*(temp|actuator).* /var/log/fht1-%Y-%U.log
#
set terminal png
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set ytics nomirror
set y2tics
set title '<IN>'
set grid
set ylabel "Temperature (Celsius)"
set y2label "Actuator (%)"
plot \
"< awk '/measured/{print $1, $4; s=1}' <IN>"\
using 1:2 axes x1y1 title 'Measured temperature' with lines,\
"< awk '/actuator/ {print $1, $4+0; have=1} /measured/ {s=$1} END { if(!have) print (s, 0)}' <IN>"\
using 1:2 axes x1y2 title 'Actuator (%)' with lines

View File

@@ -0,0 +1,17 @@
#
# Display the on and off values off an FS20 device
# FileLog definition:
# define FileLog fs20log fs20dev /var/log/fs20dev-%Y-%U.log
#
set terminal png
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set ytics nomirror
set title '<IN>'
set grid
set yrange [-0.2:1.2]
plot "< awk '{print $1, $3==\"on\"? 1 : 0; }' <IN>"\
using 1:2 title 'On/Off' with steps

View File

@@ -0,0 +1,19 @@
#
# Display the Temperature and the humidity values of a KS300.
# FileLog definition:
# define FileLog ks300log ks300:.*H:.* /var/log/ks300-%Y-%U.log
#
set terminal png
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set ytics nomirror
set y2tics
set title '<IN>'
set grid
set ylabel "Temperature (Celsius)"
set y2label "Humidity (%)"
plot "<IN>" using 1:4 axes x1y1 title 'Temperature' with lines,\
"<IN>" using 1:6 axes x1y2 title 'Rel. Humidity (%)' with lines

View File

@@ -0,0 +1,20 @@
#
# Display the Wind and the Rain values of a KS300.
# FileLog definition:
# define FileLog ks300log ks300:.*H:.* /var/log/ks300-%Y-%U.log
#
set terminal png
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set ytics nomirror
set y2tics
set title '<IN>'
set grid
set ylabel "Wind (Km/h)"
set y2label "Rain (l/m2)"
plot "<IN>" using 1:8 axes x1y1 title 'Wind' with lines,\
"<grep -v avg_ <IN> | perl -ane '@a = split(\"[_:]\", $F[0]); if(defined($lh) && $lh ne $a[1]) { printf(\"${ld}_$lh:30:00 %f\n\", $hv); $hv = 0; } if($lv) { $hv += ($F[9]-$lv); } $lh = $a[1]; $ld = $a[0]; $lv = $F[9]; END { printf(\"${ld}_$lh:30:00 %f\n\", $hv) }'" using 1:2 axes x1y2 title 'Rain/h' with histeps,\
"<grep -v avg_ <IN> | perl -ane '@a = split(\"[_]\", $F[0]); if(defined($ld) && $ld ne $a[0]) { printf(\"${ld}_12:00:00 %f\n\", $dv); $dv = 0; } if($lv) { $dv += ($F[9]-$lv); } $ld = $a[0]; $lv = $F[9]; END {printf(\"${ld}_12:00:00 %f\n\", $dv)}'" using 1:2 axes x1y2 title 'Rain/day' with histeps