How to Set Up the Sonoff Mini R4: Wiring, eWeLink and Troubleshooting

This is the hands-on companion to my complete Sonoff Mini R4 guide: specs, differences with the R4M and how to choose it.

Setting up the Sonoff Mini R4 takes about ten minutes: wire it behind your existing switch, pair it in the eWeLink app and then decide how you want to automate it. In this guide I walk you through the wiring, the app setup, the settings worth changing, the optional ESPHome route and the problems I see most often.

What you need before you start

  • A 2.4 GHz Wi-Fi network. The Mini R4 does not connect to 5 GHz-only networks.
  • The eWeLink app on your phone (Android or iOS) and a free eWeLink account.
  • A wall box with enough room: the module is only 39.5 × 33 × 16.8 mm.
  • The official wiring diagram from the box or the Sonoff manual. Always follow it for your exact model.

Step 1: wire the Sonoff Mini R4

  1. Cut the power at the breaker and check with a tester that the circuit is dead. Never wire it live.
  2. Connect the live and neutral supply wires and the load (the lamp or device you want to switch) to the terminals shown in the official diagram.
  3. If you want to keep your wall switch or push button, connect it to the external switch terminals. The R4 works with several types of external switch, so you do not have to give up the manual control.
  4. Fit the module in the wall box, restore the power and check that the LED lights up.

The module handles up to 10 A / 2400 W (100–240 V). If the load is bigger, for example a heater, use it to drive a contactor instead of connecting it directly. If you are not comfortable working in a mains box, hire a qualified electrician: it is a short job for them.

Step 2: pair it with the eWeLink app

  1. Open eWeLink, sign in and tap Add device.
  2. Make sure your phone is on the 2.4 GHz network, then follow the on-screen pairing steps.
  3. Give the device a clear name and assign it to a room.

Step 3: settings worth changing

  • Detach relay: separates the wall switch from the relay, so pressing the switch can trigger scenes without cutting the power to the load. It is perfect for smart bulbs that must stay powered.
  • Schedules and scenes: turn lights on at sunset, switch off at a set time or link the Mini R4 to other eWeLink devices.
  • Voice assistants: link eWeLink to Alexa or Google Assistant from their apps to control it by voice.
  • LAN control: the Mini R4 can be controlled over your local network, so it keeps responding even if your internet connection goes down.

Home Assistant and other platforms

You can bring the Mini R4 into Home Assistant and other platforms through its eWeLink and local-network (LAN) control options. If you want a device that talks Matter natively, look at the Mini R4M instead. I explain the difference in my Sonoff Mini R4M article and in the Mini R4 vs R4M vs R2 vs ZBMINIR2 comparison.

Advanced: flashing ESPHome (optional)

The Mini R4 is built around an ESP32, so it can run ESPHome. The documented method is through the serial port and it is not for beginners:

  1. Open the module and locate the Rx, Tx and GND pads on the ESP module and the 3V3 pad on the main board (it is varnished, so it has to be scraped gently before soldering).
  2. Use a USB-to-serial adapter set to 3.3 V.
  3. Enter programming mode by holding the button while powering the module.
  4. Upload the firmware with esptool or directly from ESPHome.

Safety: never do this with the module connected to the mains; power it only from the 3.3 V adapter. When you flash it you lose the original firmware and, with it, the eWeLink app. I have not verified Tasmota compatibility for the Mini R4, so check that a template exists for your hardware revision before trying it.

Troubleshooting

Problem What to check
It will not pair Phone and module must be on a 2.4 GHz network; check the Wi-Fi password and move closer to the router. Restart the router and try again.
It shows as offline Check that the module is powered and within Wi-Fi range. A weak signal behind a metal wall box is a common cause.
The wall switch does not work as expected Check the external switch wiring and whether detach relay is enabled in the device settings.
It stopped responding after changing router or Wi-Fi password Reset the device following the official manual and pair it again.

Where to buy

The official ITEAD store offers support and warranty.

Buy the Sonoff Mini R4
Affiliate link: if you buy through it I earn a small commission at no extra cost to you. With the code AXLMSONOFF you get an extra 10% off on the ITEAD store.

Frequently asked questions

Does the Sonoff Mini R4 work on 5 GHz Wi-Fi?

No. It only works on 2.4 GHz networks, so pair it while your phone is connected to the 2.4 GHz band.

Can I still use my wall switch?

Yes. The Mini R4 has external switch terminals and works with several types of switches. You can also enable detach relay mode.

Does it work without internet?

It supports LAN control, so it can be controlled on your local network without relying on the cloud. Remote access from outside your home does need an internet connection.

Can I flash ESPHome on the Mini R4?

Yes, because it uses an ESP32, but the documented method uses the serial port and requires soldering. You lose the original firmware and the eWeLink app.

Is the Mini R4 the same as the R4M?

No. The R4M is the Matter version. Read the full Mini R4 guide for the differences.

Scroll to Top