Rollershutter should not move when windows are open or tilted


I am currently using openHAB 2. I have tried it with following rule:

rule "iKonferenz_Somfy_Rollladen_Steuerung WindowsClosed Controll"
	Item iKonferenz_Somfy_Rollladen_Steuerung changed from 0 to 100
	if((iKonferenz_Homematic_Fenster1_Position.state == "OPEN") ||
		(iKonferenz_Homematic_Fenster2_Position.state == "OPEN") ||
		(iKonferenz_Homematic_Fenster3_Position.state == "OPEN") ||
		(iKonferenz_Homematic_Fenster1_Position.state == "TILTED") ||
		(iKonferenz_Homematic_Fenster2_Position.state == "TILTED") ||
		(iKonferenz_Homematic_Fenster3_Position.state == "TILTED")) {

So my problem is following: If I want to controll the roller shutter it only should lower the roller shuter when all windows are closed. If windows are tilted or open the ruller shutter will crash.

The rule above will work like following: I press down. In some cases the roller shutter will move down and then it will stop and move upwards. In a good case it will stop before crashing into the window. I a worst case it will stop to late. In a very good case it will never move because of the opened or tilted windows.

But I don’t need to check if the shutter is allowed to move and stop when a window is open or tilted. Because first move and then stop is wrong. Actually, I would have to do it the other way around. As soon as a window is tilted or open, it must never move. I should also press the button a million times, the roller must not move.

Simply, the rule is too slow!

So I am searching for a solution which will disable the “down” behavior.

I hope you can understand the difference and you could help me. Thanks in advance!

There is a quite simple solution, called proxy item.
You need to define one or more items of type rollershutter which should be shown in your UI.
Then you should exchange the item in your when clause to the proxy item and send commands to the real item.
So your rule could look something like this :

rule "iKonferenz_Somfy_Rollladen_Steuerung WindowsClosed Controll"
	Item iKonferenz_Somfy_Rollladen_Proxy changed from 0 or
	Item iKonferenz_Somfy_Rollladen_Proxy received command DOWN
	if((iKonferenz_Homematic_Fenster1_Position.state == "CLOSED") ||
		(iKonferenz_Homematic_Fenster2_Position.state == "CLOSED") ||
		(iKonferenz_Homematic_Fenster3_Position.state == "CLOSED") {