How to setup and use Sonoff / eWeLink devices with Apilio

What is eWeLink?

eWeLink is the smart home platform used by Sonoff. With Apilio’s native eWeLink integration, your device data updates in real-time and you can control your devices directly.

Supported devices

The integration supports a wide range of eWeLink devices:

Switches & Plugs

  • Single-channel switches and plugs (BASIC, MINI, Micro, and more)
  • Multi-channel switches (2, 3, and 4 channels)
  • Dual R3 / Dual R3 Lite
  • Zigbee switches (single and multi-channel)

Power Monitoring

  • POW, POWR2, POWR3
  • SPM (4-relay with per-channel monitoring)
  • Monitored values: current (A), voltage (V), power (W), energy (kWh)

Lights

  • Single-color bulbs and dimmers
  • Dual-color (warm/cold) lights
  • RGBCW LED bulbs and lights
  • LED strips (WiFi and Bluetooth)
  • Zigbee lights (monochrome, dual-color, RGBCW)

Fans

  • iFan (smart fan with light control and fan speed)

Sensors

  • Door/window sensors (WiFi and Zigbee)
  • Motion / human body sensors
  • Temperature and humidity sensors
  • Water flood sensors
  • Smoke sensors

Remote Controls & Buttons

  • R5 Scene Switch (6-button remote - single, double, hold)
  • S-Mate Switch Mate
  • Zigbee wireless buttons

How to connect your eWeLink account

:warning: Important: Make sure you have at least one device added to your eWeLink account before connecting.

  1. Go to your Connections page in Apilio
  2. Find the eWeLink channel and click Connect
  3. You will be redirected to the eWeLink login page → log in with your eWeLink credentials
  4. Authorize Apilio to access your eWeLink account
  5. Once authorized, you will be redirected back to Apilio
  6. Got to the Devices to sync your devices

That’s it! Your eWeLink devices should now appear on your dashboard with their current status. Device updates are received in real-time - whenever a device changes state, Apilio is notified instantly.

Using eWeLink device data in conditions

Create a Device condition to check for certain states.

Controlling eWeLink devices with actions

For devices that support actions, you can create eWeLink Actions in your logicblocks:

  • Switches and plugs: Turn on/off (each channel individually for multi-channel devices)
  • Lights: Turn on/off, set brightness (0-100%), set color temperature (0-100%)
  • Fans: Turn fan on/off, set fan speed (low/medium/high), turn light on/off
  • Diffusers: Turn on/off, set fan speed (low/high), turn light on/off

To create an eWeLink action:

  1. Open a logicblock and go to the Actions section
  2. Click the eWeLink button to add a new eWeLink action
  3. Select the device you want to control
  4. Choose the action type (e.g., Turn On/Off, Set Brightness)
  5. Set the value for the action

:bulb: Tip: You can use Apilio variables in the action value field. This allows you to create dynamic automations - for example, setting the brightness based on a variable.

How to disconnect

  1. Go to your Connections page
  2. Find the eWeLink channel (it will show as Connected)
  3. Click Revoke

:warning: Note: Disconnecting will delete all eWeLink actions and conditions associated with your account.