Start a new topic


Hello from cold Russia.

1)Don't use the grounding wire to connect N pin on your wall switch. If you don't want to win Darwin award. 

Look at the first picture.

2)Use capasitors to connect the switch and the bulb. 

Look at the second picture.

C1 - Capacity. Metal-film capacitor for 400 volts.

It works as a "quenching capacitor" or "resistance". In order for the "part of the current" to remain on the switch and feed it, in the switched on position of the key.

C2 - Capacity. Metal-film capacitor for 400 volts. 

Works as a "bypass" resistor. Serves to ensure that energy-saving gas-discharge or LED lamps do not blink (from the current passing through them supplying the switch) in the off position of the key.

(196 KB)
(236 KB)

2 people have this question

well in my case it's like I think lazy wiring as in some places there is no neutral at all as it goes on the ceiling and in those places I have only live in the switch box and in some, there are proper live and neutral as they split to normal power sockets. there are 2 places that the box where all cables are connected are sealed in the wall and I don't have access to check. Long story short in the main junction box I have one breaker for one room. lights and power sockets are not separated. So it's total magic here that I need to handle this without ripping the walls open ;]

Just curious.  Have you removed the light from the ceiling and looked in the box?  How many conductors lead into it?

Hi, In Poland we do not have any boxes in the ceiling. When I unscrew the light I only see 2 cables coming out ou the ceiling that I connect to the light.

Interesting.  That sort of wiring sounds like the US in the 1920s before there were electrical codes.  Be safe and I hope you get it figured out.  If it is possible I would recommend you avoid the capacitors and pull yourself a neutral wire to the switch box.

I would love to not have to use the capacitors but as all walls are concrete made it's relatively save as there is nothing that can burn in there. and we do have this kind of boxes but on the wall near the ceiling but they are also covered with concrete and I would have to rip them open to get to the cables and as I did a partial renovation 2 years ago I really don't want to do it now.


Sorry for bugging you all at this thread all the time but I have an issue with sonoff minis. I've connected two next to each other and now I have a slight issue. I have to separate switches on the wall, one is for the bathroom and the other for the hallway. they both are connected by 3 cables one is L and 2 returns to the bulbs. as those are in two separate boxes on the wall like on the photo. There are two sonoff minis behind them. both are connected using one L wire but both of them needed a trick with condensators to work. And the one to the far right works perfect but the one for the bathroom causes slight issues. The sonoff itself operates without any issues but the lights in the bathroom are noticeably dimmer and one of them does not lings at all. Below is the picture of how it looks like. All of them are connected to each other and the one that does not work seems to be the first one.



Any ideas why this could happen? The same happens no matter if the C2 is there next to light or not. Sometimes it does light up for 30-40s and then goes out.

I assume all lights are connected in parallel and that you only used 1 capacitor. Did you?

Well, they are kind of parallel From the not working one it goes left and down and right and another goes from nonworking to the right. And what C do you mean? the one next to the switch or the one next to the lights?

Hi, Sorry I've meant in series as in the pic below. Or rather I think it's like this as I did not do this and just checked the cables.


As for the connections I've done in the switches it looks like this.


As C1 I've used 2x 400V225j in parallel so it should be 4,4uF as that's the only I've had at hand.

Hi Kamil I meant the one next to the lights. Could you share the values of both the capacitors and of the lights? Maybe you can try how things work with just 1 bulb, 2 bulbs, etc. ? I want to check if (or suspect that l) your total wattage vs capacitor values (might not) match. Eduard


You have enough free space between celling and false celling in your case to place sonoff mini there.

You can pull out the bulb from the false celling where wire from wall switch is comming to. And make all wiring there. In that case you will NOT have to use any capacitors.

Hi everyone 

I live in EU and I have Livolo swiches in my house.  I am wondering how to connect the livolo switch to the sonoff mini.

Livolo needs line to work and I do not know if it is possible to work them toghether

Can anyone help me ?

Thanks for your replays

Yes, that would be a much better solution!


Thanks for the advice I did not think about that. I will check the cabling and let you know how it went :)

Hi guys,

Firstly thanks so much for this very useful topic!

In my case, I really want to setup with Sonoff mini on the faux ceiling, but I can't have access to the input line to the switch (only the output line from switch to the bulbs). As guided in the attached image, both S1 and S2 is required for the switch, isn't it? So my only solution is to put the Sonoff mini next to the switch as Kamil did and use C1. Am I right?

Do you guys have another idea on how to setup on the ceiling?

Thank you!


Login or Signup to post a comment