I’m using a Sonoff R4 Mini in my bathroom (displayed as a relay). I want my fan (displayed as a motor) to be controlled by the Sonoff relay. The Sonoff relay should be activated both by wifi or by an external switch. For this, I’m using the following layout:
I have no idea why this is happening. How can I find out the cause? I want the light bulb and S2 to be activated at the same time when I press the external switch.
A “fast thought” about this:
If your “model circuit” is really representing the internal of the MINIR4 (S2 connection) then the light is in parallel to the “solenoid in series to a 4.7kOhm” resistor. If you are using a “normal” light bulb, it has an internal resistance of about 60 Ohm, so the 4.7kOhm of the other branch makes it work almost as an open circuit. If you are using LED lamp, it could even be “stranger”, I am not sure if the modern LED lamps are all wired to use the AC current in both directions or still work as diodes…
My actual guess is that there is a lot more than that solenoid and resistor… remember that the relay also toggles when S2 is connected to S1 through a switch, no “Lin” there… so there is some electronics in there. So I guess the (relatively) low resistance of the lamp just messes with the detection in S2. Either you put the lamp in parallel with the motor (and both work together) or you use a different R4Mini for the Lamp (and build a Scene so that one of them follows the other)