I recommend to define a new Switch item that triggers a rule. There you send the command to go to 50% (either directly - if that’s supported, or with a timer). If you are new to rules, please have a look how they work …
import java.util.concurrent.locks.ReentrantLock
val ReentrantLock _lockSchattenprogramm = new ReentrantLock()
rule SchattenprogrammON
when
Item ItemSceneSchattenprogramm changed to ON
then
println("Schattenprogramm => ON")
if (!_lockSchattenprogramm.locked) {
try {
_lockSchattenprogramm.lock
GroupRollerShutterShadowGarden.sendCommand(UP)
GroupRollerShutterShadowGarage.sendCommand(UP)
GroupRollerShutterShadowZufahrt.sendCommand(UP)
// Time to open ~20s
createTimer(now.plusSeconds(20)) [|
GroupRollerShutterShadowGarden.sendCommand(DOWN)
GroupRollerShutterShadowGarage.sendCommand(DOWN)
GroupRollerShutterShadowZufahrt.sendCommand(DOWN)
// close 50% ...
createTimer(now.plusSeconds(10)) [|
GroupRollerShutterShadowGarage.sendCommand(STOP)
GroupRollerShutterShadowZufahrt.sendCommand(STOP)
createTimer(now.plusSeconds(5)) [| GroupRollerShutterShadowGarden.sendCommand(STOP)]
]
]
} finally {
_lockSchattenprogramm.unlock
}
} else {
println("Schattenprogramm - locked!")
}
end
There you send the command to go to 50% (either directly - if that’s supported, or with a timer)
And that´s the one more question I have: is it possible to set it directly in the homematic binding or not. Who could tell me that?
Your supposed way is excellent, but I would prefer the direct way if possible…
you can just give it a try by sending the command to go to 50 directly - then you’ll see if it’s supported or you have to use the timer approach. A rule you’ll need with both approaches.