Integration of smart socket into the gateway Xiaomi Gateway and Yeelight

Creating a complete smart home ecosystem is impossible without a central control element, often a gateway, that connects disparate ZigBee devices to your home Wi-Fi network and cloud services. Adding peripherals like a smart outlet seems simple, but often faces technical nuances that require precise sequences.

Owners of Xiaomi and Yeelight equipment should understand that compatibility and pairing methods may vary depending on the version of the hub firmware and regional account binding. Incorrect configuration at the initial stage can lead to unstable operation of automation scenarios or complete lack of response of devices. In this guide, we will discuss all the stages of integration in detail, eliminating common errors.

Before you start setting up, make sure your gateway is already connected to the network and appears in the Mi Home or Yeelight app as an active device. This is the foundation without which further manipulations do not make sense. We will look not only at the standard algorithm, but also at specific cases where automatic search does not work the first time.

Preparation of equipment and software

The first step is to check the compatibility of software versions. Make sure your smartphone has the current version of the Mi Home app installed, as older versions may not support the new encryption protocols used in fresh batches of smart outlets. It is also critical that the gateway itself has the latest firmware that can be checked in the device's settings menu.

Notice the distance between the device and the hub. To successfully pair the socket must be in close proximity to the gateway, preferably within the same room without capital walls between them. The ZigBee protocol creates a mesh network, but the initial handshake requires a strong signal.

⚠️ Warning: Do not try to add an outlet if it has already been connected to another gateway or account.In this case, the device may not go into pairing mode. First, perform a full reset of the outlet by holding a button on the case on the device. 10-15 seconds before the characteristic flashing of the indicator.

If the gateway and the socket are purchased in different regions (for example, one from China, the other from Europe), there may be conflicts when adding.

  • πŸ“± Make sure Bluetooth on your smartphone is on – this will speed up your device search.
  • πŸ“‘ Check that the Wi-Fi network is running at 2.4 GHz (gateways do not support 5 GHz).
  • πŸ”‹ Make sure that the socket is working and the indicator on it responds to the connection to the network.
  • πŸ”„ Restart your router if the network is overloaded with a large number of devices.
πŸ“Š What kind of gateway do you use to control the socket?
Xiaomi Gateway 3 (CN)
Xiaomi Gateway 3 (EU)
Yeelight Hub
Another ZigBee hub

Algorithm of adding a socket through the Mi Home app

The main integration method is via the official Mi Home app. Open the app and go to the home page where all your devices are displayed. Find your gateway card and click on it to log in to the control menu.

The gateway interface that opens, you need to find the add button for a new device, which is usually located in the upper right corner of the screen or at the bottom of the menu as a plus icon, and after pressing, the system will start scanning the space for new ZigBee devices that are ready to pair.

β˜‘οΈ Checklist before addition

Done: 0 / 4

Now you need to put the smart socket in mode (adjacents). To do this, quickly press and release the button on the socket case 5 times in a row, until the indicator often flashes blue or orange.

If the automatic search didn’t work, use a manual selection from the list. Find your socket model (such as the Aqara Smart Plug or Xiaomi Smart Plug Zigbee) in the directory and follow the instructions on the screen.

πŸ’‘

If the app is looking for a device for a long time, try turning off the mobile Internet on your phone, leaving only Wi-Fi. This will prevent you from switching search protocols.

Using the Yeelight application for management

Many users prefer to use the Yeelight app because of its more flexible interface and enhanced scripting capabilities.If your gateway supports integration with the Yeelight platform (e.g. Yeelight Multimode Gateway), the process of adding an outlet will look different, but the principle will remain the same.

In Yeelight, go to Devices and click the add button. The system will suggest you choose a device type. Unlike Mi Home, you often need to add the gateway to the Yeelight app first and then search for the peripherals through it.

The important thing is to link accounts, and to work properly, you need to activate the "Connect Yeelight" option in the gateway settings. Without this step, the app simply won't see the gateway plugs, even if they're displayed in Mi Home.

⚠️ Note: When switching control between Mi Home and Yeelight, there may be name conflicts. It is recommended that the socket be renamed into an understandable name immediately after adding, for example, "Torcher in the living room", so as not to get confused in the scenarios.

Once successfully added, you’ll have full access to power consumption statistics (if the outlet supports this feature) and countdown timers. Yeelight’s interface often provides more detailed energy consumption schedules.

Setting up scenarios and automation

The main value of a smart outlet is that it can automate processes, and once you add the device to the gateway, you can create scenarios that will be executed under certain conditions, such as turning on the outlet when you open your smart lock or turning off the lights when you leave the house.

To create a script, go to Auto or Scripts in the app. Click Create and select the launch condition (If). The condition may be time, geolocation, state of another sensor, or voice command.

Then select an action (That). Here you select your new outlet and the "On" or "Off" action. You can combine several actions: for example, turn off the socket with the kettle and send a notification to the phone at the same time.

An example of a complex scenario
If it is 23:00 and the motion sensor in the bedroom is not activated for 10 minutes -> Turn off the socket with the humidifier and turn the socket with the alarm into standby mode.

Remember, delays. You can set a timer in your action settings so that the socket doesn't turn on instantly, but for example, 5 minutes after the condition hits, which is useful for simulating the presence or cycling of the devices.

Table of compatibility and characteristics

When choosing equipment, it is important to consider specifications, since not all outlets work equally well with all versions of gateways. Below is a comparison table of popular models that are compatible with the ecosystem of Xiaomi and Yeelight.

Model socketProtocol of communicationMax, load.Energy monitoring
Aqara Smart Plug (CN)ZigBee 3.02500 wattsThere is.
Xiaomi Smart Plug (ZigBee)ZigBee2500 wattsThere is.
Yeelight Smart PlugZigBee / Wi-Fi2200 wattsOptionally.
Aqara T1 PlugZigBee 3.02500 wattsThere is.

Note the "max load" column. For high-power consumers, such as heaters or washing machines, you need to choose models with a margin of power. The standard value for most home outlets is 10A or 2500 watts.

Having energy monitoring allows not only to track electricity consumption, but also to create savings scenarios, for example, if consumption exceeds a certain threshold, the outlet can automatically shut down, preventing grid congestion.

πŸ’‘

For stable operation of the ZigBee network, it is recommended that at least some devices (outlets) be constantly powered from the network, since they act as repeaters of the signal.

Solving Connection Problems

Despite the simplicity of the procedure, users often face difficulties, and one of the most common problems is that the device is listed but has an offline status, meaning that the gateway sees the outlet in its database but cannot communicate with it in real time.

In this case, try to remove the device from the application and repeat the addition procedure again, after resetting the socket, and the problem can be hidden in interference: routers, microwave ovens and USB 3.0 ports can cause interference in the 2.4 GHz band.

If the outlet is added but does not respond to commands, check the gateway firmware version. Sometimes new devices require a central hub update. Go to the gateway settings and click "Verify Updates."

⚠️ Warning: Do not place the gateway and socket near metal objects or behind mirrors.The metal shields the ZigBee signal, resulting in loss of data packets and delays in executing commands.

In rare cases, changing the Wi-Fi channel on the router helps. If your router runs on a channel that overlaps strongly with the ZigBee channel, there may be conflicts. Try switching Wi-Fi to Channel 1 or 11, freeing up the middle of the range for a smart home.

The Secret to Stability
If you have a large house, use repeater outlets that amplify the ZigBee signal, extending the network coverage to other rooms.

Frequently Asked Questions (FAQ)

Can I add a socket if the gateway is in another city?
No, for initial addition (pairing), the smartphone and the socket must be in the same Wi-Fi network and in close proximity to the gateway, and once set up, you can control the socket from anywhere in the world via the Internet.
What if the app says β€œDevice has already been added”?
This means that the socket is tied to another account or gateway, and you need to reset the device completely before resetting the settings, and then delete it from the old account before adding it to the new one.
Does the outlet work without the internet?
Yes, if you have local scripts set up in the app, but to control from a smartphone via 4G/5G or voice assistants (Alice, Google Assistant), Internet access is mandatory.
What is the maximum current with standard Xiaomi outlet?
Most models, such as the Aqara and Xiaomi ZigBee Plug, are designed for currents up to 10 Amps and power of 2500 watts. Exceeding these values can lead to contact melting and fire.
Is the socket compatible with HomeKit?
There is no direct compatibility between conventional Xiaomi outlets and Apple HomeKit, but if you use the Aqara Gateway that supports HomeKit, the plugs connected to it will be available in the Home app on the iPhone.