EN/FR
SHORT

Two AIs, a Few Wago Connectors and a Two-Way Switch

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 obviously, 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 enough: 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 itself seemed to justify.

In hindsight, perhaps that should have told me something.

But on the day I decided to tackle it, I had another 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 sometimes be a slight difference between the circuit you have in your head and what you actually find behind a switch that's been sitting there for years.

The live wire I'd identified wasn't actually usable at that location.

A few checks later, 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 obviously to assume I've made a mistake.

So I check the wiring.

Then 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 AI for a second opinion?

After all, getting an independent opinion is a fairly standard way of checking information.

So I give another AI the problem 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 amount of space available inside a switch box, my brain is slowly beginning to resemble its contents.

Still, I carefully 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 operate properly anymore.

Wonderful.

2ai 1source 2answers

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 about the diagrams I'd just been given.

A module like this doesn't exactly 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 starts getting interesting.

Because 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.

And I found diagrams.

Use cases.

Examples.

Some of them, incidentally, looked remarkably similar to what the AIs had suggested.

But the more I looked at the documentation, the less I felt it was answering 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.

A lot of people were 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 continue 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 it to do.

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.

Except I don't think that's a particularly interesting answer.

Yes, an AI can be wrong.

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 particularly obvious.

The behaviour of S1 and S2 isn't necessarily identical across different modules and configurations.

Forums mix models, switch types, operating modes, wiring variants and terminology.

We can probably throw a few outright mistakes into the mix as well.

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 where my second attempt becomes 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 therefore isn't necessarily the equivalent of two electricians independently examining the same installation.

And multiplying the answers doesn't guarantee that one of them will be correct.

Sometimes you're simply multiplying the different ways of consolidating the same confusion.

Decidedly, this whole two-way business was living up to its name.

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 doing exactly that.

But that doesn't mean we can stop using another 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 can bring me knowledge, ideas and a capacity for synthesis that I simply couldn't reproduce on my own.

But I can also 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 necessarily a flaw in the system.

It may simply 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.

Comments

No comments yet.

Add a comment

Your email address will not be published.

Comments are moderated before publication.