Let me understand- between location A and B you have ground, neutral and two travelers (the two wires between the switches)? Nothing else?
Also that brown cable that returns from the Box B to the box A and from there goes into the light A
You are correct that interrupting the line will also disable the switches. (Well, it worked, Once).
Here is a way that you can get what you want. Just put a Sonoff in each location. Use one of the three-way traveler wires (probably brown) to provide a line wire at location B. Use an automation to control the ‘other’ light. The automation logic would be, “If either switch state changes from off to on, turn on both.” And conversely, if either switch state changes from on to off, turn both off.
By the way, I think you would want the Sonoff’s in pushbutton mode.
Hmmm. I just spotted a minor flaw in my logic. If you turn both off at switch A, but switch B is closed, then you would have to flip the switch off then on so that the automation would see an “off” to “on” change.
Why not wire the light with line and neutral and use smart bulbs? Of course then you would need smart switches at each switch location then an automation to make the lights follow each other. Or put the Sonoff switches in the light fixtures (and use dumb lights) and control them from smart switches in the wall? I do something like the latter option myself. I have two table lamps in our bedroom each controlled from a Sonoff Basic switch. On the wall I have a dumb switch connected to a third Sonoff Basic. The only purpose of the Sonoff in the wall is to trigger an automaton in Home Assistant. Either lamp can be controlled separately by pressing the button on its Sonoff Basic or from Home Assistant (or Alexa), but both are controlled by an automation that is watching the state of the wall switch.
A friend of mine just had zbimi L2 installed without any new wiring.
Apparently he replaced the existing switch with momentary type and rewired like this (using your diagram as reference).
And don’t forget to press zb mini button 3 times which to switch to mode that toggles the S2.
So yeah, looks like it’s doable with the existing cables
This looks nice. Sadly one of the boss requirements (that is my wife), is that the switches should still be the ones we currently have.
The same goes for your alternatives @stevemann, also I myself want to be sure that the lights keep working even when my home assistant instance crashes.
My drawing with a Mini behind each switch would keep your current switches. Each switch would control its light even if Home Assistant is not running. All that Home Assistant would do is to make the lights mirror each other.