Hi everybody,
I am really glad, this topic is growing that much and so many people are interested in it.
I was able to use the rule almost at the beginning of this topic, to use switches as a working virtual switch including feedback from a real switch, with the newest version. For all beginners, I do not want to keep it by myself:
logo.items:
// FF_Dining_Light
Switch FF_Dining_Light "Licht" <light> (FF_Dining, gLight) {channel=""}
Switch ReadOutput01 {channel="plclogo:digital:Logo1:Outputs:Q1"}
Switch invisibleSwitch01 {channel="plclogo:pulse:Logo1:VB200_2:state"}
logo.things:
Bridge plclogo:device:Logo1 [ address="192.168.1.11", family="0BA8", localTSAP="0x0100", remoteTSAP="0x0200", refresh=100 ]
{
// FF_Dining_Light
Thing pulse VB200_2 [ block="VB200.2", observe="Q1", pulse=500 ]
}
taster.rules:
rule "Switch Light through Logo_1"
when
Item ReadOutput01 changed or // light changed external
Item FF_Dining_Light received command // light changed internal
then
if(receivedCommand==ON ||receivedCommand==OFF) { // ensure there was a received command, so second item triggered rule
if (ReadOutput01.state != receivedCommand) { // only if state changed
invisibleSwitch01.sendCommand(ON) // send an ON
invisibleSwitch01.sendCommand(OFF) // send an OFF
}
}
else { // no trigger from proxy switch, so state changed externally
if (ReadOutput01.state != FF_Dining_Light.state) { // if state changed really
FF_Dining_Light.postUpdate(ReadOutput01.state) // update the state without triggering the rule
}
}
end
home.sitemap:
sitemap our_home label="Our Home" {
Frame label="Allgemein" icon="attic" {
Text label="Licht" icon="light" {
Default item=FF_Dining_Light label="Esszimmer"
}
}
}
But I also have a question, I am not that into the rules stuff of openhab, I was just able to modify this on at the top of this topic for my needs. There were already discussions about the rollershutters, what is possible and what not. For now, I am confused and not sure about it.
I have two virtual address, one for rollershutter up (VB100.0) and one for down (VB100.1). If necessary I could do a third for stop.
Is there any way today, to realize a rollershutter icon with that addresses, may also with a rule if a native way is not possible yet?
Any help is really appreciated.