From 6bc0e9406ee00e0fb4caa857867db9499cbbabb8 Mon Sep 17 00:00:00 2001
From: rudolfkoenig <>
Date: Fri, 23 Aug 2013 13:29:58 +0000
Subject: [PATCH] weblink readings going to separate module, by justme1986
http://forum.fhem.de/index.php?t=msg&th=13734&goto=91410&rid=0#msg_91410
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@3770 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
FHEM/98_weblink.pm | 21 +++------------------
docs/commandref_frame.html | 1 +
docs/commandref_frame_DE.html | 3 ++-
www/pgm2/fhemweb.js | 4 ++--
4 files changed, 8 insertions(+), 21 deletions(-)
diff --git a/FHEM/98_weblink.pm b/FHEM/98_weblink.pm
index 6f7944c1c..fe3da47ed 100755
--- a/FHEM/98_weblink.pm
+++ b/FHEM/98_weblink.pm
@@ -194,6 +194,7 @@ weblink_FwFn($$$$)
}
}
$ret .= "";
+ $ret .= "
|
";
$ret .= "";
$ret .= "";
@@ -213,7 +214,7 @@ weblink_FwFn($$$$)
Define
- define <name> weblink [link|image|iframe|htmlCode|cmdList|readings]
+ define <name> weblink [link|image|iframe|htmlCode|cmdList]
<argument>
This is a placeholder device used with FHEMWEB to be able to add user
@@ -226,29 +227,13 @@ weblink_FwFn($$$$)
define hr weblink htmlCode <hr>
define w_Frlink weblink htmlCode { WeatherAsHtml("w_Frankfurt") }
define systemCommands weblink cmdList pair:Pair:set+cul2+hmPairForSec+60 restart:Restart:shutdown+restart update:UpdateCheck:update+check
- define wl_SystemStatus weblink readings sysstat *nostate *notime {{ 'load' => 'Systemauslastung', 'temperature' => 'Systemtemperatur in °;C'}}
- define wlHeizung weblink readings t1:temperature t2:temperature t3:temperature *notime {{ 't1.temperature' => 'Vorlauf', 't2.temperature' => 'Rü;cklauf', 't3.temperature' => 'Zirkulation'}}
Notes:
- For cmdList <argument> consist of a list of space separated icon:label:cmd triples.
- - For readings <argument> consist of one or more <device>[:regex] pairs,
- zero or more of the modifiers *noheading, *notime and *nostate and as the last argument an optional {} expression that should return
- a perl hash to map reading names to display names.
-
- - <device>
- the device(s) from which the readings should be taken
- - regex
- an optional regex to select the readings that should be displayed.
- - *noheading
don't display the table heading
- - *notime
don't display the reading timestamp
- - *nostate
don't include the state reading, other readings can be excluded with a regex of the form:^((?!reading).)*$
- - {...}
- a perl expression that returns a hash that maps the reading name to the display name. keys can be either the name of the reading or <device>.<reading>. $NAME is replaced by the device name
-
-
+ The readings type is deprecated. Use readingGroup instead.
diff --git a/docs/commandref_frame.html b/docs/commandref_frame.html
index 5973018a3..b15319725 100644
--- a/docs/commandref_frame.html
+++ b/docs/commandref_frame.html
@@ -100,6 +100,7 @@
PID
PRESENCE
PachLog
+ readingsGroup
remotecontrol
SUNRISE_EL
sequence
diff --git a/docs/commandref_frame_DE.html b/docs/commandref_frame_DE.html
index 96acc4853..05dd16021 100644
--- a/docs/commandref_frame_DE.html
+++ b/docs/commandref_frame_DE.html
@@ -98,7 +98,8 @@
PID
PRESENCE
PachLog
- remotecontrol
+ readingsGroup
+ remotecontrol
SUNRISE_EL
sequence
speedtest
diff --git a/www/pgm2/fhemweb.js b/www/pgm2/fhemweb.js
index 0affeafc3..c241bca97 100644
--- a/www/pgm2/fhemweb.js
+++ b/www/pgm2/fhemweb.js
@@ -33,7 +33,7 @@ FW_doUpdate()
var devs = new Array();
for(var i=FW_curLine; i < lines.length; i++) {
var d = lines[i].split("<<", 3); // Complete arg
- //console.log("Got "+lines[i]);
+ console.log("Got "+lines[i]);
if(d.length != 3)
continue;
var elArr = document.querySelectorAll("[informId='"+d[0]+"']");
@@ -48,7 +48,7 @@ FW_doUpdate()
} else {
el.innerHTML=d[2];
- if(d[0].indexOf("-") >= 0) // readings / timestamps
+ if(d[0].match(/-ts$/)) // timestamps
el.setAttribute('class', 'changed');
}