diff --git a/FHEM/98_structure.pm b/FHEM/98_structure.pm
index 53b9abcec..4ec027fa8 100755
--- a/FHEM/98_structure.pm
+++ b/FHEM/98_structure.pm
@@ -429,14 +429,15 @@ structure_Attr($@)
Attribute clientstate_behavior
absolute
- The structure status will changed to the common device status of all defined devices
+ The structure status will changed to the common device status of all defined devices
to this structure if all devices are identical. Otherwise the structure status is "undefined".
relative
You have to set the attribute "clientstate_priority" with all states of
the defined devices to this structure in descending order. Each group are
- delemited by space. Each entry of one group are delimited by "pipe"
+ delemited by space. Each entry of one group are delimited by "pipe".
+ The status represented by the structure is the first entry of each group
Example:
@@ -444,20 +445,26 @@ structure_Attr($@)
- attr kittchen clientstate_priority An|On|on Aus|Off|off
- attr house clientstate_priority Any_On|An All_Off|Aus
+ In this example the status of kittchen is either on or off.
+ The status of house is either Any_on or All_off.
- To group more devices from different types of devices you can define
- a clientstate redefining on each device. For example the Reading "A" of device door
- is "open" or "closed" and the state of device lamp1 should redefine from
- "on" to "An" and "off" to "Aus"
-
Example:
+ To group more devices from different types of devices you can define
+ a clientstate redefining on each device with the attribute <struct_type>_map.
+ For example the reading "A" of device door is "open" or "closed"
+ and the state of device lamp1 should redefine from "on" to "An" and "off" to "Aus".
+ A special case are devices with more than 1 input port (eg. OWSWITCH). The last
+ example shows the attribute only with a value of "A". The propagated value of the device
+ are depending only of port A with an unmodified state.
+
Example:
- define door OWSWITCH <ROMID>
- define lamp1 dummy
- attr lamp1 cmdlist on off
- define kitchen structure struct_kitchen lamp1 door
- attr kittchen clientstate_priority An|on OK|Aus|off
- - attr lamp1 struct_kitchen on:An off:Aus
- - attr door struct_kitchen A:open:on A:closed:off
+ - attr lamp1 struct_kitchen_map on:An off:Aus
+ - attr door struct_kitchen_map A:open:on A:closed:off
+ - attr door2 struct_kitchen_map A
@@ -465,7 +472,7 @@ structure_Attr($@)
Set
Every set command is propagated to the attached devices. Exception: if an
- attached devices has an attribute structexcluse, and the attribute value
+ attached devices has an attribute structexclude, and the attribute value
matches (as a regexp) the name of the current structure.
@@ -486,4 +493,135 @@ structure_Attr($@)
=end html
+=begin html_DE
+
+
+structure
+
+
+
+ Define
+
+ define <name> structure <struct_type> <dev1> <dev2> ...
+
+ Mit dem Device "Structure" werden Strukturen/Zusammenstellungen von anderen
+ Devices erstellt um sie zu Gruppen zusammenzufassen. (Beispiel: im Haus alles ausschalten)
+
+ Die Liste der Devices die einer Struktur zugeordnet sind kann duch das Kommando
+ addstruct / delstruct im laufenden Betrieb verändert werden. Es können
+ sowohl einzelne Devices als auch Gruppen von Devices (TYPE=FS20) zugefügt werden.
+ Jedes zugefügt Device erhält zwei neue Attribute <struct_type>=<name>
+ sowie <struct_type>_map wenn es zu einer Struktur zugefügt wurde. Diese
+ Attribute werden wieder automatisch entfernt, sobald das Device von der Struktur
+ entfernt wird.
+ Eine Struktur kann ebenfalls zu einer anderen Struktur zugefügt werden. Somit
+ können z b. kaskadierende Strukturen erstellt werden. (Z.b. KG,EG,OG, Haus)
+
+ Beispiel:
+
+ - define Kueche structure room lampe1 lampe2
+ - addstruct Kueche TYPE=FS20
+ - delstruct Kueche lampe1
+ - define house structure building kitchen living
+ - set house off
+
+
+
+ Der Status einer Struktur hängt von den Stati der zugefügten Devices ab.
+ Dabei wird das propagieren der Stati der Devices in zwei Gruppen klassifiziert
+ und mittels folgendem Attribut definiert:
+
+
Attribut clientstate_behavior
+ - absolute
+
+ Die Struktur wird erst dann den Status der zugefügten Devices annehmen,
+ wenn alle Devices einen identischen Status vorweisen. Bei unterschiedlichen
+ Devictypen kann dies per Attribut <struct_type>_map pro Device
+ beinflusst werden. Andernfalls hat die Struktur den Status "undefined".
+
+ - relative
+
+ Wird die Struktur auf ein relatives Verhalten eingestellt, so wird die
+ Priorität der Devicestati über das Attribut clientstate_priority
+ beinflusst. Die Prioritäten sind in absteigender Reihenfolge anzugeben.
+ Dabei können Gruppen mit identischer Priorität angegeben werden, um zb.
+ unterschiedliche Devicetypen zusammenfassen zu können. Jede Gruppe wird durch
+ Leerzeichen, jeder Eintrag pro Gruppe durch Pipe getrennt. Der Status der
+ Struktur ist der erste Eintrag in der entsprechenden Gruppe.
+
+
Beispiel:
+
+ - attr kueche clientstate_behavior relative
+ - attr kueche clientstate_priority An|On|on Aus|Off|off
+ - attr haus clientstate_priority Any_On|An All_Off|Aus
+
+ In diesem Beipiel nimmt die Struktur kuecheentweder den Status
+ An oder Aus an. Die Struktur haus nimmt
+ entweder den Status Any_on oder All_off an. Sobald ein
+ Device der Struktur haus den Status An hat nimmt die
+ Struktur den Status Any_On an. Um dagegen den Status
+ All_off anzunehmen, müssen alle Devices dieser Struktur auf
+ off stehen.
+
+ Um mehrere Devices unterschiedlicher Typen gruppieren zu können ist ein
+ Status-Mapping auf jedem einzelnen Device mittels Attribut <struct_type>_map
+ möglich.
+ Im folgenden Beispiel nimmt das Reading "A" den Status "offen" oder "geschlossen"
+ an, und des Reading "state" von "lampe1" den Status "on" oder "off".
+ Die Struktur "kueche" reagiert nun auf "An" bzw "on" (Prio 1) bzw.
+ auf "OK", "Aus", "off". Der Status den diese Struktur schlussendlich annehmen kann
+ ist entweder "An" oder "OK".
+ Der Status des Devices lampe1 wird umdefiniert von "on" nach "An" bzw "off" nach "Aus".
+ Das Device "tuer", welches vom Type "OWSWITCH" ist, bringt ausschließlich
+ das Reading A in die Struktur ein welches von "open" nach "on" sowie "clesed"
+ nach "Aus" umdefiniert wird.
+ Die Struktur kueche wird folglich nur dann "An" ausgeben,
+ wenn a) das Device lampe1 den Status "on" und(!) b) das Device tuer den Status
+ open im Reading A aufweist. Die Struktur wird sofort auf den Status "OK" wechseln,
+ sobald eines der beiden Devices den Status wechselt.
+ Ist im Attribut <struct_type>_map nur das Reading angegeben, so wird dessen
+ Status unmodifiziert an die Struktur weitergegeben.
+ Ist das Attribut <struct_type>_map nicht definiert, so wird das
+ Reading state an die Struktur weitergegeben.
+
Beispiel:
+
+ - define tuer OWSWITCH <ROMID>
+ - define lampe1 dummy
+ - attr lampe1 cmdlist on off
+ - define kueche structure struct_kitchen lamp1 door
+ - attr kueche clientstate_priority An|on OK|Aus|off
+ - attr lampe1 struct_kitchen_map on:An off:Aus
+ - attr tuer struct_kitchen_map A:open:on A:closed:off
+ - attr tuer2 struct_kitchen_map A
+
+
+
+
+ Set
+
+ Jedes set Kommando wird an alle Devices dieser Struktur weitergegeben.
+ Aussnahme: das Attribut structexclude ist in einem Device definiert und
+ dessen Attributwert matched als Regexp zum Namen der aktuellen Struktur.
+
+
+
+ Get
+
+ Get wird im Structur-Device nicht unterstützt.
+
+
+
+ Attributes
+
+ - structexclude
+ Bei gesetztem Attribut wird das set-Kommando ignoriert, siehe set-Befehl.
+ Dies trifft ebenfalls auf die Weitergabe des Devicestatus an die
+ Struktur zu.
+
+
+
+
+
+
+=end html_DE
=cut