Sonoff: Passing an Inspection

I’m thinking about getting into sonoff in-line switches to control my lights (don’t like their wall plates). However, I’m a little concerned about their electrical safety…

Given that they’d be installed behind the back-box of the switch can anyone suggest an approach to installing them that would pass an electrical inspection (UK preferably but general good practice would be fine too)?


1 Like

Hi :slight_smile:

I’m from france and behind all my switches i’ve got a little box (called “boite d’encastrement” so i guess it’s a
Recessed box) wich is the “normal” way to wire it.
To use them with sonoffs, the right way is to use specials boxes like this one:

The only thing thats differs is the rubber thing under it. Completely safe for mains voltage and ok for our regulations.
You can still use your switch like always and keep your wall plate (Drzzs made a video on this topic on youtube).
I personnaly use one of these for a cover with a Sonoff dual (barely enters the box but it’s ok).

I’m pretty tired so i think my english is not at it’s best, hope you still understand me !

Thanks for coming back on this. So is that a french equivalent of a UK back-box? Or does it sit behind the back box with the sonoff sitting in the rubber section like a small glove?

BTW, you’re english is pretty good so don’t worry about that :slight_smile:


@Noza, I’ve found this. Would you say this is suitable?

It doesn’t look like the sonoff will fit in that. The internal dimensions look like it’s 63x36x21 mm while the sonoff is 88x38x23 mm.

Yes, I noticed after I posted. There are larger equivalents though :slight_smile:

Am I right in thinking that a sonoff dual is required for 2 gang switches?


So i don’t think we have the same boxes but they are working the same.

Here’s how it’s working with a “normal one”, the only difference with mine is the rubber thing where you can put the sonoff (or fibaro or whatever you choose).

If you want i can take some pictures of my installation. For an uk equialent one, as long as the box is isolated from the rest it’s ok. I’m sure there is some equivalent out there.

And yes for a two gang switch you will need to differents output so a sonoff dual is the way to go. The only thing is that they are a bit harder to put in programing mode as the main button is not connected to Gpio0.

Yes, some pics of your installation would be great! :blush:

Haha not sure my install would pass inspection, but I didn’t have the benefit of stud/plasterboard wall…

So here’s my cover switch :slight_smile:
There is some red dots on the 2nd picture to show you where is the “rubber thing” in the wall

Hope this helps !

That’s a cool box! I wish someone would make a 1 or 2 gang box for the US like that.

Perhaps something like this can do the job?

Little different there, I can make a Sonoff easily fit in a 2 gang box with 2 switches, it’s those single ones that are tough. I could always pull the box and throw in a 2 gang and put an empty over the extra side but then that just looks weird. That then just negates the whole cost savings and I could just get Zwave or other flashable Wifi switch in a 1 gang form factor.

Ah ok :slight_smile:
You should start a new company and build / sold us equivalent boxes then !

@Noza I see, that very nice. I was thinking of doing something a little different. I was thinking but house the sonoff in a sealed unit, effectively hanging out of the back/bottom of the switch housing. How I’d handle the wires running to the switch isn’t clear yet though.

To do something like that I’d either need to “extend” a uk back-box in some way or make my single-gang boxes dual gang and patch over the front of the unused part of it with plasterboard.

Another question that comes to my mind though, is whether these devices are certified for permanent installation, as home infrastructure, in Europe/UK?


Ok i understand, pretty similar to my installation still. For the wiring go here (you’ll need to have tasmota on your sonoff):

Yes it’s an easier way as was saying @digiblur

For the sonoff itself yes they are CE certified (Sonoff certification), it’s the way you use it that matters. You have many options, the best would be to use din mounts (either use Sonoff 4CH Pro or Din rail mounts). You have also some cool waterproof cases wich are ip66 certified.
To be absolutely sure the best thing is to ask an electrician (but they are often not very clear as they don’t like us to use cheap alternatives to their home automation products).

I use my own relay board with tasmota firmware.

As soon as you modify the Sonoff in any way, any certification is void. Using them in a manner not spelled out in their test would also invalidate the certification as well. CE certification is self certification. The manufacturer says “hey it’s good”.
Quite honestly, I would not trust these things buried in the wall. They are not well made. Internally there is no separation between the low and high voltage. I have some but only use them for sensors. I have had to resolder the input connections because they had separated before I even used them. I cringe every time I see these discussions about sticking them in the wall. People often point out that Youtube tests show these things only failing at double the current. I don’t see that as a vote of confidence. You don’t want the equivalent of a direct short behind the wall.
Please reconsider your safety and your families safety.

1 Like

You are right ce (chineese export??) is gone if you change anything. I’m not very happy about quality of the sonof basic 1channel too. Because there is no fuse for the 10A relay and no smaler fuse for the power supply. And as i remember no overvoltage protection. Connectors are not great… perhaps the others are better. Better stone wall than wooden cupboard. For sonoff it’s not needed to isolate primary and secondary because it’s in a housing. If somebody connect a sensor it has to be isolated if sonoff is not isolated (I have not checked this).