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

98_archetype: commandref to id, change maintainer

git-svn-id: https://svn.fhem.de/fhem/trunk@25612 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2022-02-02 03:38:07 +00:00
parent 3b35209259
commit cea5961b06
3 changed files with 116 additions and 109 deletions

View File

@ -1,11 +1,11 @@
# Id ########################################################################## ##########################################################################
# $Id$ # $Id$
# copyright ################################################################### # copyright ###################################################################
# #
# 98_archetype.pm # 98_archetype.pm
# #
# Copyright by igami # Originally initiated by igami
# #
# This file is part of FHEM. # This file is part of FHEM.
# #
@ -840,17 +840,19 @@ sub CommandClean($$) {
1; 1;
__END__
# commandref ################################################################## # commandref ##################################################################
=pod =pod
=item helper =item helper
=item summary inheritance attributes and defines devices =item summary inheritance attributes and defines devices
=item summary_DE vererbt Attribute und definiert Geräte =item summary_DE vererbt Attribute und definiert Geräte
=encoding utf8
=begin html =begin html
<a name="archetype"></a> <a id="archetype"></a>
<h3>archetype</h3> <h3>archetype</h3>
( en | <a href="commandref_DE.html#archetype">de</a> )
<div> <div>
<ul> <ul>
With an archetype, attributes are transferred to inheritors, other devices. With an archetype, attributes are transferred to inheritors, other devices.
@ -877,9 +879,10 @@ sub CommandClean($$) {
</li> </li>
</ul> </ul>
<br> <br>
<a name="archetypecommand"></a> <a id="archetype-command"></a>
<b>Commands</b> <h4>Commands</h4>
<ul> <ul>
<a id="archetype-command-clean"></a>
<code>clean [check]</code><br> <code>clean [check]</code><br>
Defines all inheritors for all relations und inheritance all inheritors Defines all inheritors for all relations und inheritance all inheritors
with the attributes specified under the attribute attribute.<br> with the attributes specified under the attribute attribute.<br>
@ -887,8 +890,8 @@ sub CommandClean($$) {
inheritors are displayed. inheritors are displayed.
</ul> </ul>
<br> <br>
<a name="archetypedefine"></a> <a id="archetype-define"></a>
<b>Define</b> <h4>Define</h4>
<ul> <ul>
<code> <code>
define &lt;name&gt; archetype [&lt;devspec&gt;] [&lt;devspec&gt;] [...] define &lt;name&gt; archetype [&lt;devspec&gt;] [&lt;devspec&gt;] [...]
@ -910,10 +913,10 @@ sub CommandClean($$) {
inheritors. inheritors.
</ul> </ul>
<br> <br>
<a name="archetypeset"></a> <a id="archetype-set"></a>
<b>Set</b> <h4>Set</h4>
<ul> <ul>
<li> <a id="archetype-set-addToAttrList"></a><li>
<code>addToAttrList &lt;attribute&gt;</code><br> <code>addToAttrList &lt;attribute&gt;</code><br>
The command is only possible for an archetype with DEF The command is only possible for an archetype with DEF
"derive attributes".<br> "derive attributes".<br>
@ -922,7 +925,7 @@ sub CommandClean($$) {
This can be useful to derive the alias according to a pattern. This can be useful to derive the alias according to a pattern.
</li> </li>
<br> <br>
<li> <a id="archetype-set-define"></a><li>
<code>define inheritors</code><br> <code>define inheritors</code><br>
Defines an inheritor for all relations according to the pattern:<br> Defines an inheritor for all relations according to the pattern:<br>
<ul> <ul>
@ -937,7 +940,7 @@ sub CommandClean($$) {
the attributes. the attributes.
</li> </li>
<br> <br>
<li> <a id="archetype-set-derive"></a><li>
<code>derive attributes</code><br> <code>derive attributes</code><br>
This command is only possible for an archetype with DEF This command is only possible for an archetype with DEF
"derive attributes".<br> "derive attributes".<br>
@ -945,63 +948,67 @@ sub CommandClean($$) {
inheritors. inheritors.
</li> </li>
<br> <br>
<li> <a id="archetype-set-inheritance"></a><li>
<code>inheritance</code><br> <code>inheritance</code><br>
Inheritance all attributes specified under the attributes attribute for Inheritance all attributes specified under the attributes attribute for
all inheritors. all inheritors.
</li> </li>
<br> <br>
<li> <a id="archetype-set-initialize"></a><li>
<code>initialize inheritors</code><br> <code>initialize inheritors</code><br>
Executes all commands specified under the attributes initialize for all Executes all commands specified under the attributes initialize for all
inheritors. inheritors.
</li> </li>
<br> <br>
<li> <a id="archetype-set-raw"></a><li>
<code>raw &lt;command&gt;</code><br> <code>raw &lt;command&gt;</code><br>
Executes the command for all inheritors. Executes the command for all inheritors.
</li> </li>
</ul> </ul>
<br> <br>
<a name="archetypeget"></a> <a id="archetype-get"></a>
<b>Get</b> <h4>Get</h4>
<ul> <ul>
<li> <a id="archetype-get-inheritors"></a><li>
<code>inheritors</code><br> <code>inheritors</code><br>
Displays all inheritors. Displays all inheritors.
</li> </li>
<br> <br>
<li> <a id="archetype-get-relations"></a><li>
<code>relations</code><br> <code>relations</code><br>
Displays all relations. Displays all relations.
</li> </li>
<br> <br>
<li> <a id="archetype-get-pending"></a><li>
<code>pending attributes</code><br> <ul>
Displays all outstanding attributes specified under the attributes <li>
attributes for all inheritors, which do not match the attributes of the <code>pending attributes</code><br>
archetype. Displays all outstanding attributes specified under the attributes
</li> attributes for all inheritors, which do not match the attributes of the
<br> archetype.
<li> </li>
<code>pending inheritors</code><br> <br>
Displays all outstanding inheritors, which should be defined on the <li>
basis of the relations <code>pending inheritors</code><br>
Displays all outstanding inheritors, which should be defined on the
basis of the relations
</li>
</ul>
</li> </li>
</ul> </ul>
<br> <br>
<a name="archetypeattr"></a> <a id="archetype-attr"></a>
<b>Attribute</b> <h4>Attributes</h4>
<ul> <ul>
Notes:<br> Notes:<br>
All attributes that can be inherited can be pre-modified with a modifier. All attributes that can be inherited can be pre-modified with a modifier.
<ul> <ul>
<li> <a id="archetype-attr-undef"></a><li>
<code>attr archetype &lt;attribute&gt; undef:&lt;...&gt;</code><br> <code>attr archetype &lt;attribute&gt; undef:&lt;...&gt;</code><br>
If <code>undef:</code> preceded, the attribute is inherited only if If <code>undef:</code> preceded, the attribute is inherited only if
the inheritors does not already have this attribute. the inheritors does not already have this attribute.
</li><br> </li><br>
<li> <a id="archetype-attr-least"></a><li>
<code> <code>
attr archetype &lt;attribute&gt; attr archetype &lt;attribute&gt;
least[(&lt;seperator&gt;)]:&lt;...&gt; least[(&lt;seperator&gt;)]:&lt;...&gt;
@ -1013,7 +1020,7 @@ sub CommandClean($$) {
</li> </li>
</ul> </ul>
<br> <br>
<li> <a id="archetype-attr-actual_attribute" data-pattern="actual_.*"></a><li>
<code>actual_&lt;attribute&gt; &lt;value&gt;</code><br> <code>actual_&lt;attribute&gt; &lt;value&gt;</code><br>
&lt;value&gt; can be specified as &lt;text&gt; or {perl code}.<br> &lt;value&gt; can be specified as &lt;text&gt; or {perl code}.<br>
If the attribute &lt;attribute&gt; becomes inheritance the return If the attribute &lt;attribute&gt; becomes inheritance the return
@ -1031,17 +1038,17 @@ sub CommandClean($$) {
by addToAttrList.<br> by addToAttrList.<br>
</li> </li>
<br> <br>
<li> <a id="archetype-attr-actualTYPE"></a><li>
<code>actualTYPE &lt;TYPE&gt;</code><br> <code>actualTYPE &lt;TYPE&gt;</code><br>
Sets the TYPE of the inheritor. The default value is dummy. Sets the TYPE of the inheritor. The default value is dummy.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-attributes"></a><li>
<code>attributes &lt;attribute&gt; [&lt;attribute&gt;] [...]</code><br> <code>attributes &lt;attribute&gt; [&lt;attribute&gt;] [...]</code><br>
Space-separated list of attributes to be inherited. Space-separated list of attributes to be inherited.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-attributesExclude"></a><li>
<code> <code>
attributesExclude &lt;attribute&gt; [&lt;attribute&gt;] [...] attributesExclude &lt;attribute&gt; [&lt;attribute&gt;] [...]
</code><br> </code><br>
@ -1049,32 +1056,32 @@ sub CommandClean($$) {
inheritors. inheritors.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-autocreate"></a><li>
<code>autocreate 0</code><br> <code>autocreate 0</code><br>
The archetype does not automatically inherit attributes to new devices, The archetype does not automatically inherit attributes to new devices,
and inheritors are not created automatically for new relations.<br> and inheritors are not created automatically for new relations.<br>
The default value is 1. The default value is 1.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-defined_by"></a><li>
<code>defined_by &lt;...&gt;</code><br> <code>defined_by &lt;...&gt;</code><br>
Auxiliary attribute to recognize by which archetype the inheritor was Auxiliary attribute to recognize by which archetype the inheritor was
defined. defined.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-deleteAttributes"></a><li>
<code>delteAttributes 1</code><br> <code>deleteAttributes 1</code><br>
If an attribute is deleted in the archetype, it is also deleted for all If an attribute is deleted in the archetype, it is also deleted for all
inheritors.<br> inheritors.<br>
The default value is 0. The default value is 0.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-disable"></a><li>
<code>disable 1</code><br> <code>disable 1</code><br>
No attributes are inherited and no inheritors are defined. No attributes are inherited and no inheritors are defined.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-initialize"></a><li>
<code>initialize &lt;initialize&gt;</code><br> <code>initialize &lt;initialize&gt;</code><br>
&lt;initialize&gt; can be specified as &lt;text&gt; or {perl code}.<br> &lt;initialize&gt; can be specified as &lt;text&gt; or {perl code}.<br>
The &lt;text&gt; or the return of {perl code} must be a list of FHEM The &lt;text&gt; or the return of {perl code} must be a list of FHEM
@ -1082,23 +1089,23 @@ sub CommandClean($$) {
inheritors when they are defined. inheritors when they are defined.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-metaDEF"></a><li>
<code>metaDEF &lt;metaDEF&gt;</code><br> <code>metaDEF &lt;metaDEF&gt;</code><br>
&lt;metaDEF&gt; can be specified as &lt;text&gt; or {perl code} and &lt;metaDEF&gt; can be specified as &lt;text&gt; or {perl code} and
describes the structure of the DEF for the inheritors. describes the structure of the DEF for the inheritors.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-metaNAME"></a><li>
<code>metaNAME &lt;metaNAME&gt;</code><br> <code>metaNAME &lt;metaNAME&gt;</code><br>
&lt;metaNAME&gt; can be specified as &lt;text&gt; or {perl code} and &lt;metaNAME&gt; can be specified as &lt;text&gt; or {perl code} and
describes the structure of the name for the inheritors. describes the structure of the name for the inheritors.
</li> </li>
<br> <br>
<li> <li>
<code><a href="#readingList">readingList</a></code> <code><a href="#dummy-attr-readingList">readingList</a></code>
</li> </li>
<br> <br>
<li> <a id="archetype-attr-relations"></a><li>
<code>relations &lt;devspec&gt; [&lt;devspec&gt;] [...]</code><br> <code>relations &lt;devspec&gt; [&lt;devspec&gt;] [...]</code><br>
The relations describes all the relations that exist for this The relations describes all the relations that exist for this
archetype.<br> archetype.<br>
@ -1108,17 +1115,17 @@ sub CommandClean($$) {
</li> </li>
<br> <br>
<li> <li>
<code><a href="#setList">setList</a></code> <code><a href="#dummy-attr-setList">setList</a></code>
</li> </li>
<br> <br>
<li> <a id="archetype-attr-splitRooms"></a><li>
<code>splitRooms 1</code><br> <code>splitRooms 1</code><br>
Returns every room seperatly for each relation in $room. Returns every room seperatly for each relation in $room.
</li> </li>
<br> <br>
</ul> </ul>
<br> <br>
<a name="archetypeexamples"></a> <a id="archetype-examples"></a>
<b>Examples</b> <b>Examples</b>
<ul> <ul>
<a href="https://wiki.fhem.de/wiki/Import_von_Code_Snippets"> <a href="https://wiki.fhem.de/wiki/Import_von_Code_Snippets">
@ -1159,9 +1166,8 @@ attr SVG_link_archetype attributes group</pre>
=begin html_DE =begin html_DE
<a name="archetype"></a> <a id="archetype"></a>
<h3>archetype</h3> <h3>archetype</h3>
( <a href="commandref.html#archetype">en</a> | de )
<div> <div>
<ul> <ul>
Mit einem archetype werden Attribute auf Erben (inheritors), andere Mit einem archetype werden Attribute auf Erben (inheritors), andere
@ -1189,9 +1195,10 @@ attr SVG_link_archetype attributes group</pre>
</li> </li>
</ul> </ul>
<br> <br>
<a name="archetypecommand"></a> <a id="archetype-command"></a>
<b>Befehle</b> <h4>Befehle</h4>
<ul> <ul>
<a id="archetype-command-clean"></a>
<code>clean [check]</code><br> <code>clean [check]</code><br>
Definiert für alle Beziehungen aller archetype die Erben, vererbt für Definiert für alle Beziehungen aller archetype die Erben, vererbt für
alle archetype die unter dem Attribut attributes angegeben Attribute auf alle archetype die unter dem Attribut attributes angegeben Attribute auf
@ -1200,8 +1207,8 @@ attr SVG_link_archetype attributes group</pre>
Attribute und Erben angezeigt. Attribute und Erben angezeigt.
</ul> </ul>
<br> <br>
<a name="archetypedefine"></a> <a id="archetype-define"></a>
<b>Define</b> <h4>Define</h4>
<ul> <ul>
<code> <code>
define &lt;name&gt; archetype [&lt;devspec&gt;] [&lt;devspec&gt;] [...] define &lt;name&gt; archetype [&lt;devspec&gt;] [&lt;devspec&gt;] [...]
@ -1224,10 +1231,10 @@ attr SVG_link_archetype attributes group</pre>
Attribute eines Musters besitzen. Attribute eines Musters besitzen.
</ul> </ul>
<br> <br>
<a name="archetypeset"></a> <a id="archetype-set"></a>
<b>Set</b> <h4>Set</h4>
<ul> <ul>
<li> <a id="archetype-set-addToAttrList"></a><li>
<code>addToAttrList &lt;attribute&gt;</code><br> <code>addToAttrList &lt;attribute&gt;</code><br>
Der Befehl ist nur bei einem archetype mit der DEF "derive attributes" Der Befehl ist nur bei einem archetype mit der DEF "derive attributes"
m&ouml;glich.<br> m&ouml;glich.<br>
@ -1236,7 +1243,7 @@ attr SVG_link_archetype attributes group</pre>
Dies kann sinnvoll sein um den alias nach einem Muster abzuleiten. Dies kann sinnvoll sein um den alias nach einem Muster abzuleiten.
</li> </li>
<br> <br>
<li> <a id="archetype-set-define"></a><li>
<code>define inheritors</code><br> <code>define inheritors</code><br>
Definiert f&uuml;r alle Beziehungen einen Erben nach dem Muster:<br> Definiert f&uuml;r alle Beziehungen einen Erben nach dem Muster:<br>
<ul> <ul>
@ -1251,7 +1258,7 @@ attr SVG_link_archetype attributes group</pre>
beschrieben. beschrieben.
</li> </li>
<br> <br>
<li> <a id="archetype-set-derive"></a><li>
<code>derive attributes</code><br> <code>derive attributes</code><br>
Der Befehl ist nur bei einem archetype mit der DEF "derive attributes" Der Befehl ist nur bei einem archetype mit der DEF "derive attributes"
m&ouml;glich.<br> m&ouml;glich.<br>
@ -1259,13 +1266,13 @@ attr SVG_link_archetype attributes group</pre>
Attribute ab. Attribute ab.
</li> </li>
<br> <br>
<li> <a id="archetype-set-inheritance"></a><li>
<code>inheritance</code><br> <code>inheritance</code><br>
Vererbt die eigenen unter dem Attribut attributes angegeben Attribute Vererbt die eigenen unter dem Attribut attributes angegeben Attribute
auf alle Erben. auf alle Erben.
</li> </li>
<br> <br>
<li> <a id="archetype-set-initialize"></a><li>
<code>initialize inheritors</code><br> <code>initialize inheritors</code><br>
F&uuml;hrt f&uuml;r alle Erben die unter dem Attribut initialize F&uuml;hrt f&uuml;r alle Erben die unter dem Attribut initialize
angegebenen Befehle aus. angegebenen Befehle aus.
@ -1277,46 +1284,49 @@ attr SVG_link_archetype attributes group</pre>
</li> </li>
</ul> </ul>
<br> <br>
<a name="archetypeget"></a> <a id="archetype-get"></a>
<b>Get</b> <h4>Get</h4>
<ul> <ul>
<li> <a id="archetype-get-inheritors"></a><li>
<code>inheritors</code><br> <code>inheritors</code><br>
Listet alle Erben auf. Listet alle Erben auf.
</li> </li>
<br> <br>
<li> <a id="archetype-get-relations"></a><li>
<code>relations</code><br> <code>relations</code><br>
Listet alle Beziehungen auf. Listet alle Beziehungen auf.
</li> </li>
<br> <br>
<li> <a id="archetype-get-pending"></a><li>
<code>pending attributes</code><br> <ul><li>
Listet f&uuml;r jeden Erben die unter dem Attribut attributes angegeben <code>pending attributes</code><br>
Attribute auf, die nicht mit den Attributen des archetype Listet f&uuml;r jeden Erben die unter dem Attribut attributes angegeben
&uuml;bereinstimmen. Attribute auf, die nicht mit den Attributen des archetype
</li> &uuml;bereinstimmen.
<br> </li>
<li> <br>
<code>pending inheritors</code><br> <li>
Listet alle Erben auf die aufgrund der Beziehungen noch definiert <code>pending inheritors</code><br>
werden sollen. Listet alle Erben auf die aufgrund der Beziehungen noch definiert
werden sollen.
</li>
</ul>
</li> </li>
</ul> </ul>
<br> <br>
<a name="archetypeattr"></a> <a id="archetype-attr"></a>
<b>Attribute</b> <h4>Attribute</h4>
<ul> <ul>
Hinweise: Hinweise:
<ul> <ul>
Alle Attribute die vererbt werden k&ouml;nnen, k&ouml;nnen vorab mit Alle Attribute, die vererbt werden k&ouml;nnen, k&ouml;nnen vorab mit
einem Modifikator versehen werden. einem Modifikator versehen werden.
<li> <a id="archetype-attr-undef"></a><li>
<code>attr archetype &lt;attribute&gt; undef:&lt;...&gt;</code><br> <code>attr archetype &lt;attribute&gt; undef:&lt;...&gt;</code><br>
Wird <code>undef:</code> vorangestellt wird das Attribut nur vererbt, Wird <code>undef:</code> vorangestellt wird das Attribut nur vererbt,
sofern der Erbe dieses Attribut noch nicht besitzt. sofern der Erbe dieses Attribut noch nicht besitzt.
</li><br> </li><br>
<li> <a id="archetype-attr-least"></a><li>
<code> <code>
attr archetype &lt;attribute&gt; attr archetype &lt;attribute&gt;
least[(&lt;Trennzeichen&gt;)]:&lt;...&gt; least[(&lt;Trennzeichen&gt;)]:&lt;...&gt;
@ -1330,7 +1340,7 @@ attr SVG_link_archetype attributes group</pre>
</li> </li>
</ul> </ul>
<br> <br>
<li> <a id="archetype-attr-actual_attribute" data-pattern="actual_.*"></a><li>
<code>actual_&lt;attribute&gt; &lt;value&gt;</code><br> <code>actual_&lt;attribute&gt; &lt;value&gt;</code><br>
&lt;value&gt; kann als &lt;Text&gt; oder als {perl code} angegeben &lt;value&gt; kann als &lt;Text&gt; oder als {perl code} angegeben
werden.<br> werden.<br>
@ -1349,17 +1359,17 @@ attr SVG_link_archetype attributes group</pre>
durch addToAttrList hinzugefügte Attribute.<br> durch addToAttrList hinzugefügte Attribute.<br>
</li> </li>
<br> <br>
<li> <a id="archetype-attr-actualTYPE"></a><li>
<code>actualTYPE &lt;TYPE&gt;</code><br> <code>actualTYPE &lt;TYPE&gt;</code><br>
Legt den TYPE des Erben fest. Der Standardwert ist dummy. Legt den TYPE des Erben fest. Der Standardwert ist dummy.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-attributes"></a><li>
<code>attributes &lt;attribute&gt; [&lt;attribute&gt;] [...]</code><br> <code>attributes &lt;attribute&gt; [&lt;attribute&gt;] [...]</code><br>
Leerzeichen-getrennte Liste der zu vererbenden Attribute. Leerzeichen-getrennte Liste der zu vererbenden Attribute.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-attributesExclude"></a><li>
<code> <code>
attributesExclude &lt;attribute&gt; [&lt;attribute&gt;] [...] attributesExclude &lt;attribute&gt; [&lt;attribute&gt;] [...]
</code><br> </code><br>
@ -1367,7 +1377,7 @@ attr SVG_link_archetype attributes group</pre>
vererbt werden. vererbt werden.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-autocreate"></a><li>
<code>autocreate 0</code><br> <code>autocreate 0</code><br>
Durch das archetype werden Attribute auf neue devices nicht automatisch Durch das archetype werden Attribute auf neue devices nicht automatisch
vererbt und Erben werden nicht automatisch für neue Beziehungen vererbt und Erben werden nicht automatisch für neue Beziehungen
@ -1375,25 +1385,25 @@ attr SVG_link_archetype attributes group</pre>
Der Standardwert ist 1. Der Standardwert ist 1.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-defined_by"></a><li>
<code>defined_by &lt;...&gt;</code><br> <code>defined_by &lt;...&gt;</code><br>
Hilfsattribut um zu erkennen, durch welchen archetype der Erbe Hilfsattribut um zu erkennen, durch welchen archetype der Erbe
definiert wurde. definiert wurde.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-deleteAttributes"></a><li>
<code>delteAttributes 1</code><br> <code>delteAttributes 1</code><br>
Wird ein Attribut im archetype gelöscht, wird es auch bei allen Erben Wird ein Attribut im archetype gelöscht, wird es auch bei allen Erben
gelöscht.<br> gelöscht.<br>
Der Standardwert ist 0. Der Standardwert ist 0.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-disable"></a><li>
<code>disable 1</code><br> <code>disable 1</code><br>
Es werden keine Attribute mehr vererbt und keine Erben definiert. Es werden keine Attribute mehr vererbt und keine Erben definiert.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-initialize"></a><li>
<code>initialize &lt;initialize&gt;</code><br> <code>initialize &lt;initialize&gt;</code><br>
&lt;initialize&gt; kann als &lt;Text&gt; oder als {perl code} angegeben &lt;initialize&gt; kann als &lt;Text&gt; oder als {perl code} angegeben
werden.<br> werden.<br>
@ -1402,23 +1412,21 @@ attr SVG_link_archetype attributes group</pre>
werden die Erben initialisiert, wenn sie definiert werden. werden die Erben initialisiert, wenn sie definiert werden.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-metaDEF"></a><li>
<code>metaDEF &lt;metaDEF&gt;</code><br> <code>metaDEF &lt;metaDEF&gt;</code><br>
&lt;metaDEF&gt; kann als &lt;Text&gt; oder als {perl code} angegeben &lt;metaDEF&gt; kann als &lt;Text&gt; oder als {perl code} angegeben
werden und beschreibt den Aufbau der DEF f&uuml;r die Erben. werden und beschreibt den Aufbau der DEF f&uuml;r die Erben.
</li> </li>
<br> <br>
<li> <a id="archetype-attr-metaNAME"></a><li>
<code>metaNAME &lt;metaNAME&gt;</code><br> <code>metaNAME &lt;metaNAME&gt;</code><br>
&lt;metaNAME&gt; kann als &lt;Text&gt; oder als {perl code} angegeben &lt;metaNAME&gt; kann als &lt;Text&gt; oder als {perl code} angegeben
werden und beschreibt den Aufbau des Namen f&uuml;r die Erben. werden und beschreibt den Aufbau des Namen f&uuml;r die Erben.
</li> </li>
<br> <br>
<li> <li><a href="#dummy-attr-readingList">readingList</a></li>
<code><a href="#readingList">readingList</a></code>
</li>
<br> <br>
<li> <a id="archetype-attr-relations"></a><li>
<code>relations &lt;devspec&gt; [&lt;devspec&gt;] [...]</code><br> <code>relations &lt;devspec&gt; [&lt;devspec&gt;] [...]</code><br>
In den &lt;relations&gt; werden alle Beziehungen beschrieben die es für In den &lt;relations&gt; werden alle Beziehungen beschrieben die es für
dieses archetype gibt.<br> dieses archetype gibt.<br>
@ -1427,19 +1435,17 @@ attr SVG_link_archetype attributes group</pre>
f&uuml;r Details der &lt;devspec&gt;. f&uuml;r Details der &lt;devspec&gt;.
</li> </li>
<br> <br>
<li> <li><a href="#dummy-attr-setList">setList</a></li>
<code><a href="#setList">setList</a></code>
</li>
<br> <br>
<li> <a id="archetype-attr-splitRooms"></a><li>
<code>splitRooms 1</code><br> <code>splitRooms 1</code><br>
Gibt für jede Beziehung jeden Raum separat in $room zurück. Gibt für jede Beziehung jeden Raum separat in $room zurück.
</li> </li>
<br> <br>
</ul> </ul>
<br> <br>
<a name="archetypeexamples"></a> <a id="archetype-examples"></a>
<b>Beispiele</b> <h4>Beispiele</h4>
<ul> <ul>
<a href="https://wiki.fhem.de/wiki/Import_von_Code_Snippets"> <a href="https://wiki.fhem.de/wiki/Import_von_Code_Snippets">
<u> <u>

View File

@ -1621,7 +1621,7 @@ attr DEVICE readingList \
STATTOPIC/POWER2:.* {{'state' => 'closing'} if $EVENT eq 'on'} STATTOPIC/POWER2:.* {{'state' => 'closing'} if $EVENT eq 'on'}
attr DEVICE devStateIcon {my $onl = ReadingsVal($name,'LWT','Offline') eq 'Offline' ? 'rot' : 'gruen'; $onl = FW_makeImage("10px-kreis-$onl"); my $ip = ReadingsVal($name,'IPAddress','none'); my $pct = int((109 - ReadingsNum($name,'pct',0))/10)*10; my $open = ReadingsVal($name,'state',''); my $lvicon = $open eq 'opening' ? 'fts_shutter_up@red' : $open eq 'closing' ? 'fts_shutter_down@red' : "fts_shutter_$pct"; $lvicon = FW_makeImage($lvicon); my $lvcmd = ($open eq 'opening' || $open eq 'closing') ? 'stop' : $pct > 50 ? 'close' : 'open'; my $slt = ReadingsNum($name,'tiltSlat',90); my $slticon = 'fts_blade_arc_close_'; $slticon .= $slt > 0 ? '00' : $slt > -45 ? '50' : '100'; $slticon = FW_makeImage($slticon); my $sltcmd = $slt > 0 ? 'closeSlat' : $slt > -45 ? 'openSlat' : 'halfSlat'; qq(<a href="http://$ip" target="_blank">$onl</a> <div><a href="/fhem?cmd.dummy=set $name $lvcmd&XHR=1">$lvicon</a></div> <div><a href="/fhem?cmd.dummy=set $name $sltcmd&XHR=1">$slticon $slt</a>) } attr DEVICE devStateIcon {my $onl = ReadingsVal($name,'LWT','Offline') eq 'Offline' ? 'rot' : 'gruen'; $onl = FW_makeImage("10px-kreis-$onl"); my $ip = ReadingsVal($name,'IPAddress','none'); my $pct = int((109 - ReadingsNum($name,'pct',0))/10)*10; my $open = ReadingsVal($name,'state',''); my $lvicon = $open eq 'opening' ? 'fts_shutter_up@red' : $open eq 'closing' ? 'fts_shutter_down@red' : "fts_shutter_$pct"; $lvicon = FW_makeImage($lvicon); my $lvcmd = ($open eq 'opening' || $open eq 'closing') ? 'stop' : $pct > 50 ? 'close' : 'open'; my $slt = ReadingsNum($name,'tiltSlat',90); my $slticon = 'fts_blade_arc_close_'; $slticon .= $slt > 0 ? '00' : $slt > -45 ? '50' : '100'; $slticon = FW_makeImage($slticon); my $sltcmd = $slt > 0 ? 'closeSlat' : $slt > -45 ? 'openSlat' : 'halfSlat'; qq(<a href="http://$ip" target="_blank">$onl</a> <div><a href="/fhem?cmd.dummy=set $name $lvcmd&XHR=1">$lvicon</a></div> <div><a href="/fhem?cmd.dummy=set $name $sltcmd&XHR=1">$slticon $slt</a>) }
attr DEVICE cmdIcon open:fts_shutter_up close:fts_shutter_down stop:fts_shutter_manual half:fts_shutter_50 attr DEVICE cmdIcon open:fts_shutter_up close:fts_shutter_down stop:fts_shutter_manual half:fts_shutter_50
attr DEVICE webCmd :open:close:half:stop:openSlat:closeSlat:halfSlat:tiltSlat attr DEVICE webCmd pct:tiltSlat
#attr DEVICE eventMap open:opens close:closes #attr DEVICE eventMap open:opens close:closes
deleteattr DEVICE eventMap deleteattr DEVICE eventMap
attr DEVICE jsonMap POWER1:0 POWER2:0 Shutter1_Tilt:tiltSlat Shutter1_Target:pct ANALOG_Temperature:temperature attr DEVICE jsonMap POWER1:0 POWER2:0 Shutter1_Tilt:tiltSlat Shutter1_Target:pct ANALOG_Temperature:temperature
@ -1629,13 +1629,14 @@ attr DEVICE userReadings state:pct:.* {ReadingsNum($name,'pct',0)}
attr DEVICE stateFormat LWT level: state slat: tiltSlat attr DEVICE stateFormat LWT level: state slat: tiltSlat
deletereading -q DEVICE (?!associatedWith|IODev).* deletereading -q DEVICE (?!associatedWith|IODev).*
attr DEVICE setStateList open close half stop pct openSlat closeSlat halfSlat attr DEVICE setStateList open close half stop pct openSlat closeSlat halfSlat
attr DEVICE widgetOverride pct:knob,min:-90,max:90,angleArc:180,width:40,height:40,fgColor:#CCCCCC,bgColor:#FF9900,step:5,lineCap:round,rotation:anticlockwise,displayPrevious:1
attr DEVICE comment After applying the template set "ShutterOpenDuration1", "ShutterCloseDuration1" and "shuttertiltconfig1" first.\ attr DEVICE comment After applying the template set "ShutterOpenDuration1", "ShutterCloseDuration1" and "shuttertiltconfig1" first.\
Use the "set x_configuration" Option. Example: "set x_configuration ShutterOpenDuration1 35".\ Use the "set x_configuration" Option. Example: "set x_configuration ShutterOpenDuration1 35".\
This is for a tilt range from -90 to 90 degrees, if you have different tilt options, adopt range manually\ This is for a tilt range from -90 to 90 degrees, if you have different tilt options, adopt range manually\
For calibration, tilt range settings, use of more than one shutter device and further information on the available commands see <a href="https://tasmota.github.io/docs/Blinds-and-Shutters/</a>. For calibration, tilt range settings, use of more than one shutter device and further information on the available commands see <a href="https://tasmota.github.io/docs/Blinds-and-Shutters/</a>.
farewell:template has been applied successfully. Now it's recommended to set shutter's open and close duration and shuttertiltconfig1, see short instruction in comment attribute or the <br><a href="https://tasmota.github.io/docs/Blinds-and-Shutters/">Tasmota wiki</a>. farewell:template has been applied successfully. Now it's recommended to set shutter's open and close duration and shuttertiltconfig1, see short instruction in comment attribute or the <br><a href="https://tasmota.github.io/docs/Blinds-and-Shutters/">Tasmota wiki</a>.
attr DEVICE model tasmota_2ch_shutter_venetian_invert_0 attr DEVICE model tasmota_2ch_shutter_venetian_invert_0
setreading DEVICE attrTemplateVersion 20220127 setreading DEVICE attrTemplateVersion 20220201
option:{ CALLSPEECHRECOGN } option:{ CALLSPEECHRECOGN }
set DEVICE attrTemplate speechcontrol_type_blind set DEVICE attrTemplate speechcontrol_type_blind

View File

@ -477,7 +477,7 @@ FHEM/97_PiXtendV2 PiXtend Sonstige Systeme https://forum
FHEM/97_TrashCal.pm Tobias Unterstützende Dienste FHEM/97_TrashCal.pm Tobias Unterstützende Dienste
FHEM/98_alarmclock.pm FlorianZ Unterstützende Dienste FHEM/98_alarmclock.pm FlorianZ Unterstützende Dienste
FHEM/98_apptime.pm martinp876 Sonstiges FHEM/98_apptime.pm martinp876 Sonstiges
FHEM/98_archetype.pm rudolfkoenig/orphan Automatisierung FHEM/98_archetype.pm orphan/Beta-User Automatisierung https://forum.fhem.de/index.php/topic,125930.0.html
FHEM/98_ArduCounter.pm StefanStrobel Sonstiges FHEM/98_ArduCounter.pm StefanStrobel Sonstiges
FHEM/98_autocreate.pm rudolfkoenig Automatisierung FHEM/98_autocreate.pm rudolfkoenig Automatisierung
FHEM/98_average.pm rudolfkoenig Automatisierung FHEM/98_average.pm rudolfkoenig Automatisierung