Two way switching

Hi Everyone.
Have not been on the community for a while. But started to get my System back up and running.
Now i can to a point that i am battling again.

So the problem is this. I have a sonoff t1 with a unused switch. I want to link this to my passag light at the other end of my pasage i have a sonoff that turns the light on and off.

I want to be able to use both switches to turn on and off the light. But with the capability to to turn it on ,on one side and off on the other.

I am trying to use node red. But it seems that i am doing it wrong. As soon as i get it to testing point it works half way. In sorts. It works to link the un connected one to the one that works on the light.
If i turn the light on the other switch reacts. But as soon as i subscribe to the mqtt topic to be able to turn the light off from the switch the whole thing keeps flashing

I can’t help with Node Red. But the reason it’s flashing is you’ve an infinite loop. One switch changes which causes a command to the other switch which changes causing a command to the first switch which changes and causes a command back and so on and so on.

You need to add logic to prevent this sort of looping. That’s often handled by checking to see if the light is already ON before commanding it ON and stopping if it is. But if all you are doing is toggling then that’s not possible.

Since the second switch isn’t connected to anything, treat it like a button without state. Flipping the switch issues a command but don’t send anything back. You don’t need to keep the state of that switch in sync with the light. It will just send a command and a rule will treat that command like it’s a TOGGLE command (it doesn’t matter what the second switch’s command was). Since you don’t send anything back there’s no loop.