Sonoff mini using in combination with motion sensor instead of light switch

Can i use a Sonoff mini using in combination with normal motion sensor instead of light switch. I would like to connect the motion sensor on S1 and S2 instead of the light switch.

I would like to be able to turn on the light by motion and sonoff. The sonoff would detect the motion sensor seeing detection. I can use this to turn on other lights around the house

Sorry, I don’t understand what exactly you want to do. Are the lights you want to control connected to home assistant? Do you have motion sensors already? If yes which ones?

I got normal lights outside my House with sonoff mini and normal switches.

I want to connect one sonoff mini to a normal motion sensor lamp. Instead of switch i want to connect the motion sensor on the the S1 and S2.

This way if motion is detected i can switch on all lights around the house as homeassistant sees the motion through the sonoff mini and then send the on command to the others sonoffs

1 Like

I’m looking for the same thing for a long time. Either with Shelly1 or sonoff mini.
The S1&S2 of the Sonoff mini are in principle ‘potential free’. So if you directly connect the motion sensor, it needs some sort of power supply to operate. I think you don’t want the motion sensor to put 240V on S1 or S2.
There is a blog post from Itead about new modes of S1&S2 where it looks like showing 3.3V supply!?

There is another post where a schema is shown with 2 motion sensors(PIR) and a sonoff mini. The motion sensor requires external power and only a ‘trigger’ wire is connected to the Sonoff mini. I’m not sure about the voltage for ‘high’/‘low’, but I suppose 3,3V. Not sure. Also the motion sensor will frequently send signals that you have to filter out. I would just use the first ‘detect’ and use Homeassist for the fur logic(time for off, etc.)

I hope on some help/advise on this, because I’m not sure.

You can add a relay to the output of the motion sensor and connect S1/2 across.

That should mean as long as the motion sensor outputs enough voltage to the coil to trigger the relay will trigger the Sonoff.

But this will be very instant.
As soon as there is no motion then it will trigger off.
Perhaps a large capacitor could delay it.

S1 = GND (on the 3.3V rail)
S2 = Data (GPIO4)
3.3V = V+ (for power on the motion sensor)

@Floriszz Please look at the schematic I posted here in the article you linked to for details of how I wired that.

That image is in very low quality and hard to read.
But I would not connect any voltage to S1/2.
I would rather use a relay and have that close or open the connection between S1/2 just like it “supposed to be wired”.

Thank you. I think this is quite a good option.
Any tips on suitable relays?
I posted a link to the same post where the schematic can be found in higher resolution.
Remember that in this setup there is no main(240V) though!
I still don’t understand the 3.3V mention on S1? Is this just in your setup @wellsy ? Or is this when using main(240V) setup as well?

The relay has to be of appropriate type. I can’t help you much more than that.
But what kind of output do you get on the motion sensor? Is it 3.3 volt, 5? 12? Whatever it is, get a relay with the same voltage.
Pardon my paint-skills (or lack of them)

But this will turn of the lights as soon as there is no motion. No delay at all.

Normally, those (outdoor) motion controlled lights motion sensor directly switches the main(240V)(without further disassembly)
I suppose you can use the relay(close)(S1toS2) signal just for turning the light(s) on and use a delay/timer/or other soft trigger from Home Assist or Itead app to turn the light(s) off again.?

This is getting quite confusing, do you or do you not have mains voltage?
What is the output on the sensor?
It’s very hard to help when you aren’t giving us the facts

Sorry for the confusion. But your initial answer with the relay is the best option I think. The motion sensor on or build in the lights outputs 240V to directly power the light. This wire can be used to power/trigger the relay, which in turn makes a close contact on the other side to connect S1 with S2.
In order to make the light(s) turning off not reliant on the close contact between S1 and S2, you could configure the Sonoff’s switch as pulse and set a timer(or other rule) to turn the lights off.

Would a simple relay like this work in case the motion sensor outputs 240V?

@Floriszz Please read…

The type of Movement sensors is listed here:

Also Disclaimer:

I am using the motion sensor to trigger a GPIO in the sonoff which then switches a ‘remote’ relay module see image of parts