Absolute - sorry about this:
velux.things:
Bridge velux:klf200:home [ bridgeURL="http://10.10.10.251:80", bridgePassword="xxxxxxxx", timeoutMsecs=4000, retries=10 ] { }
velux.items:
// Group for simulating push buttons
Group:Switch:OR(ON, OFF) gVeluxbrigde "PushButton"
Group window
Group windowclose
Group windowopen
Group windowflow
Group windowhalf
Switch Bathroom_window_0 "Luk vindue" (window,windowclose,gVeluxbrigde) { channel="velux:scene:home:Bathroom___window___0:ACTION" }
Switch Bathroom_window_flow "Åben flow" (window,windowflow,gVeluxbrigde) { channel="velux:scene:home:Bathroom___window___flow:ACTION" }
Switch Bathroom_window_50 "Åben 50 %" (window,windowhalf,gVeluxbrigde) { channel="velux:scene:home:Bathroom___window___50:ACTION" }
Switch Bathroom_window_100 "Åben helt" (window,windowopen,gVeluxbrigde) { channel="velux:scene:home:Bathroom___window___100:ACTION" }
velux.rules:
rule "PushButton of group velux"
when
Item gVeluxbrigde changed
then
// waiting a second.
Thread::sleep(1000)
// Foreach-Switch-is-ON
gVeluxbrigde.allMembers.filter( s | s.state == ON).forEach[i|
// switching OFF
sendCommand(i, OFF)
]
end
sitemap:
Text label="Badeværelse" icon="toilet" {
Switch item=Bathroom_window_0 mappings=[ON="Klik"] icon="window-closed"
Switch item=Bathroom_window_flow mappings=[ON="Klik"] icon="window-closed"
Switch item=Bathroom_window_50 mappings=[ON="Klik"] icon="window-ajar"
Switch item=Bathroom_window_100 mappings=[ON="Klik"] icon="window-open"
}
Kept it short and only took the example with controlling the basic of a window.