Xiaomi smart lamps have become one of the most popular devices for creating a smart home system due to the combination of affordable price, wide functionality and ease of use. These devices don't just light up the room, they integrate into the Mi Home ecosystem, support voice control, schedule automation, even synchronization with other gadgets, but how does a light bulb work? How does it differ from a regular bulb? LED-And what are the hidden possibilities behind the simple appearance of light bulbs?
In this article, we will analyze the device of Xiaomi smart lamps (including models Yeelight, Mi). LED Smart Bulb and Aqara, explain the principles of their operation at the hardware and software level, and show how to configure the lamp for maximum convenience. You'll learn what communication protocols are used, how the lamp interacts with the Xiaomi router and cloud, and why it can sometimes "glut" for no apparent reason.
1. Xiaomi smart lamp device: what's inside?
Xiaomi smart lamp looks like a regular lamp LED-lamp-lamp E27 or E14, But inside it, there's a real minicomputer:
- π‘ LED-matrix - usually based on Cree or Osram chips, providing brightness up to 800-1000 lm and color temperature from 1700K (warm lights 6500K (cold. RGB-Models (e.g. Yeelight Color) have added red, green and blue diodes to produce 16 million shades.
- π§ Microcontrollers are usually the ESP8266 or Realtek RTL8710, which processes commands, controls brightness and communicates with the router over Wi-Fi.
- πΆ Wi-Fi module β operates on frequency 2.4 GHz (supports) 5 GHz is not!) and uses the protocol IEEE 802.11 b/g/n. Important: The lamp doesnβt connect directly to the phone β it always communicates via the router.
- π The power supply unit - transforms ~220V in low voltage for LED In cheap models, it can cause flickering when the network is poor.
A critical feature: all Xiaomi smart bulbs (except some Aqara models) run ONLY through the companyβs cloud, which means that even for local management (for example, on a schedule), the lamp sends data to Xiaomi servers in China or Singapore. Without the Internet, some of the features will not be available β but more about this in the section on connection.
Interesting fact: Yeelight lamps (a subsidiary of Xiaomi) use the open Yeelight Inter-Device Protocol, which allows them to be controlled over a local network without the cloud, making them more flexible for home automation enthusiasts.
2.The principle of operation: how does the lamp receive and execute commands?
The algorithm of the Xiaomi smart lamp can be divided into 4 stages:
- Connecting to the network. When you first turn on, the lamp creates its own Wi-Fi hotspot (the name begins with yeelink-light-... or miio:..) You connect your phone to it through the Mi Home app, and then the lamp automatically goes to your home network.
- Cloud-based authorization. Lamp sends unique Device ID And you have to go to Xiaomi servers, where it's linked to your account, and this is a mandatory step, because without it, you can't remotely control the lamp.
- When you send a command (e.g., turn on the light) through an app or voice assistant, it goes the next way: π± Control device (telephone/column) β Xiaomi's Cloud β router β lamp. β‘ With local control (if the lamp and phone are on the same network), the command can go directly through the router, bypassing the cloud.
Implementation
{"id":1,"method":"set_power","params":["on", "smooth", 500]}
It is important to understand that delaying the execution of a command depends on:
- π Ping to Xiaomi servers (if using the cloud). for Russia, the average response time is 100-300 ms.
- πΆ Wi-Fi quality: If the signal is weak, the lamp may freeze or not respond.
- π Loads on a router. If you have a lot of devices connected to it, you can lose commands.
π‘
If the lamp responds to commands with a delay, try in the router settings to fix a static IP-This will reduce the time spent searching for a device on the network.
3. Connecting the lamp to Mi Home: step-by-step instructions
To make the lamp work, you need to add it to the Mi Home app, and here are the detailed instructions with the nuances:
Download the Mi Home app (App) Store/Google Play)
Create a Xiaomi account (or log in through an existing one)
Make sure the router is running at 2.4 GHz
Turn the lamp into the socket (it should flash yellow)
-->
Step 1. Open Mi Home, press. + β Add the device and select Lighting category. In the list, find your model (e.g. Mi). LED Smart Bulb or Yeelight Color).
Step 2. Connect to the lamp access point (no password required) and then the app will automatically transfer the lamp to your home network.
- π The lamp flashes yellow (if not, turn it off/on 5 times in a row to reset).
- π΅ The phone's off. VPN Proxies (they can block the connection to the cloud).
- π The router does not block outbound connections to ports 80 and 443.
Step 3: Once you've successfully connected, the lamp will appear on the device list.
- π¨ Customize color and brightness.
- β° Set a schedule (for example, turn on the alarm clock).
- π€ Add to the group with other lamps for synchronous control.
What to do if the lamp does not connect?
4. Lamp control: methods and nuances
Xiaomi smart lamp supports several control methods, letβs consider each of them with pros and cons:
| Management method | How it works | Pluses | Cons |
|---|---|---|---|
| Mi Home appendix | Control over the cloud or local area network (if the phone and lamp are on the same Wi-Fi network). | β Full functionality (colors, scripts, schedules).β Works from anywhere in the world. | β Requires Internet for Cloud Teams.β Sometimes it is βlaggingβ because of Xiaomi servers. |
| Voice assistants | Integration with Alice (Yandex), Google Assistant or Siri via HomeKit (only for some models). | β Convenient for quick management.β Supports complex commands (e.g., turn on the light at 50% brightnessΒ»). | β Requires setting up a bundle of accounts.β Possible recognition errors. |
| Physical switch | The lamp remembers the last state and restores it after the power is turned on. | β It works without the Internet and phone.β It's common for householders. | β When you turn off the socket, the settings are lost (for example, color).β You can't set up complicated scenarios. |
| Automation (Mi) Home/Aqara) | Scenarios by time, motion sensors, temperature, etc. | β Full customization ("turn on the light if the movement is darkΒ»).β It can be associated with other devices (e.g., a door opening sensor). | β It's hard to set up a beginner.β Some scenarios require a hub (e.g. Aqara Hub). |
Hidden feature: Yeelight has an undocumented music mode feature that lets you synchronize color with music through your phone's microphone.
- Open the Yeelight app (not Mi Home!).
- Choose a lamp. β Additionally. β Musical regime.
- Adjust the sensitivity of the microphone and the color palette.
π‘
For stable voice control, link the lamp to your Yandex account/Google before setting up the scripts, otherwise the assistant may not see the device.
5. Common Problems and Their Solutions
Even the most reliable devices sometimes fail, and here are the typical Xiaomi smart bulb problems and how to fix them:
β οΈ Warning: If the lamp has stopped responding to commands but is lit with white light, it means that it has lost communication with the cloud. only reconnect via Mi Home (hold the button on the lamp for 5 seconds to reset).
- π Lamp flashes and doesn't connect: Check if the router is blocking the connection to Xiaomi servers (domains miot-specs.org, api.io.mi.com).If you use Mi Home on iPhone, try connecting via Android - sometimes helps.
- π Delayed commands: In the router settings, enable traffic prioritization (QoS) for the lamp device. If the lamp is far from the router, use a Wi-Fi repetitor.
- π¨ Colors are displayed incorrectly: In the Mi Home app, update the lamp firmware (Device settings) β Software updates. RGB-Calibrate the colors manually (Settings) β Color temperature β Sizing).
- π Lamp does not remember the state after switching off: This is a feature of the work - when the power is physically turned off, all settings are reset.Solution: use Xiaomi's smart socket to simulate turning off.
If nothing helps, try a full lamp reset:
- Turn the lamp off the socket.
- Turn it back on and immediately turn it off/on 5 times in a row (with intervals). ~1 second).
- The lamp should start flashing yellow, and now it can be reconnected.
β οΈ Note: Xiaomi lamps do not support Zigbee protocol (except the Aqara line).If you want a stable local area network without a cloud, consider buying the Aqara Hub and compatible lamps.
Automation scenarios: how to make light βsmarterβ?
The main advantage of smart lamps is the ability to automate lighting. The Mi Home has a built-in script builder, but it's limited. Let's take a few useful examples:
- π Scenario: If it's 06:30, set the brightness 1%, color temperature 2000K, Then smoothly increase the brightness to 100% in 30 minutes. Effect: Awakening becomes softer, as at natural dawn.
- πͺ Light when opening the door: Required: Aqara open sensor + Screenplay: If the door sensor is activated and the light level is activated < 50 lux, turn on the lamp at 100% brightnessΒ».
- π¬ Movie Review: If the TV Mi TV switched on, set the lamp in a warm light (2700K) You need to link the lamp and the TV in the same Mi Home account.
- π€ Nightlight for the child: Scenario: "If it's 22:00, turn on the lamp at 5% brightness with a blue hue; if it's 6:00, turn off." You can add a motion sensor condition (for example, if the child wakes up at night).
For advanced users, if standard scripts are scarce, you can use Home Assistant or Node-RED to create complex logic.
automation:
Alias: "Adaptive lighting by time of day"
trigger:
- platform: time_pattern
minutes: "/5"
action:
- service: light.turn_on
target:
entity_id: light.yeelight_color
data:
brightness_pct: "{{ (now().hour - 6) * 10 if (now().hour > 6 and now().hour < 22) else 10 }}"
color_temp: "{{ 200 + (now().hour * 20) if (now().hour < 22) else 2000 }}"This code smoothly changes the brightness and color temperature of the lamp depending on the time of day.
7. Model comparison: which Xiaomi lamp to choose?
Xiaomi has several types of smart lamps in its lineup, and here is a comparison table to help you choose:
| Model | Type of light | Brightness (lm) | Color temperature | RGB | Features | Price (2026) |
|---|---|---|---|---|---|---|
| Mi LED Smart Bulb | White | 800 | 1700β6500K | β | Budget model, no RGB, steady-work. | ~1 200 β½ |
| Yeelight Color | RGB + white | 600 | 1700β6500K | β | 16 million colors, music mode, local management. | ~2 500 β½ |
| Yeelight Pro | RGB + white | 1000 | 1700β6500K | β | Brighter than standard Yeelight, HomeKit support. | ~3 500 β½ |
| Aqara LED Bulb T1 | White | 800 | 2700β6500K | β | It works through Zigbee (needs a hub), there is no cloud dependency. | ~1 800 β½ |
Selection recommendations:
- π° Budget option: Mi LED Smart Bulb β if you only need adjustable white light.
- π¨ For color lighting: Yeelight Color β the best price/functional ratio.
- π For a reliable system: Aqara + Hub β if local work without cloud is important.
- π For Apple ecosystem: Yeelight Pro is the only model with HomeKit support.
8.Alternative firmware and hacking lamps
For enthusiasts, there is an option to flash Xiaomi smart lamp with alternative software, such as Tasmota or ESPHome.
- β‘ Local management without the cloud Xiaomi.
- π§ Advanced settings (e.g. customization of colors, integration with MQTT).
- π‘οΈ Increased security (no reliance on Chinese servers).
How to flash a lamp? A brief instruction for Yeelight:
- Download the Tasmota firmware for ESP8266 official website.
- Connect the lamp to the computer through USB-TTL adapter (you need to open the case and solder the contacts to the board).
- Use the esptool program to record firmware: esptool.py --port COM3 write_flash 0x0 firmware.bin
- Set up Wi-Fi and MQTT in the Tasmota web interface.
β οΈ Warning: Firmware on alternative software is warranty-free and can cause the lamp to fail. Do this only if you understand the risks! LED Smart Bulb (not Yeelight) process is more complicated β a soldering iron and electronics experience are required.
Once installed, the lamp can be integrated into Home Assistant, OpenHAB, or other smart home systems, such as the configuration for Home Assistant will look like this:
light:
- platform: mqtt
name: "Yeelight Hacked"
command_topic: "cmnd/yeelight/Power"
brightness_command_topic: "cmnd/yeelight/Dimmer"
brightness_scale: 100
rgb_command_topic: "cmnd/yeelight/Color"
color_temp_command_topic: "cmnd/yeelight/CT"π‘
Tasmota's firmware allows you to operate a lamp even without the Internet, but requires soldering iron skills and patience. For most users, standard Xiaomi software is enough.