# eWeLink-Remote Sub-Devices

You can transform the CUBE OS into an eWeLink Remote Gateway, allowing integration of sub-devices like the [**S-MATE 2**](https://sonoff.tech/en-us/products/sonoff-s-mate-extreme-switch-mate/58) **or** [**R5**](https://sonoff.tech/en-us/products/sonoff-switchman-r5-scene-controller/58).

{% hint style="info" %}
**What is the eWeLink-Remote control？**

eWeLink-Remote Control is a unique new remote control solution for SONOFF devices. It provides a more convenient, more reliable, and longer-distance control way for your home appliances.

About the details, please view:

<https://sonoff.tech/news-and-events/what-is-ewelink-remote-control/>
{% endhint %}

## 1. Enable eWeLink-Remote Control in Pilot

{% stepper %}
{% step %}
From the left sidebar, go to **Pilot Features**.

<figure><img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FZEo3wAr10BGuQxbdRMaO%2Fimage.png?alt=media&#x26;token=9c6fabd6-41a9-4f6d-b646-8a8dd4fef4c1" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Find **eWeLink-Remote Control** and click **Learn More**. Toggle the switch to **enable** this feature.

<figure><img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2F6jTwIiywVmGfFeNzgwCp%2Fimage.png?alt=media&#x26;token=1c8b9de5-da5d-43fe-bf99-174744f7019c" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Once enabled, CUBE OS will activate the eWeLink-Remote protocol and prepare to receive signals from compatible devices.
{% endstep %}
{% endstepper %}

## 2. Add an eWeLink-Remote Sub-Device (Using R5 as Example)

{% stepper %}
{% step %}
Go back to the **Home** page. Click the **“+”** icon in the top-right corner. Select **eWeLink-Remote Sub-Devices** from the list.

<figure><img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FBYRgvHkeuVXPM1nKwtLW%2Fimage.png?alt=media&#x26;token=44c00967-d834-4feb-aeab-e05a1b946809" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Click **Pair** to enter pairing mode.

<figure><img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FyKCwZCHFvGshpwhXVSHo%2Fimage.png?alt=media&#x26;token=7119b5b0-0a5f-411a-bdbb-882a29cfb1a3" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
On your **SONOFF R5**, trigger any button once. This will send a pairing signal.
{% endstep %}

{% step %}
Once pairing is successful, the R5 will appear in your device list.

<figure><img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FKnzBLUamlXNR4kqB78yD%2Fimage.png?alt=media&#x26;token=7a44a10f-8840-454d-bb2a-e40885634c02" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## 3. Configure Smart Scenes for eWeLink-Remote Sub-Devices

After adding your eWeLink-Remote sub-device, you can link it to other smart devices through **Smart Scenes**.

{% stepper %}
{% step %}
Go to the **Scene** page.

<figure><img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FUT2q7a9NvXxxXmu6HeKp%2Fimage.png?alt=media&#x26;token=48bb0892-bfe3-42c1-a0f4-8e1b82719901" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Under the **Smart Scene** tab, click **Add Scene**.

<div align="left"><figure><img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2Fu6xWKp5UDhuX9nL97u2W%2Fimage.png?alt=media&#x26;token=82f4f888-4d66-46d0-bcf2-7e5516a0dc89" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
Set up the **If** condition:

**Add Smart Device → SONOFF R5 → Enable Wireless Button → Channel 1 → Click → Done.**
{% endstep %}

{% step %}
Set up the **Then** action:

**Add Smart Device → SONOFF B05-BL → Enable Switch → On → Done.**
{% endstep %}

{% step %}
Save your Smart Scene.

<figure><img src="https://67406449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCnF8kmk9yw3yiy2mRerq%2Fuploads%2FmskMAoTHPX0TcR6nwqEK%2Fimage.png?alt=media&#x26;token=ce493825-a4db-4fc2-8f8b-bf0f056c6efd" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

Now, when you press the R5 button, the connected B05-BL light will turn on automatically.
