I would like to ask, how can I use multiple switches(It is not connected physically to each others) as a multiway switching.
I have 2 keemple switches and I wrote a small rules:
rule "Switch"
when Item switch1 changed
or Item switch2 changed
then
if (triggeringItem.state != switch1.state) {
switch1.sendCommand(triggeringItem.state.toString)
} else if (triggeringItem.state != switch2.state) {
switch2.sendCommand(triggeringItem.state.toString)
}
end
It works perfectly when I switch from paper ui.
But when I’m trying the wall switch, strange things are happening:
I turn on wall switch 1: the switch 2 will also be on
I turn off wall switch 1: the switch 2 will also be off
I turn on wall switch 2: the switch 1 will be off (!)
I turn off wall switch 2: the switch 1 remains off
I turn on wall switch 2: the switch 1 will be on
I turn off wall switch 2: the switch 1 will be off
I turn on wall switch 1: the switch 2 will also be off (!)
I turn off wall switch 1: the switch 2 remains off
turn on wall switch 1: the switch 2 will also be on
I turn off wall switch 1: the switch 2 will also be off
You have some ideas, what is difference between “physical” and “logical” switching?
Show us the events.log corresponding to your actions. Maybe your devices simply don’t “tell” openHAB when you operate them by hand.
What type of Items are these, any Dimmers involved?
Why do you say that? It seems your switch doesn’t report status changes to openHAB. If openHAB cannot know what state the switch is in, your rule won’t work properly.
Not familiar with that switch.
How do you send it commands, which binding?
09:31:24.671 [INFO ] [smarthome.event.ItemStateChangedEvent] - switch1 changed from OFF to ON
09:31:29.108 [INFO ] [smarthome.event.ItemStateChangedEvent] - switch1 changed from ON to OFF
Then I tried to switch on/off on the paper ui/control menu:
09:31:44.512 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'switch1' received command ON
09:31:44.520 [INFO ] [arthome.event.ItemStatePredictedEvent] - switch1 predicted to become ON
09:31:44.551 [INFO ] [smarthome.event.ItemStateChangedEvent] - switch1 changed from OFF to ON
09:31:51.690 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'switch1' received command OFF
09:31:51.699 [INFO ] [arthome.event.ItemStatePredictedEvent] - switch1 predicted to become OFF
09:31:51.727 [INFO ] [smarthome.event.ItemStateChangedEvent] - switch1 changed from ON to OFF
Then I tried again to switch on/off on the wall: not received any event.
If your binding and Thing/channel configuration were not a secret, someone might be able to offer some diagnostic advice.
You could set autoupdate “false” on your test switch1 Item - which would remove those predictions and allow you to see if there is any real response from the device to openHAB commands.
I try this. Same result. After that I tried Domoticz. Exactly same as openhab.
Therefore I think, the problem may be somewhere around the control unit. I used aeotec z-stick gen5.
The switches worked perfectly under zigbee.