2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

fhemweb.pl tuning

git-svn-id: https://svn.fhem.de/fhem/trunk@92 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2007-10-03 16:35:37 +00:00
parent fa0397ad72
commit 94d76271f7
13 changed files with 91 additions and 27 deletions

View File

@ -345,3 +345,5 @@
- bugfix: Seldom xmllist error resulting in corrupt xml (Martin/Peter, 4.9)
- bugfix: FHT mode holiday_short added (9.9, Dirk)
- bugfix: Modifying a device from its own trigger crashes (Klaus, 10.9)
- feature: webpgm2 output reformatted
- feature: webpgm2 can display multiple plots.

View File

@ -261,6 +261,7 @@ EmGetData($$)
my ($dev, $d) = @_;
$d = EmMakeMsg(pack('H*', $d));
return undef if(!$dev);
my $serport = new Device::SerialPort ($dev);
if(!$serport) {
Log 1, "EM: Can't open $dev: $!";

View File

@ -142,7 +142,7 @@ EMWZ_Set($@)
}
my $ret = IOWrite($hash, $msg);
if(!defined($d)) {
if(!defined($ret)) {
my $msg = "EMWZ $name read error";
Log GetLogLevel($name,2), $msg;
return $msg;

34
fhem/FHEM/99_weblink.pm Executable file
View File

@ -0,0 +1,34 @@
##############################################
package main;
use strict;
use warnings;
#####################################
sub
weblink_Initialize($)
{
my ($hash) = @_;
$hash->{DefFn} = "weblink_Define";
}
#####################################
sub
weblink_Define($$)
{
my ($hash, $def) = @_;
my ($type, $name, $wltype, $link) = split("[ \t]+", $def, 4);
my %thash = ( link=>1, fileplot=>1 );
if(!$link || !$thash{$wltype}) {
return "Usage: define <name> weblink [" . join("|",sort keys %thash) . "] <httplink>";
}
$hash->{WLTYPE} = $wltype;
$hash->{LINK} = $link;
$hash->{STATE} = "initial";
return undef;
}
1;

View File

@ -142,3 +142,8 @@
- Rudi Sun Sep 9 08:43:03 MEST 2007
- mode holiday_short added + documentation. Not tested.
any Date module.
- Rudi Wed Oct 3 18:21:36 MEST 2007
- weblinks added. Used by webpgm2 to display more than one plot at once
- webpgm2 output reformatted. Using CSS to divide the screen area in 3
parts: command line, room-list and rest

View File

@ -905,7 +905,33 @@ split in multiple lines<br><br>
HMS100T, etc) and device number, separated by a space.</li>
</ul>
</ul>
<a name="weblink"></a>
<h4>Type weblink</h4>
<ul>
<code>define &lt;name&gt; weblink [link|fileplot] &lt;argument&gt;</code>
<br><br>
This is a placeholder used with webpgm2 to be able to integrate links
into it, and to be able to put more than one gnuplot picture on one page.
It has no set or get methods.
Examples:
<ul>
<code>define wl_1 weblink link http://www.fhem.de</code><br>
<code>define wl_2 weblink fileplot &lt;logdevice&gt;:&lt;gnuplot-file&gt;:&lt;logfile&gt;</code><br>
</ul>
<br>
Notes:
<ul>
Normally you won't have to define fileplot weblinks manually, as fhemweb.pl
(webpgm2) makes it easy for you, just plot a logfile (see <a
href="#logtype">logtype</a>) and convert it to weblink. Now you can
group these weblinks by putting them into rooms.
If you convert the current logfile to a weblink, it will always refer to the
current file (and not the one you originally specified).
</ul>
</ul>
</ul>

View File

@ -1,9 +1,4 @@
#Thu Sep 13 09:11:22 2007
setstate EGRollWzRe on
setstate EGRollWzRe 2007-09-13 09:10:33 state on
setstate EGRollWzReSteuerung active
setstate EGTuerWz1 on
setstate EGTuerWz1 2007-09-13 09:10:33 state on
#Tue Oct 2 21:47:26 2007
setstate FHZ fhtbuf: 1c
setstate FHZ 2006-02-12 14:03:39 fhtbuf 23
setstate FHZ 2006-03-26 08:47:36 init2 deadbeefdeadbe
@ -37,7 +32,8 @@ setstate fl 2006-03-26 08:50:55 unknown_85 4
setstate fl 2006-03-26 08:50:46 wed-from1 06:00
setstate fl 2006-03-26 08:50:46 wed-to1 23:00
setstate fl 2006-03-26 08:50:55 windowopen-temp 12.0 (Celsius)
setstate floor.lamp ???
setstate floor.lamp off
setstate floor.lamp 2007-09-28 22:12:07 state off
setstate global <no definition>
setstate marqee on
setstate marqee 2006-04-01 12:46:02 state on
@ -74,10 +70,10 @@ setstate wz 2006-03-26 08:50:36 wed-from1 06:00
setstate wz 2006-03-26 08:50:36 wed-to1 23:00
setstate wz 2006-03-26 08:52:31 windowopen-temp 12.0 (Celsius)
setstate x 13.66 0.0 30 13.62 15.09 -0.2 2.8
setstate x 2007-09-13 09:10:23 Is 0.0
setstate x 2007-09-13 09:10:23 Temp 30
setstate x 2007-09-13 09:10:23 Vs 13.66
setstate x 2007-09-13 09:10:23 maxI 2.8
setstate x 2007-09-13 09:10:23 maxV 15.09
setstate x 2007-09-13 09:10:23 minI -0.2
setstate x 2007-09-13 09:10:23 minV 13.62
setstate x 2007-10-02 21:46:41 Is 0.0
setstate x 2007-10-02 21:46:41 Temp 30
setstate x 2007-10-02 21:46:41 Vs 13.66
setstate x 2007-10-02 21:46:41 maxI 2.8
setstate x 2007-10-02 21:46:41 maxV 15.09
setstate x 2007-10-02 21:46:41 minI -0.2
setstate x 2007-10-02 21:46:41 minV 13.62

View File

@ -4,7 +4,7 @@
#=================
set terminal png
set terminal png size 1024,240 crop
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
@ -12,7 +12,7 @@ set xlabel " "
set ytics nomirror
set y2tics
set title '<IN>'
set title '<TL>'
set grid
set ylabel "KW"

View File

@ -3,14 +3,14 @@
# FileLog definition:
# define FileLog fhtlog1 fht1:.*(temp|actuator).* /var/log/fht1-%Y-%U.log
#
set terminal png
set terminal png size 1024,240 crop
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 title '<TL>'
set grid
set ylabel "Temperature (Celsius)"

View File

@ -3,13 +3,13 @@
# FileLog definition:
# define FileLog fs20log fs20dev /var/log/fs20dev-%Y-%U.log
#
set terminal png
set terminal png size 1024,240 crop
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set ytics nomirror
set title '<IN>'
set title '<TL>'
set grid
set yrange [-0.2:1.2]

View File

@ -3,14 +3,14 @@
# FileLog definition:
# define FileLog ks300log ks300:.*H:.* /var/log/ks300-%Y-%U.log
#
set terminal png
set terminal png size 1024,240 crop
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 title '<TL>'
set grid
set ylabel "Temperature (Celsius)"

View File

@ -3,14 +3,14 @@
# FileLog definition:
# define FileLog ks300log ks300:.*H:.* /var/log/ks300-%Y-%U.log
#
set terminal png
set terminal png size 1024,240 crop
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 title '<TL>'
set grid
set ylabel "Wind (Km/h)"

View File

@ -3,14 +3,14 @@
# FileLog definition:
# define FileLog ks300log ks300:.*H:.* /var/log/ks300-%Y-%U.log
#
set terminal png
set terminal png size 1024,240 crop
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 title '<TL>'
set grid
set ylabel "Temperature (Celsius)"