Connect Sonoff Mini R4 to an alarm output

In our house we have a traditional gas alarm that is not smart. The controller keeps open a normally closed AC valve and, if it smells gas, it emits an alarm and it interrupts the alimentation of the valve.

I would like to make it smart through a Mini R4 so that I can monitor everything with iHost, node red and home assistant. I have found out that my controller has also an AC output to add an external siren. I would like to monitor this output with a Mini R4. How should I wire the Mini R4 to the controller?

You should wire the output of your controller to the S1/S2 on your MiniR4.

If your controller then triggers, it should change the state of your MiniR4.

Just this two wires to Mini R4?

The Mini R4 also needs permanent power on N and ‘L In’

If you want, you can also connect something on ‘L Out’ and N, which will then get switched on when the controller triggers (lights, siren, etc).

This setup uses your controller as an external trigger to change the state of the Mini R4, which you can then use to trigger a scene in the Ewelink app, Node Red, Home Assistant.

Something like this? Is it correct to connect S2? As far as I understand it is the return line that is monitored by R4…

If I am not mistaken, S1/S2 simply detects if the circuit is open or closed.

Does your controller only have a single ‘L Out’ for the alarm? Or also a ‘N’ to go with it?

If yes, then you should connect both ‘L Out’ and ‘N’ to S1/S2 respectively (I don’t think it matters which one you connect to which).

It has only L(out) for the alarm. The controller’s scheme tells to connect the other pole of the siren to the general N wire. Since R4’s S1 is short-circuited to L(in) I think that S2 should act as N as in the scheme:

Yes, then I would try the common N also connected to your controller.

I don’t think it matters which one you connect to S1 or S2 as it only checks whether the circuit is open or closed.

Just for the ones that will read this thread in the future for their own use… The S1 contact is nothing other than the replica of the L(in) phase with which it is bridged. In my opinion this can generate a bit of confusion in the wiring because it almost seems like a switch input as S2 actually is. It would have been more correct, in my opinion, to simply call him L. Therefore the terminal that accepts an input switch or button is terminal S2.