Sonoff WiFi Relay: How to Use and Configure the Device

Modern home automation systems are becoming more accessible, and the key element here is Sonoff Wi-Fi relay, which transforms ordinary electrical appliances into controllable gadgets. This compact device is installed in a power circuit and receives commands via a wireless network, enabling remote control of lighting, outlets, and high-power devices. Users often choose eWeLink products due to their affordable price and wide compatibility with voice assistants.

However, despite the simplicity of the design, the primary Setting up a WiFi relay This can raise questions for those new to smart home protocols. It's important to understand that the process involves not only physical installation but also software integration with the router and management server. In this article, we'll cover every step: from unpacking to creating complex automation scenarios that will make your home truly smart.

It's worth noting that most models operate at 2.4 GHz, the standard for IoT devices, but it requires proper router configuration. If you plan to scale the system by adding motion or temperature sensors, a proper initial setup will lay the foundation for stable operation of the entire network in the future.

Choosing the right model for your needs

Before installation, you need to decide on the type of device, as the manufacturer's line is extensive and includes solutions for various operating conditions. Basic models, such as Sonoff Basic, are single-channel relays, ideal for controlling lights or a single high-power appliance like a water heater. For more complex applications requiring control of multiple independent lines, there are multi-channel relays marked Dual or 4CH, allowing control of up to four consumers from one point.

Devices that support various communication protocols deserve special attention. In addition to classic WiFi, there are versions that operate via ZigBee or Bluetooth, which require an additional gateway but offer greater stability and energy efficiency. The choice between these depends on your network architecture: if the router is located far from the installation point, it's better to consider models with external antennas or mesh systems.

  • 🔌 Single-channel models — an ideal choice for replacing conventional switches or controlling single sockets in an apartment.
  • 🎛️ Multichannel devices — suitable for assembling lighting control panels or grouping loads in a private home.
  • 📡 Modules with RF 433 MHz — allow you to use old gate or barrier remote controls to control smart loads.

When purchasing, it's also important to pay attention to the maximum switching current specified in the specifications. For resistive loads, such as incandescent lamps or heaters, 10 amps is usually sufficient, but for inductive loads, such as pumps or motors, it's better to choose devices with a power reserve or use intermediate contactors.

⚠️ Attention: Some models marked "RF" may have a built-in radio receiver that can interfere with the WiFi signal if the antennas are not routed correctly inside the case. When reassembling, ensure that the antenna wire does not come into contact with the power terminals.

Preparation for installation and network requirements

Successful integration of a device into the ecosystem is impossible without preliminary testing of the wireless network operating conditions. Frequency range is critical: almost all models smart relays They operate exclusively in the 2.4 GHz band and cannot see 5 GHz networks. If your router broadcasts both networks under the same name (Band Steering), the pairing process may fail, so it is recommended to temporarily separate them or create a guest network exclusively for IoT devices.

It's also important to ensure the signal strength at the intended installation location. Since relays are often hidden in wall boxes or junction boxes, metal elements can shield the signal. Before final installation, conduct a test by temporarily connecting the device near the router and then moving it to the installation location to check the connection stability via the app.

📊 What kind of router do you have?
One 2.4 GHz band
Two ranges (separated)
Two ranges (one name)
Mesh system

To set it up, you'll need a smartphone with an Android or iOS operating system and the eWeLink app installed. Account registration is mandatory, as the cloud server provides remote access to the device from anywhere in the world. Make sure your account password is secure, as this will security key all your home automation.

Connection process and initial setup

Once the software is ready, you can move on to the physical connection and pairing. First, power up the device: connect the wires according to the diagram on the housing or in the instructions, observing the polarity and assignment of the terminals L (phase input), N (neutral), and L1 (phase output). Remember that when working with electricity, disconnect the power at the panel to avoid electric shock.

Entering pairing mode typically requires a long press on the device button (about 7 seconds) until the LED indicator starts flashing rapidly. This mode is called AP mode or Quick Pairing, depending on the model and firmware version. In the app, tap the Add Device button and follow the prompts, entering your WiFi network password.

☑️ Connection checklist

Completed: 0 / 4

During setup, the app may prompt you to update your device's firmware. This is an important step, as new software versions often contain vulnerability fixes and improve connection stability. If the update is successful, the device will reboot and appear in the list of available devices, allowing you to rename it and assign it to a room.

Parameter Meaning / Description Importance
WiFi frequency 2.4 GHz (802.11 b/g/n) Critical
Supply voltage AC 90-250V (depending on model) High
Maximum current 10A or 16A (for powerful versions) High
Operating temperature from -10°C to +40°C Average

Setting up scripts and automation

Core Value smart home The idea isn't to turn on the lights remotely, but to have the system operate automatically without human intervention. The eWeLink app offers a powerful "Smart Scene" tool (or "Tap-to-Run" in older versions), allowing you to create logic chains. For example, you can set up a condition: "If the time is 11:00 PM and the motion sensor is inactive for 10 minutes, then turn off the lights in the living room."

Scenarios can be local or cloud-based. Local scenarios run faster and work even without internet access, as long as the devices are on the same network and support LAN control. Cloud scenarios allow you to integrate external services, such as weather data or geolocation. For example, a relay can be activated automatically when your smartphone leaves the range of your home WiFi network.

  • 🕒 Timers and schedules — allow you to turn on the load at a certain time, simulating the presence of people or heating water for the morning rise.
  • 🌡️ Response to sensors - using data from temperature and humidity sensors to control an air conditioner or humidifier.
  • 📍 Geolocation — automatic switching off of all devices when away from home to save energy.
Secrets of Complex Scripts

You can combine devices from different brands if they're added to a single eWeLink account. IFTTT integration is also available for expanded functionality, such as receiving a Telegram notification when a relay is triggered.

When creating complex chains, it's important to consider latency and network conditions. If the scenario is mission-critical (for example, leak protection), it's better to use local connections between devices or dedicated controllers, as reliance on a cloud server introduces a small but persistent delay in command execution.

Integration with voice assistants

For complete convenience, the device should be voice-controlled. Sonoff products work seamlessly with Yandex.Alice, Google Assistant, and Amazon Alexa. To activate this feature, find the "eWeLink" (or "Sonoff") skill in the voice assistant app, log in to your account, and sync the devices. After that, you can say, "Alice, turn on the hallway light."

It's important to name devices and rooms correctly in the app, as voice assistants use these names for identification. Avoid complex symbols and long names. It's better to name a device "Kitchen Light" than "Relay #1 for Work Area Lighting." This will simplify voice control and make commands more natural.

⚠️ Attention: When changing the device name in the eWeLink app, please remember to re-sync the devices in the voice assistant app, otherwise it will continue to search for the device by the old name and will not be found.

Voice control opens up new possibilities for people with disabilities, making home control accessible without having to reach for light switches or pull out a smartphone. It also adds a touch of futurism to everyday life, turning ordinary actions into magic.

Alternative firmware and extended functionality

For advanced users who want to avoid dependence on Chinese cloud servers, there is the option of flashing the device to alternative software, such as Tasmota or ESPHomeThis allows the relay to be integrated directly into local smart home systems, such as Home Assistant, ensuring complete data privacy and instant response without delays.

Flashing the firmware requires technical skills and, as a rule, a temporary connection to the UART pins on the device's board (TX, RX, GND, 3.3V) via a USB-TTL converter. Some newer models have write protection or modified pinouts, so it's important to research the specific model on specialized forums before beginning work.

Using alternative firmware turns a cheap Chinese relay into a powerful tool with MQTT support, complex logic, and integration into any system. However, for most users, eWeLink's built-in functionality is sufficient for 95% of use cases.

Diagnostics and solution

During operation, users may experience connection loss or unstable operation of the device. Most often, the problem lies in a weak WiFi signal or changes to the router settings. If the indicator light is red or flashing rapidly, try rebooting the router or moving the device closer to the signal source. A factory reset by holding the button for a long time also helps.

Another common problem is the device shutting down after a power outage. Each relay has a "State after power on" setting in its settings. By setting it to "Last State," you'll force the device to remember its last state and return to it after a power surge, which is critical for lighting and other important devices.

  • 🔄 Reboot — the first step in any failure, often solves 90% of software errors.
  • 📶 Checking the signal - Use WiFi analyzer apps on your smartphone to assess the signal strength at the installation point.
  • 🔌 Contact — Check the tightening of the screws in the terminals; loose contact causes heating and unstable operation.
Why doesn't the relay connect to the 5GHz network?

The WiFi modules installed in Sonoff don't physically support the 5 GHz band. They only operate on 2.4 GHz. You'll need to either switch the router to compatibility mode or create a separate 2.4 GHz network for your smart home.

Is it possible to use the relay without the Internet?

By default, no. Internet access is required for initial setup and remote access. However, when using local firmware (Tasmota) or certain LAN modes in eWeLink, control is possible within the local network without access to the outside world.

Is it safe to leave the relay on all the time?

Yes, the devices are designed for 24/7 operation. However, ensure that the load does not exceed the rated current and that the relay itself is installed in a location with adequate ventilation to prevent the enclosure from overheating.

How to reset the relay settings?

Press and hold the physical button on the device for 7-10 seconds until the LED flashes rapidly (usually 4 times per second). This will return the device to pairing mode.