How to connect a WiFi relay to a switch without a ground wire

Modernizing lighting with smart home technologies often comes up against the design limitations of older buildings. Most apartments built before the mid-2000s have only one phase wire connected to single-key switches, and zero line (neutral) is missing. This creates a technical dead end for standard WiFi relays, which require constant power to operate the wireless module.

However, the absence of a neutral doesn't mean automation is impossible. There are specialized devices that can operate in a break in the circuit, using the microscopic leakage current to maintain communication with the router. Engineers have developed schemes, allowing you to bypass the physical limitations of wiring without cutting grooves in the walls.

In this guide, we'll detail the operating principles of these devices, explore the nuances of connecting different types of lamps, and troubleshoot common issues like LED flickering. You'll learn how to transform a regular light switch into a smart network node without extensive renovations.

The operating principle and the difference between a relay with and without zero

A standard smart relay requires a connection to two wires: a live wire and a neutral wire. This provides a stable 220V current to power the internal electronics while the switch itself is open. Without a neutral wire, the device simply has no power to wait for a command from the WiFi network.

No Neutral relays operate on a different principle. They allow the load current to pass through them even when off, using it to recharge an internal capacitor. This requires a minimum current to constantly flow in the circuit, sufficient to operate the chip but not sufficient to light the lamp.

The main challenge lies in compatibility with different types of lighting fixtures. While low current flow isn't critical for incandescent lamps, it can be a problem for LEDs and energy-saving lamps. Flickering or a dim glow when off is a direct result of the operation of such a circuit.

There are two main approaches to solving this problem:

  • Use of specialized relays where the power supply circuit is optimized for operation in a phase break.
  • Use of standard relays with a parallel installation of a compensation capacitor or choke.

The choice of a specific method depends on the equipment available and the type of lamps installed. It is important to understand that load power also plays a role: too little power may not ensure stable operation of the communication module.

📊 What type of bulbs do you have in your chandelier?
Incandescent lamps
Light-emitting diodes (LEDs)
Energy-saving (CFL)
Mixed type

Necessary tools and components

Before starting work, you need to have a complete set of tools ready. Not having the right tools can result in damaged insulation or poor contact, which is unacceptable under 220V conditions. You'll need a standard screwdriver, side cutters, and, preferably, multimeter to check for voltage.

The key component is the WiFi relay itself. Models from various manufacturers are available on the market, including Sonoff, Shelly, Tuya, and others. When choosing, look for the "No Neutral" marking. Additional components may also be required, such as: capacitors of a certain capacity, if they are not built into the device.

For safe installation, make sure you have:

  • 🔌 Indicator screwdriver or multimeter.
  • ✂️ Side cutters or wire stripping pliers.
  • 📏 Insulating tape or heat shrink.
  • 🧤 Dielectric gloves (recommended).

If you plan to install a relay in a wall box, check its depth. Standard models may be wider than regular switches due to the additional electronics. In some cases, you may need to replace the wall box with a deeper one.

☑️ Checking readiness for installation

Completed: 0 / 4

Wiring diagrams for Wi-Fi relays in open circuits

The connection process requires care and adherence to safety precautions. The first step should always be to completely shut off the power at the apartment's electrical panel. Even if you're confident in your skills, the risk of electric shock when working with live power is too high.

The wiring diagram for a relay without a neutral wire involves installing it in series with the phase wire going to the lamp. This means the phase wire from the panel comes to the relay input, and the relay output goes directly to the lamp. The neutral wire is not connected to the relay itself in this circuit.

Let's look at the main stages of installation:

  1. Remove the switch key and take the mechanism out of the socket box.
  2. Determine the incoming phase and the wire going to the lamp using a multimeter.
  3. Connect the incoming phase to the relay input (usually marked as L or Line).
  4. Connect the wire from the lamp to the relay output (usually L1 or Load).

It's important to note that some models require a capacitor to be connected in parallel directly to the lamp base or junction box. This stabilizes the leakage current and prevents flickering.

The nuances of connecting multi-key switches

When installing a relay in a two-key switch without a neutral, two separate devices are often required. Each relay is installed in the break of its phase. If space in the wall box is limited, use compact models, such as the Sonoff Mini R2 or similar ones, which fit easily behind the keys.

The table below will help you compare terminal markings on devices from different popular brands:

Brand / Model Input (Phase) Output (to the lamp) Additional requirements
Sonoff Mini L (Line) L1 (Load) Capacitor included
Shelly 1 L (Input) O (Output) Neutral or capacitor required
Tuya Smart L in L out Built-in circuit
Yeelight L N (Load) Strict adherence to polarity

After physically connecting the wires, carefully place them in the electrical box, being careful not to damage the insulation with sharp wall edges. The switch mechanism or relay itself is secured with screws or latches.

The problem of flickering LED lamps and its solution

One of the most common problems when using circuits without a ground is LED lamps flickering when off. This occurs because a small current constantly flows through the circuit to power the WiFi module. This current is imperceptible to incandescent lamps, but LEDs have a high efficiency and begin to flicker due to the accumulated charge.

To eliminate this effect, it is necessary to create an alternative path for the leakage current or accumulate it. In most cases, relay manufacturers include a special capacitor or a choke. It must be connected in parallel with the lamp.

There are several solutions:

  • 🔧 Installing a capacitor in a distribution box parallel to the lamp circuit.
  • 💡 Mounting the compensator directly into the chandelier base (if the design allows).
  • 🛠 Replacing one of the lamps in the chandelier with a low-power incandescent lamp (less efficient).

If flickering persists even after installing the capacitor, check the quality of the contacts. A poor connection can create parasitic interference. Also, make sure the total power of the connected lamps is not lower than the minimum specified in the relay manual (usually 5-10 W).

In some cases, replacing the bulbs themselves with models labeled "dimmable" or "compatible with smart switches" can help. These have a more complex internal driver circuit that filters out interference better.

Smart home setup and integration

After successful installation and power-up, the device must be put into pairing mode. Typically, this requires pressing and holding the button on the relay body for 5-10 seconds until the indicator light begins flashing rapidly. Flash patterns may vary, so consult the manual. specific model.

The setup process then looks like this:

  1. Download the manufacturer's app (e.g. eWeLink, Smart Life, Shelly Cloud).
  2. Register and create a new account.
  3. Click "Add device" and select the WiFi connection type.
  4. Enter the password for your home network.

Important: Smart relays only operate in the 2.4 GHz band. If your router broadcasts both the 5 GHz and 2.4 GHz networks under the same name, you may encounter device detection issues. In this case, we recommend temporarily separating the networks in your router settings or using AP (access point) mode for initial setup.

⚠️ Attention: App interfaces and pairing procedures may change with software updates. If the standard procedure doesn't work, try resetting your device to factory settings (usually three quick taps or a long hold) and try again.

Once successfully added, you can give the device a descriptive name (e.g., "Hallway Light") and assign it to the appropriate room. This will simplify control with voice assistants.

Integration with voice assistants and automation

The main advantage of WiFi relays is the ability to control them with voice and create scenarios. Most platforms support integration with Yandex.Alice, Google Home, Amazon Alexa, and Apple HomeKit (via dedicated gateways or natively).

To connect to Yandex.Alice:

  • Open the "Home with Alice" app.
  • Go to the "Smart Home" section → "Add device".
  • Find the manufacturer of your relay in the list (for example, Tuya or Sonoff).
  • Log in using your Relay app account details.

Now you can control your lights with commands like "Alice, turn on the lights" or "Alice, turn off the bedroom lights." You can also create automated scenarios, such as turning on the lights at sunset or triggering a motion sensor.

For complex scenarios such as "movie mode" (dimming the lights throughout the apartment), you may need to use third-party platforms like Home Assistant or IFTTT, which connect different ecosystems into a single logic.

⚠️ Attention: When setting up automations, consider WiFi latency. Wireless commands can be executed with a delay of 0.5–2 seconds, which is normal for home use, but critical for security systems.

Common errors and troubleshooting

Even if you follow all the instructions, difficulties may arise. If the relay doesn't connect to the network, check the signal strength. Reinforced concrete walls or thick partitions can block the signal. In this case, installing a WiFi repeater closer to the installation area may help.

If the relay constantly disconnects or reboots, it may not be receiving enough power. This often happens when using old or cheap power supplies built into the relay itself, or when the load is very low (a single weak LED lamp). In this case, installing an additional capacitor with a higher capacity may solve the problem.

Typical symptoms and solutions:

  • 🔴 The indicator is on, but there is no control: Check your router; the password may have changed or MAC filtering may be blocking the new device.
  • 🔴 The lamp is flashing: Install a compensation capacitor in parallel with the load.
  • 🔴 The relay is humming: This may indicate poor contact or poor assembly of the device itself. Try tightening the terminal screws.

If all else fails, try connecting the relay to a different outlet (if the design allows) or replacing the bulb with a regular "Ilyich" bulb for testing. This will help isolate the problem: in the relay, the bulb, or the wiring.

What to do if the firmware crashes?

In rare cases, the device may freeze. Try briefly disconnecting the power (turning off the circuit breaker) and then turning it back on. If this doesn't help, you'll need to reflash the firmware via the UART port, which requires soldering skills and a USB-TTL adapter.

Questions and Answers (FAQ)

Is it possible to use a regular relay with zero if you connect zero from a neighboring socket?

Technically, this is possible, but it requires running an additional wire through the wall, which is often impossible without cutting a groove. Furthermore, taking the neutral wire from another circuit breaker group can be unsafe and violate electrical installation regulations. It's simpler and safer to use a specialized relay without a neutral wire.

Will this circuit work if the chandelier only has one 3W LED bulb?

Most likely not. The minimum load for stable operation of most WiFi relays is 5–10 watts. At lower power, the capacitor won't be able to charge, and the relay will constantly reboot or go offline. In this case, a compensation capacitor is essential.

Is it dangerous to leave a capacitor in a circuit permanently?

No, it's not dangerous. The capacitors used in these circuits are rated for 220V DC and have low capacitance. They don't heat up or consume significant power, serving only as a buffer to smooth out the current.

Is it possible to control the relay if the internet is lost?

It depends on the model. Some relays have a physical button that functions as a regular switch even without power. Others require power to switch. The "state memory" feature allows the relay to remember its last state (on/off) after power is restored, but not after WiFi is lost.

Is this circuit suitable for connecting underfloor heating or a powerful heater?

Most compact WiFi relays are rated for up to 10A (approximately 2.2 kW). For higher-power loads, a contactor or magnetic starter controlled by this relay must be used. Directly connecting a powerful heater can cause overheating and fire.