Two AIs, a Few Wago Connectors and a Two-Way Switch
There are some problems that, on paper, shouldn't really be problems at all. A few wires, two switches, a Sonoff module and a light.
What could possibly go wrong?
Quite a lot, apparently.
It Was Supposed to Be Simple
I was still taking my first steps with Home Assistant and Zigbee, and had started installing a few Sonoff modules behind some of my switches. For simple circuits, no real problem.
But of course, some of the lights in the house can be controlled from more than one location. Good old two-way switches.
I'd done some research beforehand and the conclusion seemed reassuring: yes, it was possible to integrate a Sonoff module into this kind of circuit. Perfect.
Well, almost. I'd found a few forum discussions, but the explanations had a strange tendency to become much more complicated than the electrical problem seemed to justify. In hindsight, that should perhaps have told me something.
But on the day I decided to tackle it, I had an extra weapon at my disposal: artificial intelligence.
Let's Prepare This Properly
I understood how my two-way circuit worked and had a reasonably clear idea of what was hiding behind the switches. So I described the circuit to an AI and asked it to prepare a wiring diagram for the module. The whole point was to avoid improvising once I had the switch box open.
A few explanations later, I had my diagram. So there I was, armed with screwdrivers, a few pieces of wire, some Wago connectors, my Sonoff module and the firm intention of doing everything properly.
Naturally, the first few minutes reminded me of a fairly universal rule: there can be a slight difference between the circuit you have in your head and what you actually find behind a switch that has been sitting there for years.
The live wire I'd identified wasn't usable at that location. After a few checks, I realised I was simply at the wrong end of the two-way circuit.
Fine. That one was on me.
Once I'd correctly identified the wires, I could finally follow the famous diagram.
It Works!
Well… The module starts up. Home Assistant sees it. I can turn the light on and off from Home Assistant.
Victory?
Not quite. The physical switches, meanwhile, seem to have developed their own interpretation of the concept of lighting. Depending on their position, some things work. Others, considerably less so.
In short: something is wrong.
My first reaction is to assume I've made a mistake, so I check the wiring. Then I check it again. But no: I've wired exactly what the diagram told me to wire.
Perhaps the problem isn't my wiring. Perhaps it's the diagram.
Let's Ask Someone Else
At this point, I could have started the whole problem again from scratch. But if one AI can get something wrong, why not ask another for a second opinion? After all, getting an independent opinion is a fairly standard way of checking information.
So I give the problem to another AI, without showing it the first one's answer. And I get… another diagram.
Excellent. There aren't exactly fifty wires in a two-way switch circuit, but somewhere between the existing wiring, the first diagram, the second diagram, the Wago connectors and the extraordinarily generous space inside a switch box, my brain is slowly beginning to resemble its contents.
Still, I calmly start again and apply the new wiring.
The result? Even worse. No short circuit, nothing dramatic: the module has power. But this time, the whole thing doesn't even seem to work properly anymore.
Wonderful.
Back to Square One
At that point, I did what I probably should have done a little earlier: I removed everything and restored the original circuit.
The light works. The switches work. Nobody died. We can start thinking again.
Paper, pencil. And, more importantly, forget for a few minutes the diagrams I'd just been given.
A module like this doesn't have dozens of connections. There's the power supply, the output to the light… and those famous inputs intended for the switches, S1 and S2.
The problem had to be somewhere around there.
What Do S1 and S2 Actually Do?
This is where the story gets interesting. You might naively assume that two inputs intended for connecting a switch are simply… two inputs intended for connecting a switch.
Except their behaviour depends, among other things, on the module and on how you want the physical controls to operate.
So I went back to the Sonoff documentation, where I found diagrams, use cases and examples. Some of them, incidentally, looked remarkably similar to what the AIs had suggested.
But the more I read, the less I felt the documentation answered the question I was actually asking:
What is the underlying principle behind these inputs and, in my particular case, what am I actually supposed to feed into them?
So I kept searching: forums, discussions, more diagrams. A lot of people were talking about these modules and explaining how they'd wired them. And strangely enough, something that should have been relatively simple kept generating explanations of sometimes astonishing complexity.
Until I stumbled across a fairly unassuming Australian website. A few diagrams, different modules, different situations.
And suddenly… Ah.
So That's How It Works
The diagram corresponding to my situation finally made the principle obvious.
In my installation, the existing two-way circuit could keep doing what it had always done: route the live connection according to the positions of the switches. Its output could then be used to control the appropriate input on the module.
Put like that, it almost sounds trivial.
Back to the switch box. A few wires, a few Wago connectors. I connect everything according to that logic.
Bam.
Home Assistant controls the light. One switch works. The other one works too. The two-way circuit behaves exactly as it did before, and the module does exactly what I expected of it.
Problem solved.
But, inevitably, another question had just appeared.
How Can Two AIs Get Something Like This Wrong?
The easy answer would be: because AIs talk nonsense.
I don't think that's a particularly interesting answer. Yes, an AI can be wrong, and it doesn't claim otherwise. I was wrong myself at the beginning of this story, when I went looking for my live wire at the wrong end of the circuit.
What interests me much more is understanding why it could be wrong. And in this particular case, I have a hypothesis.
The official documentation presents several scenarios without always making the underlying principle obvious. The behaviour of S1 and S2 isn't necessarily the same across modules and configurations. Forums, meanwhile, mix models, switch types, operating modes, wiring variants and terminology, probably with a few outright mistakes thrown in.
And somewhere in the middle of all this, we ask an AI to consolidate the available information and give us an answer. The result can be extremely convincing: structured, well argued, complete with a nice wiring diagram.
And wrong.
Two Independent Opinions?
This is also what makes my second attempt interesting. When the first AI gave me a solution that didn't work, I asked another one. It felt like independent verification.
But was it really? Both models may very well have built their answers from the same information ecosystem: manufacturer documentation, forums, articles, discussions and other material available online.
Two AIs giving two answers isn't the equivalent of two electricians independently examining the same installation. Multiplying the answers doesn't guarantee that one of them will be correct. Sometimes you're simply multiplying the ways of consolidating the same confusion.
So, Can You Still Trust an AI?
For me, that's the wrong question. I don't expect an AI to be infallible. I ask it to help me search, structure a problem, challenge hypotheses and find avenues I might not have considered myself. And it is remarkably good at exactly that.
But that doesn't mean we can stop using the other tool: the one between our ears. I certainly don't always use AI optimally. I simply try to make sure it helps me think rather than turning me into a glorified command executor.
And sometimes, the relationship works both ways. AI brings me knowledge, ideas and a capacity for synthesis that I couldn't reproduce on my own. In return, I can bring it an observation that doesn't fit its model, a piece of information it hadn't considered, or simply tell it:
"No. That can't work like that. Let's start again."
That's not a flaw in the system. It may well be a pretty good way of using it.
And What About the Wago Connectors?
They're doing fine. Thanks for asking.
And now that I finally understand how this wiring actually works, there's obviously only one thing left to do: document it properly. Because somewhere, sooner or later, someone else will probably be standing in front of an open switch box, Sonoff module in hand, wondering:
"What the hell am I actually supposed to connect to S1 and S2?"
And that will probably be the subject of another Short.
Since then, I've documented the wiring in detail: Smartening Up Your Light Switches with SONOFF Modules
Updates 2026-10-05: Text revised and article on wiring SONOFF modules added.

Comments
No comments yet.
Add a comment