Skip to main content

What You'll Need

  • Sonoff S31 Smart Plug with Energy Monitor
  • eWeLink app (iOS or Android)
  • eWeLink account
  • 2.4GHz Wi-Fi network

Step-by-Step Setup

  1. Download the eWeLink app and create an account.
  2. Plug in the Sonoff S31. The green LED will light up to confirm power.
  3. Enter pairing mode:
    • Press and hold the button for about 5 seconds
    • The LED will blink 3 times in a repeating pattern, indicating Quick Pairing mode
  4. Add the device in eWeLink:
    • Tap "+" to add a new device
    • Select "Quick Pairing" mode
    • Enter your 2.4GHz Wi-Fi credentials
  5. Wait for pairing to complete, then name the device and assign it to a room.

Key Features

  • Energy monitoring with voltage, current, power (watts), and cumulative kWh
  • 16A high-capacity relay for demanding appliances
  • Works with Alexa and Google Home
  • eWeLink scenes and automations
  • Compact design
  • Status LED for quick visual confirmation
  • Can be flashed with Tasmota or ESPHome firmware for local-only control

Custom Firmware Option

The Sonoff S31 is one of the most popular smart plugs for custom firmware because it uses an ESP8266 chip that is well-supported by the community:

  • Tasmota: Open-source firmware that gives you fully local control with no cloud dependency. Supports MQTT, HTTP, and integrates directly with Home Assistant. Flashing requires opening the case and soldering a serial header (or using a jig).
  • ESPHome: Another open-source option, tightly integrated with Home Assistant. You define the plug's behavior in a YAML config file and flash over serial.
  • Why flash? Local control means the plug works without internet, responds faster, and does not depend on Sonoff's cloud service staying online. The energy monitoring data flows directly to your home automation system.
  • Caveat: Flashing custom firmware requires opening the device and basic soldering skills. It voids the warranty. Only do this if you are comfortable working with electronics.

Energy Monitoring Details

The S31 provides more detailed energy data than most Wi-Fi smart plugs:

  • Voltage: See your actual wall voltage, which is useful for diagnosing power quality issues.
  • Current (amps): Monitor the actual current draw of connected devices.
  • Power (watts): Real-time power consumption reading.
  • kWh: Cumulative energy consumption over time.

Troubleshooting

  • Quick Pairing fails: Try Compatible Pairing (AP mode) instead. Press the button 3 times quickly to enter AP mode. The LED blinks in a different pattern. In eWeLink, select "Compatible Pairing" and connect to the Sonoff's Wi-Fi hotspot to complete setup.
  • 5GHz not supported: The S31 only works with 2.4GHz Wi-Fi. If your router combines both bands, try temporarily disabling 5GHz or creating a separate 2.4GHz SSID.
  • Energy data not showing: Wait a few minutes after connecting a load. If readings still do not appear, try toggling the plug off and on in the app, or power cycle the physical device.
  • Factory reset: Press and hold the button for 10 or more seconds until the LED flashes rapidly. This wipes all settings.
  • LAN mode: Enable LAN mode in the eWeLink app settings for local control on the same network. This allows the plug to respond even if the internet goes down, though the eWeLink app still needs to be on the same Wi-Fi network.

Ready to get started?

Check out the Sonoff S31 Smart Plug with Energy Monitor and see where to buy.

View Product Details

Was this guide helpful?