Aktionen führen beliebige Schaltvorgänge (an oder aus) von Geräten nacheinander aus. Dabei ist es möglich, zwischen den einzelnen Schaltvorgängen Pausen einzubauen. Fertige Aktionen wiederum lassen sich durch den Steuerbefehl als URL in neue Geräte einbauen, so das Geräte möglich werden, die eine Aktion als "An" und einen andere Aktion als "aus" durchführen.
Außerdem bieten Aktionen erweiterte MiLight Funktionen an.
Mein praktisches Beispiel ist mein Kodi Mediacenter. Das Gerät Mediacenter schaltet bei "An" einfach nur die Funksteckdose an. Zum ausschalten möchte ich aber, das der RaspberryPi sauber heruntergefahren wird, bevor der Strom weg ist. Also liegt auf dem "Aus" Knopf eine Aktion, die erst per SSH Gerät den Pi herunterfährt ("poweroff") und dann nach 15 sek. den Strom abschaltet.
Um das zu realisierten braucht man drei Geräte und eine Aktion:
1. Gerät 1 ist ein normales Device und schaltet einfach die Funksteckdose.
2. Gerät 2 ist ein SSH Gerät und hat auf on den "reboot" befehl, auf off "poweroff" 3. Aktion, die beide Geräte kombiniert, so das Libreelec herrunterfährt und danach der Strom ausgeht,
Code: Alles auswählen
</action>
<action buttonLabelRun="Aus">
<id>1</id>
<name>Mediacenter ausschalten</name>
<do type="device" id="2" action="off"/>
<do type="wait" id="15"/>
<do type="device" id="1" action="off"/>
</action>
Noch ein paar Beispiele für Aktionen:
Action 1 fährt einen Rolladen nur halb runter, da Intertechno Rolladenschalter beim 2. Senden des on Befehls stoppen
Code: Alles auswählen
<action buttonLabelRun="Zu">
<id>1</id>
<name>Rollo halb</name>
<do type="device" id="3" action="on"/>
<do type="wait" id="17"/>
<do type="device" id="3" action="on"/>
</action>
Code: Alles auswählen
<action buttonLabelRun="Gute N8">
<id>2</id>
<name>Zu Bett gehen</name>
<do type="device" id="6" action="on"/>
<do type="device" id="8" action="on"/>
<do type="device" id="2" action="off"/>
<do type="device" id="13" action="off"/>
<do type="wait" id="60"/>
<do type="device" id="1" action="off"/>
</action>
Code: Alles auswählen
<action buttonLabelRun="An">
<id>3</id>
<name>Musik an</name>
<do type="device" id="19" action="on"/>
<do type="wait" id="10"/>
<do type="device" id="5" action="on"/>
</action>
Code: Alles auswählen
<action buttonLabelRun="Blinken">
<id>4</id>
<name>Blinken</name>
<do type="device" id="2" action="on"/>
<do type="wait" id="1"/>
<do type="device" id="2" action="off"/>
<do type="wait" id="1"/>
<do type="device" id="2" action="on"/>
<do type="wait" id="1"/>
<do type="device" id="2" action="off"/>
<do type="wait" id="1"/>
<do type="device" id="2" action="on"/>
<do type="wait" id="1"/>
<do type="device" id="2" action="off"/>
</action>
Code: Alles auswählen
<action buttonLabelRun="Nacht">
<id>5</id>
<name>Nachtlicht SZ</name>
<do type="device" id="123" action="on" mode="Nacht"/>
</action>
Code: Alles auswählen
</config>
Code: Alles auswählen
<actions>
</actions>
Code: Alles auswählen
<actions>
<action buttonLabelRun="Zu">
<id>1</id>
<name>Rollo halb</name>
<do type="device" id="3" action="on"/>
<do type="wait" id="17"/>
<do type="device" id="3" action="on"/>
</action>
<action buttonLabelRun="Gute N8">
<id>2</id>
<name>Zu Bett gehen</name>
<do type="device" id="6" action="on"/>
<do type="device" id="8" action="on"/>
<do type="device" id="2" action="off"/>
<do type="device" id="13" action="off"/>
<do type="wait" id="60"/>
<do type="device" id="1" action="off"/>
</action>
<action buttonLabelRun="An">
<id>3</id>
<name>Musik an</name>
<do type="device" id="19" action="on"/>
<do type="wait" id="10"/>
<do type="device" id="5" action="on"/>
</action>
<action buttonLabelRun="Blinken">
<id>4</id>
<name>Blinken</name>
<do type="device" id="2" action="on"/>
<do type="wait" id="1"/>
<do type="device" id="2" action="off"/>
<do type="wait" id="1"/>
<do type="device" id="2" action="on"/>
<do type="wait" id="1"/>
<do type="device" id="2" action="off"/>
<do type="wait" id="1"/>
<do type="device" id="2" action="on"/>
<do type="wait" id="1"/>
<do type="device" id="2" action="off"/>
</action>
<action buttonLabelRun="Nacht">
<id>5</id>
<name>Nachtlicht SZ</name>
<do type="device" id="123" action="on" mode="Nacht"/>
</action>
</actions>