2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 10:46:53 +00:00

Documentating stateFormat / showInternalValues

git-svn-id: https://svn.fhem.de/fhem/trunk@2413 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2013-01-03 13:08:39 +00:00
parent 7652a03688
commit 3ffe8765aa
4 changed files with 144 additions and 72 deletions

View File

@ -31,14 +31,23 @@
- bugfix: rename may overwrite other devices
- feature: FLOORPLAN longpoll (Matthias)
- feature: support for recurring events added in 57_Calendar.pm (Boris)
- feature: added support for OWL CM119,CM160 and CM180, energy sensors in TRX_WEATHER using RFXtrx433 (Willi Herzig)
- feature: added support for KD101 smoke sensor (also set alert and pair) in TRX_SECURITY using RFXtrx433 (Willi Herzig)
- change: changed dewpoint to work with event-on-change-reading and technoline TX3TH (Willi Herzig)
- feature: added support for OWL CM119,CM160 and CM180, energy sensors in
TRX_WEATHER using RFXtrx433 (Willi Herzig)
- feature: added support for KD101 smoke sensor (also set alert and pair) in
TRX_SECURITY using RFXtrx433 (Willi Herzig)
- change: changed dewpoint to work with event-on-change-reading and
technoline TX3TH (Willi Herzig)
- feature: new command fheminfo. Shows system informations. (M. Fischer)
- feature: added support for UV sensors in TRX_LIGHT using RFXtrx433 (Willi Herzig)
- feature: added on-till and on-timer for set in TRX_LIGHT using RFXtrx433 (Willi Herzig)
- feature: generate devices with hexcodes as state for unknown types in TRX_ELSE using RFXtrx433 (Willi Herzig)
- feature: new modules 10_OWServer.pm and 11_OWDevice.pm to interface with OWFS
- feature: added support for UV sensors in TRX_LIGHT using RFXtrx433 (Willi
Herzig)
- feature: added on-till and on-timer for set in TRX_LIGHT using RFXtrx433
(Willi Herzig)
- feature: generate devices with hexcodes as state for unknown types in
TRX_ELSE using RFXtrx433 (Willi Herzig)
- feature: new modules 10_OWServer.pm and 11_OWDevice.pm to interface with
OWFS
- feature: stateFormat (readingsFn modules) and showInternalValues attributes
- feature: new readingsFn modules: FS20 CUL_WS HMS CUL_EM CUL_TX EnOcean ZWave
- 2012-10-28 (5.3)
- feature: added functions trim, ltrim, rtrim, UntoggleDirect,

View File

@ -61,26 +61,34 @@ foreach my $lang (@lang) {
foreach my $mod (sort keys %mods) {
my $tag;
my %tagcount= ();
my %llwct = (); # Last line with closed tag
open(MOD, $mods{$mod}) || die("Cant open $mods{$mod}:$!\n");
my $skip = 1;
my $line = 0;
while(my $l = <MOD>) {
$line++;
if($l =~ m/^=begin html$suffix$/) {
$l = <MOD>; # skip one line, to be able to repeat join+split
$skip = 0;
$skip = 0; $line++;
} elsif($l =~ m/^=end html$suffix/) {
$skip = 1;
} elsif(!$skip) {
# here we copy line by line from the module
print OUT $l;
foreach $tag (TAGS) {
$tagcount{$tag}+= ($l =~ /<$tag>/i);
$tagcount{$tag}-= ($l =~ /<\/$tag>/i);
my $ot = ($tagcount{$tag} ? $tagcount{$tag} : 0);
$tagcount{$tag} +=()= ($l =~ /<$tag>/gi);
$tagcount{$tag} -=()= ($l =~ /<\/$tag>/gi);
$llwct{$tag} = $line if(!$llwct{$tag} || ($ot && !$tagcount{$tag}));
#print "$mod $line $tag $tagcount{$tag}\n" if($tagcount{$tag} ne $ot);
}
}
}
close(MOD);
foreach $tag (TAGS) {
print("$lang $mods{$mod}: Unbalanced $tag\n") if($tagcount{$tag});
print("$lang $mods{$mod}: Unbalanced $tag ".
"($tagcount{$tag}, last line ok: $llwct{$tag})\n")
if($tagcount{$tag});
}
}

View File

@ -326,32 +326,50 @@ A line ending with \ will be concatenated with the next one, so long lines
devices.
</li>
<br><br>The following attributes are honored by the modules that make use
of the standardized readings updating mechanism in fhem.pl. Check the modules
Attributes list if you want to know if it is supporting it.
<br><br>
<br>
<a name="readingFnAttributes"></a>
<b>readingFnAttributes</b><br>
The following attributes are honored by the modules that make use
of the standardized readings updating mechanism in fhem.pl. Check the
modules attribute list if you want to know if it is supporting it.
<a name="stateFormat"></a>
<li>stateFormat<br>
Modifies the STATE of the device, shown by the list command or in the room
overview in FHEMWEB. If not set, its value is taken from the state reading.
If set, then every word in the argument is replaced by the value of the
reading if such a reading for the current device exists. If the value of
this attribute is enclused in {}, then it is evaluated. This attribute is
evaluated each time a reading is updated.
</li>
<a name="event-on-update-reading"></a>
<li>event-on-update-reading<br>
If not set, every update of any reading creates an event, which e.g. is handled
by <a href="#notify">notify</a> or <a href="#FileLog">FileLog</a>. The attribute takes
a comma-separated list of readings. You may use regular expressions in that list. If set, only updates of the listed readings create
events.
If not set, every update of any reading creates an event, which e.g. is
handled by <a href="#notify">notify</a> or <a href="#FileLog">FileLog</a>.
The attribute takes a comma-separated list of readings. You may use regular
expressions in that list. If set, only updates of the listed readings
create events.
</li>
<a name="event-on-change-reading"></a>
<li>event-on-change-reading<br>
The attribute takes a comma-separated list of readings. You may use regular expressions in that list. If set, only changes of the listed readings create events. In other words, if a reading listed here is updated with the new value
identical to the old value, no event is created.
The attribute takes a comma-separated list of readings. You may use regular
expressions in that list. If set, only changes of the listed readings
create events. In other words, if a reading listed here is updated with the
new value identical to the old value, no event is created.
</li><br>
The precedence of event-on-update-reading and event-on-change-reading is as follows:
The precedence of event-on-update-reading and event-on-change-reading is as
follows:
<ol>
<li>If both attributes are not set, any update of any reading of the device creates an event.</li>
<li>If any of the attributes is set, no events occur for updates or changes of readings
not listed in any of the attributes.</li>
<li>If a reading is listed in event-on-update-reading, an update of the reading creates an
event no matter whether the reading is also listed in event-on-change-reading.</li>
<li>If both attributes are not set, any update of any reading of the device
creates an event.</li>
<li>If any of the attributes is set, no events occur for updates or changes
of readings not listed in any of the attributes.</li>
<li>If a reading is listed in event-on-update-reading, an update of the
reading creates an event no matter whether the reading is also listed
in event-on-change-reading.</li>
</ol>
</ul>
@ -369,6 +387,7 @@ A line ending with \ will be concatenated with the next one, so long lines
<code>attr weatherstation event-on-update-reading wind,temperature,humidity</code><br>
<code>attr weatherstation event-on-change-reading israining</code><br>
<code>attr weatherstation event-on-change-reading israining,state</code><br>
<code>attr heating stateFormat Temp:measured-temp, Valve:actuator</code><br>
</ul>
<br>
@ -1037,6 +1056,14 @@ A line ending with \ will be concatenated with the next one, so long lines
receiver are considered a duplicate. Default is 0.5 seconds.
</li><br>
<a name="showInternalValues"></a>
<li>showInternalValues<br>
Show data used for internal computations. If the name of an internal
value, reading or attribute starts with dot (.), then it is normally
hidden, and will only be visible, if this attribute is set to 1.
The attribute is checked by the list command, by the FHEMWEB room
overview and by xmllist.
</li>
</ul>
</ul>

View File

@ -326,49 +326,67 @@ Zeilen erstreckende Befehle, indem man keine \ am Zeilenende eingeben muss.</p>
</li>
<br><br>
<br>
Die folgenden Attribute werden bei Modulen verwendet, die standardisierte "readings"
Aktualisierung der fhem.pl benutzen. Informieren Sie sich in der Liste der
Modulattribute wenn Sie wissen m&ouml;chten ob dies unterst&uuml;tzt wird.<br><br>
<a name="readingFnAttributes"></a>
<b>readingFnAttribute</b><br>
Die folgenden Attribute werden bei Modulen verwendet, die standardisierte
"readings" Aktualisierung der fhem.pl benutzen. Informieren Sie sich in der
Liste der Modulattribute wenn Sie wissen m&ouml;chten ob dies
unterst&uuml;tzt wird.<br><br>
<a name="stateFormat"></a>
<li>stateFormat<br>
&Auml;ndert den Ger&auml;testatus, dies ist z.Bsp. in der Ausgabe des list
Kommandos zu sehen, oder in der Raum&uumlbersicht von FHEMWEB. Falls
nicht gesetzt, dann wird das state Reading &uuml;bernommen. Sonst werden
alle W&ouml;rter im Wert des Attributes durch das entsprechende Reading des
Ger&auml;tes ersetzt (soweit vorhanden). Falls der Wert in {}
eingeschlossen ist, dann wird es als Perl Ausdruck ausgewertet. Die
Auswertung passiert bei jeder &Auml;nderung eines Readings.
</li>
<a name="event-on-update-reading"></a>
<li>event-on-update-reading<br>
Wenn nicht gesetzt, erzeugt jede Ver&auml;nderung eines "readings" ein Ereignis,
welches z.B. von
<a href="#notify">
notify</a> oder
<a href="FileLog">
FileLog</a> ber&uuml;cksichtigt wird. Wenn gesetzt erzeugen nur Aktualisierungen
der eingetragenen "readings" ein Ereignis.
If not set, every update of any reading creates an event, which e.g. is
handled by <a href="#notify">notify</a> or <a href="#FileLog">FileLog</a>.
The attribute takes a comma-separated list of readings. You may use regular
expressions in that list. If set, only updates of the listed readings
create events.
</li>
<a name="event-on-update-reading"></a>
<li>event-on-update-reading<br>
Wenn nicht gesetzt, erzeugt jede Ver&auml;nderung eines "readings" ein
Ereignis, welches z.B. von <a href="#notify">notify</a> oder<a
href="FileLog"> FileLog</a> ber&uuml;cksichtigt wird. Wenn gesetzt erzeugen
nur Aktualisierungen der eingetragenen "readings" ein Ereignis.
</li>
<a name="event-on-change-reading"></a>
<li>event-on-change-reading<br>
Dieses Attribut enth&auml;lt eine durch Kommata getrennte Liste von "readings".
Wenn gesetzt, erzeugen nur Ver&auml;nderungen der gelisteten "readings" ein
Ereignis. Wenn die aktualiserten Werte der gelisteten "readings" identisch
sind, wird kein Ereignis generiert.</li><p>
Die unterschiedlichen Bedeutungen von
event-on-update-reading und event-on-change-reading sind folgende</span>:
<ol>
<li>
<p>Wenn
beide Attribute nicht gesetzt sind erzeugt jede Aktualisierung eines jeden "readings"
eines Ger&auml;tes ein Ereignis.</li>
<li>
Wenn eines der Attribute gesetzt ist, erzeugen nur Updates oder &auml;nderungen
von "readings" die nicht in einem der Attribute gesetzt sind ein Ereignis.</li>
<li>
Wenn ein "reading" in event-on-update-reading aufgef&uuml;hrt ist, erzeugt eine
Aktualisierung ein Ereignis unabh&auml;ngig ob das "reading" auch in
event-on-change-reading aufgelistet ist.</li>
</ol>
Dieses Attribut enth&auml;lt eine durch Kommata getrennte Liste von
"readings". Wenn gesetzt, erzeugen nur Ver&auml;nderungen der gelisteten
"readings" ein Ereignis. Wenn die aktualiserten Werte der gelisteten
"readings" identisch sind, wird kein Ereignis generiert.</li><p> Die
unterschiedlichen Bedeutungen von event-on-update-reading und
event-on-change-reading sind folgende</span>:
<ul>
<li>Wenn beide Attribute nicht gesetzt sind erzeugt jede Aktualisierung
eines jeden "readings" eines Ger&auml;tes ein Ereignis.</li>
<li>Wenn eines der Attribute gesetzt ist, erzeugen nur Updates oder
&auml;nderungen von "readings" die nicht in einem der Attribute gesetzt
sind ein Ereignis.</li>
<li>Wenn ein "reading" in event-on-update-reading aufgef&uuml;hrt ist,
erzeugt eine Aktualisierung ein Ereignis unabh&auml;ngig ob das
"reading" auch in event-on-change-reading aufgelistet ist.</li>
</ul>
</ul>
<br>
Ger&auml;tespezifische Attribute sind in der Beschreibung zum jeweiligen Ger&auml;t
aufgef&uuml;hrt.
Ger&auml;tespezifische Attribute sind in der Beschreibung zum jeweiligen
Ger&auml;t aufgef&uuml;hrt.
<br>
Beispiele:
@ -380,6 +398,7 @@ Zeilen erstreckende Befehle, indem man keine \ am Zeilenende eingeben muss.</p>
<code>attr weatherstation event-on-update-reading wind,temperature,humidity</code><br>
<code>attr weatherstation event-on-change-reading israining</code><br>
<code>attr weatherstation event-on-change-reading israining,state</code><br>
<code>attr heating stateFormat Temp:measured-temp, Valve:actuator</code><br>
</ul>
<br>
@ -1068,25 +1087,34 @@ Zeilen erstreckende Befehle, indem man keine \ am Zeilenende eingeben muss.</p>
<a name="verbose"></a>
<li>verbose<br>
Setzt den Wert f&uuml;r die H&auml;ufigkeit/Intensit&auml;t von Nachrichten. M&ouml;gliche
Werte sind:
<ul>
<li>0 - Server start/stop
</li><li>1 - Fehlermeldungen oder unbekannte Pakete
</li><li>2 - bedeutende Ereigbisse/Alarme.
</li><li>3 - ausgesendete Kommandos werden gelogged.
</li><li>4 - Sie sehen was von den einzelnen Ger&auml;ten empfangen wird.
</li><li>5 - Fehlersuche.</li>
</ul>
Es wird der Wert 3 f&uuml;r den Normalgebrauch empfohlen.
Setzt den Wert f&uuml;r die H&auml;ufigkeit/Intensit&auml;t von
Nachrichten. M&ouml;gliche Werte sind:
<ul>
<li>0 - Server start/stop
</li><li>1 - Fehlermeldungen oder unbekannte Pakete
</li><li>2 - bedeutende Ereigbisse/Alarme.
</li><li>3 - ausgesendete Kommandos werden gelogged.
</li><li>4 - Sie sehen was von den einzelnen Ger&auml;ten empfangen wird.
</li><li>5 - Fehlersuche.</li>
</ul>
Es wird der Wert 3 f&uuml;r den Normalgebrauch empfohlen.
</li><br>
<a name="dupTimeout"></a>
<li>dupTimeout<br>
Definert die Wartezeit, nach der 2 identische Ereignisse zweier
Empf&auml;nger als Duplikat angesehen werden. Voreingestellt sind 0,5 Sekunden.&nbsp;
Definert die Wartezeit, nach der 2 identische Ereignisse zweier
Empf&auml;nger als Duplikat angesehen werden. Voreingestellt sind 0,5
Sekunden.&nbsp;
</li><br>
<a name="showInternalValues"></a>
<li>showInternalValues<br>
Attribute/Ger&auml;te-Eintraege/Readings die mit Punkt (.) anfangen
werden nicht angezeigt, es sei denn das globale Attribut
showInternalValues ist gesetzt. Diese Variable wird bei dem list und
xmllist Befehl, und bei der FHEMWEB Raumansicht gepr&uuml;ft.
</li>
</ul>
</ul>