I have a conventional rocker switch that controls the overhead light in a room. I intend to install a Sonoff Mini R2 smart relay behind it so I can use the switch in my smarthome setup.

When I open the box, this is what I see (with grounds omitted for clarity):

Illustration of the junction box described below

There are three Romex cables in the box. All of them have their neutrals bundled together. Two of the load wires share the lower terminal on the light switch, and the third is on the top terminal by itself.

My understanding is the shared lower terminal is likely allowing the lower terminal to also join the two load wires and send power further down the circuit.

The smart relay has six terminals: Two neutral-in, one line-in, one load-out, and two for the switch:

Diagram showing the Sonoff Mini R2 smart relay and how it's wired

Here's my question: To wire this up, am I correct in making these changes?

  1. Join the line power and the load for further down the circuit with a wire nut
  2. Run a pigtail from that wire nut to the L-In terminal on the smart relay
  3. Connect the lighbulb load line to L-Out on the smart relay
  4. Run the neutral wire from the light into one N-In terminal on the relay
  5. Run a second neutral wire as a pigtail from the bundle to the other N-In terminal on the relay
  6. Connect the switch to S1 and S2 on the relay

That would look like this:

Illustration of the junction box with the changes described above

I'm hoping to get someone to sanity-check this before I start wiring, since I'm still very new to home electrical and don't want to, y'know, burn the house down because I overlooked something. 🔥

Thank you!

  • Are you hog-tied to the Sonoff for some reason, or is a different smart device an option? Commented Feb 18, 2023 at 14:17
  • I already have the Sonoff because it was cheap and could be flashed with ESPHome, so for this case, I'd prefer to stick with it.
    – SpencerDub
    Commented Feb 18, 2023 at 16:47

1 Answer 1


You don't. It's not UL Listed.

Anything installed in AC power wiring must be UL listed, or the functional equivalents of CSA or ETL Listing. That will involve one of those logos and a 6-9 digit file number.

This is regulated by NEC 110.2, and enforced by pre- and post-accident inspection, with consequences to insurance coverage and liability for the installer.

CE, FCC, RoHS and CCC are worthless marks. They are universally faked by manufacturers in that certain country, because there is no consequence for doing so (as long as they do all mail order from behind the Red Curtain, and don't have seizable business assets in the US/CA/EU). There is severe consequence for faking UL, CSA and ETL.

I already have the Sonoff because it was cheap

Well, now you know why.

  • Thanks for the heads-up, even if that's not the answer I was hoping for. Sounds like I'll be looking to replace these relays with UL-rated Shelly relays, then.
    – SpencerDub
    Commented Feb 18, 2023 at 20:54
  • @SpencerDub yes, Some of these shady makers have seen the light and started to make some of their models UL listed. It's a shame they don't do it from day 1, but in all fairness UL is a bit obtuse to deal with. Commented Feb 18, 2023 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.