Guten Abend allerseits.
Vielleicht kann mir jemand kurz erklären, warum mein folgendes Vorhaben nicht richtig gelingt:
Ich habe mehrere Items in meiner openHAB 1.7 Konfiguration. Über die ClassicUI und der Apfel-App kann ich alle Items wunderbar schalten. Nun wollte ich einen sogenannten "Gute Nacht"-Button etablieren. Will heissen, auf einen Tastendruck gehen die Lichter aus, der Fernseher, Stereo und die Rollos fahren runter. So weit, so gut, aber meine Rule will nicht so richtig. Hier mal die entsprechenden Einträge:
.items (auf mehrere Dateien verteilt, aber hier zusammen gefasst)
Wie gesagt, über die UI kann ich piLight (Billigsteckdosen) ein- und ausschalten, aber jetzt mein Problem:
.rules
Die Rule läuft, alles geht aus, aber der postUpdate() setzt lediglich den Switch in der UI (und im Log), aber die angehängte Aktion, also die Binding-Aktion, wird nicht ausgeführt. Was mache ich da falsch? Wie kann ich piLight veranlassen, meine Steckdose auszuschalten?
Viele Grüße
-Prom
Vielleicht kann mir jemand kurz erklären, warum mein folgendes Vorhaben nicht richtig gelingt:
Ich habe mehrere Items in meiner openHAB 1.7 Konfiguration. Über die ClassicUI und der Apfel-App kann ich alle Items wunderbar schalten. Nun wollte ich einen sogenannten "Gute Nacht"-Button etablieren. Will heissen, auf einen Tastendruck gehen die Lichter aus, der Fernseher, Stereo und die Rollos fahren runter. So weit, so gut, aber meine Rule will nicht so richtig. Hier mal die entsprechenden Einträge:
.items (auf mehrere Dateien verteilt, aber hier zusammen gefasst)
Code:
[FONT=Monaco][SIZE=11px][SIZE=10px][FONT=courier new]Switch btnGoodNight {autoupdate="false"}[/FONT][/SIZE][/SIZE][/FONT] [FONT=Monaco][SIZE=11px][SIZE=10px][FONT=courier new]Switch pliPlugA {pilight="[U]kaku[/U]#elrostecker1"}[/FONT][/SIZE][/SIZE][/FONT] [FONT=Monaco][SIZE=11px][SIZE=10px][FONT=courier new]Switch pliPlugB {pilight="[U]kaku[/U]#elrostecker2"}[/FONT][/SIZE][/SIZE][/FONT] [FONT=Monaco][SIZE=11px][SIZE=10px][FONT=courier new]Switch pliPlugC {pilight="[U]kaku[/U]#elrostecker3"}[/FONT][/SIZE][/SIZE][/FONT] [FONT=Monaco][SIZE=11px][SIZE=12px][FONT=arial][SIZE=10px][FONT=courier new]Switch pliPlugD {pilight="[U]kaku[/U]#elrostecker4"} ...[/FONT][/SIZE][/FONT][/SIZE][/SIZE][/FONT]
.rules
Code:
[COLOR=#3933FF][FONT=Monaco][SIZE=11px][COLOR=#000000][SIZE=10px][FONT=courier new]rule "[U]Gute[/U] [U]Nacht[/U] Taste"[/FONT][/SIZE][/COLOR][/SIZE][/FONT][/COLOR] [COLOR=#931A68][FONT=Monaco][SIZE=11px][COLOR=#000000][SIZE=10px][FONT=courier new]when[/FONT][/SIZE][/COLOR][/SIZE][/FONT][/COLOR] [COLOR=#931A68][FONT=Monaco][SIZE=11px][COLOR=#000000][SIZE=10px][FONT=courier new] Item btnGoodNight received command[/FONT][/SIZE][/COLOR][/SIZE][/FONT][/COLOR] [COLOR=#931A68][FONT=Monaco][SIZE=11px][COLOR=#000000][SIZE=10px][FONT=courier new]then[/FONT][/SIZE][/COLOR][/SIZE][/FONT][/COLOR] [COLOR=#4E9072][FONT=Monaco][SIZE=11px][COLOR=#000000][SIZE=10px][FONT=courier new] // force switch to "jump" back to get a button behavior[/FONT][/SIZE][/COLOR][/SIZE][/FONT][/COLOR] [FONT=Monaco][SIZE=11px][COLOR=#000000][SIZE=10px][FONT=courier new] postUpdate (btnGoodNight, OFF)[/FONT][/SIZE][/COLOR][/SIZE][/FONT] [COLOR=#4E9072][FONT=Monaco][SIZE=11px][COLOR=#000000][SIZE=10px][FONT=courier new] // send off-commands to Z-Wave server to switch off the lights[/FONT][/SIZE][/COLOR][/SIZE][/FONT][/COLOR] [FONT=Monaco][SIZE=11px][COLOR=#000000][SIZE=10px][FONT=courier new] sendHttpGetRequest (ZwaveUrl + ZwaveDev02 + cmdSetPlugOff)[/FONT][/SIZE][/COLOR][/SIZE][/FONT] [FONT=Monaco][SIZE=11px][COLOR=#000000][SIZE=10px][FONT=courier new] sendHttpGetRequest (ZwaveUrl + ZwaveDev05 + cmdSetPlugOff)[/FONT][/SIZE][/COLOR][/SIZE][/FONT] [COLOR=#4E9072][FONT=Monaco][SIZE=11px][COLOR=#000000][SIZE=10px][FONT=courier new] // send key-command to [U]Philips[/U] TV to switch off the TV[/FONT][/SIZE][/COLOR][/SIZE][/FONT][/COLOR] [COLOR=#3933FF][FONT=Monaco][SIZE=11px][COLOR=#000000][SIZE=10px][FONT=courier new] executeCommandLine("/etc/[U]openhab[/U]/configurations/scripts/tvKeyOff.sh")[/FONT][/SIZE][/COLOR][/SIZE][/FONT][/COLOR] [COLOR=#4E9072][FONT=Monaco][SIZE=11px][COLOR=#000000][SIZE=10px][FONT=courier new] // switch 433MHz radio button off[/FONT][/SIZE][/COLOR][/SIZE][/FONT][/COLOR] [FONT=Monaco][SIZE=11px][COLOR=#FF0000][SIZE=10px][FONT=courier new] postUpdate (pliPlugB, OFF)[/FONT][/SIZE][/COLOR][/SIZE][/FONT] [COLOR=#4E9072][FONT=Monaco][SIZE=11px][COLOR=#000000][SIZE=10px][FONT=courier new] // send 5 commands to Z-Wave server to close the shutters[/FONT][/SIZE][/COLOR][/SIZE][/FONT][/COLOR] [FONT=Monaco][SIZE=11px][COLOR=#000000][SIZE=10px][FONT=courier new] sendHttpGetRequest (ZwaveUrl + ZwaveDev10 + cmdShutterDown + "15") ...[/FONT][/SIZE][/COLOR][/SIZE][/FONT]
Viele Grüße
-Prom
Kommentar