Emulating a two way light switch with rules

I have two way switches controlling the lights in the corridor and I want to replace them with z-wave wall switches. The problem I see is that there are nobody is selling two way switches and all the diagrams I saw are dealing with z-wave modules wired to the mechanical switches.

I think I can emulate two way switch by wiring the light to one of the z-wave wall switches and using the other just as a “dummy” that will just send or receive status updates from the first. The question is how to do it? Should I use associations or rules? I think that rules would be better but perhaps I’m mistaken? And if using rules, can I also use a group:switch?

Yes you need to use rules:

You need to do something like this:

rule "Two way Switch"
    Switch1 changed or
    Switch2 changed
    if (Light.state == ON) {
    } else if (Light.state == OFF) {
1 Like

Thank you. I’ll try it this weekend. Right now I have to dig into the wall to find which of the wires is the Live and which are just the Com lines going to the other switch.

Be careful with that!!
You want to stay alive to play with OH!!

1 Like

I am trying to grasp what your problem is as my technical English is not that good. I understand that you have 2 switches that both operate the light in the corridor.
I have had the same setup a couple of times and I found 2 solutions:

  1. Use one switch to switch the light and slave the other switch to this switch within the zwave protocol. Do this through the Habmin interface.

  2. In an other case I used only one Fibaro zwave switch with a momentary switche on one side . The other side I fitted with only a momentary switch which wires I doubled on the Fibaro switch.

I favor the second as it takes less money out of your pocket.

I already have the two z-wave wall switches so there is no money saving potential there. The question was which approach is the best, either trying to work through z-wave association or a rule. I was personally in favor of a rule and I like the idea of Vincent, which I’ll try after physically replacing the switches.

Remember that both solutions I provided are not OpenHab depended. That for me is always a designrule not to involve complications if not necessary